[Questions]-Recovery Included in ROM and Slots - OnePlus 6 Questions & Answers

Hey all,
1. Now that recovery is included in the ROM can TWRP be included in custom ROMs to save reflashing it separately?
2. Also what causes ROMs to be flashed to the inactive slot? Does anything flashed via TWRP go to the inactive slot or does it only count for full ROMs?
3. How does app and app data work with the slots? I take it that it is shared between both slots?
Can any developers answer these questions please?
Thanks very much

greetings
I also have the same question, Iam coming from regular ONE partition phone so, the new idea of 2 slots and no recovery and no cache is hard to understand (at least for me)

Looks like some experimentation is in order to answer these questions.

twrp must be included in oem rom !!
Shame on Oneplus and in Google !!

Related

Many questions on the A/B slots Which caused a fastboot bootloop

Man,i hate that oneplus did this with the A/B slots..
Had successfully unlocked the bootloader,installed twrp and had tryed the few roms that are out for the oneplus 6..with no problems..
Then,i thought i'd make a backup of my data from my oneplus 3T and restore that to my oneplus 6 (Big mistake)
At first it would bootloop back into twrp,so i did a system and data wipe,and tryed flashing a rom.before flashing i checked to see which slot i was in,and it would say "A"
But after flashing the rom and twrp,and booting back into twrp,it says slot "B" was active and no OS was on slot "B".I tryed flashing the rom to both "A" and "B" slot,then it just bootlooped back into fastboot mode..Thanks to whoever uploaded that unbrick tool,so now i'm back to stock,with a locked bootloader.I really don't understand this A/B slot thing and how it works..
1)Does the stock OS reside in one of the slots all the time?Or when you flash a rom,does it install to both the slots?
2)Do you have to always make sure you only flash to one certain slot?
3)When you do a system and data wipe,does it also wipe the vendor.img on both slots?
Any help would be greatly appreciated..Thanks
Wäre auch für mich interessant.
saleappeal said:
Wäre auch für mich interessant.
Click to expand...
Click to collapse
English only noob.
bobbylo said:
Man,i hate that oneplus did this with the A/B slots..
Had successfully unlocked the bootloader,installed twrp and had tryed the few roms that are out for the oneplus 6..with no problems..
Then,i thought i'd make a backup of my data from my oneplus 3T and restore that to my oneplus 6 (Big mistake)
At first it would bootloop back into twrp,so i did a system and data wipe,and tryed flashing a rom.before flashing i checked to see which slot i was in,and it would say "A"
But after flashing the rom and twrp,and booting back into twrp,it says slot "B" was active and no OS was on slot "B".I tryed flashing the rom to both "A" and "B" slot,then it just bootlooped back into fastboot mode..Thanks to whoever uploaded that unbrick tool,so now i'm back to stock,with a locked bootloader.I really don't understand this A/B slot thing and how it works..
1)Does the stock OS reside in one of the slots all the time?Or when you flash a rom,does it install to both the slots?
2)Do you have to always make sure you only flash to one certain slot?
3)When you do a system and data wipe,does it also wipe the vendor.img on both slots?
Any help would be greatly appreciated..Thanks
Click to expand...
Click to collapse
Ok let me answer your three questions here.
1. The rom resides on both partitions. The whole point of A/B partitions is seamless updates. It let you use your phone on one slot while the update downloads and updates on the other slot. Then after the update when you restart the phone it boots up the other slot (the one that updated) and you are running the updated software. It also checks the update and if taking the update causes a bootloop it reloads the old slot so you don't end up bricked from a bad OTA update.
2. When flashing a new custom rom meant for this device, it should flash it to both slots.
3. Vendor partition is separate now (thank you project treble) from system and data. Wiping system and data should never affect the vendor partition.
Any other questions please feel free to ask. I would rather answer questions this way than dealing with a panicking person who bricked their phone and can't unbrick it.
tabletalker7 said:
Ok let me answer your three questions here.
1. The rom resides on both partitions. The whole point of A/B partitions is seamless updates. It let you use your phone on one slot while the update downloads and updates on the other slot. Then after the update when you restart the phone it boots up the other slot (the one that updated) and you are running the updated software. It also checks the update and if taking the update causes a bootloop it reloads the old slot so you don't end up bricked from a bad OTA update.
2. When flashing a new custom rom meant for this device, it should flash it to both slots.
3. Vendor partition is separate now (thank you project treble) from system and data. Wiping system and data should never affect the vendor partition.
Any other questions please feel free to ask. I would rather answer questions this way than dealing with a panicking person who bricked their phone and can't unbrick it.
Click to expand...
Click to collapse
I’m sorry i don’t want to hijack this thread but i want to make a Nandroid backup in TWRP and saw an option to choose from slot A or B.. my question is: Is there any difference between those two or does it matter what slot you are backing up in? Edit: i looked on google and could't find any information about this.
jdorp18 said:
I’m sorry i don’t want to hijack this thread but i want to make a Nandroid backup in TWRP and saw an option to choose from slot A or B.. my question is: Is there any difference between those two or does it matter what slot you are backing up in? Edit: i looked on google and could't find any information about this.
Click to expand...
Click to collapse
It doesn't matter what slot you are on you will be making the backup of the current slot by default, and that is exactly what you want
Everything you need to know is here:
https://forum.xda-developers.com/oneplus-6/how-to/guide-noobs-guide-to-b-partitions-op6-t3816123
In most cases you should not worry which slot you're on, just let the system take care of that. On some custom roms, it matters, and in those cases carefully follow the installation instructions.
Thanks guys, this answers my question. (Edit: I've just read the Generic Noob Advice. i don't think i can delete this comment.)

New User - Stock Flashing

Hello everyone. I was a Pixel user and new to OP. I know about A/B partition enough when it comes to pixel. My question is regarding flashing stock ROM while keeping internal storage. It was really easy on pixel, just download official file then edit bat file to remove internal storage wiping code. But when it comes to OP it seems to be different. I've followed those threads https://forum.xda-developers.com/oneplus-6/how-to/oneplus-6-unlock-bootloader-flash-twrp-t3792643 and https://forum.xda-developers.com/oneplus-6/how-to/rom-stock-fastboot-roms-oneplus-6-t3796665. But i have some doubts. Here are my question.
1. Lets say im currently on A partition. Can i download stock ROM from official site > transfer to internal storage > boot to TWRP > flash it. That's it? Shouldn't i flash it to other slot too?
2. Im planning to flash custom ROMs. Hence like i asked above how should i flash stock ROM to both slots while keeping internal storage?
3. I've seen on some custom ROM threads that it is better to flash stock ROM twice before flashing the custom ROM. IS there any particular reason for that?
Thanks all
Flashing the ROM will not affect data or internal storage in OOS. They say to flash both slots to make sure there is no discrepencies in the OS. If you flash in TWRP, you just flash TWRP again before you reboot or it will return to stock.

I Am Confused About Recoveries

Please forgive my ignorance here. It's been 4 or 5 years since I last flashed a recovery. AB wasn't a thing back then, but it sounds like it obsoleted everything I used to know. Meanwhile, it seems like everyone around here has long since digested the changes and is carrying on conversations premised on a lot of background information I don't know. In short, I'm confused, and I need help.
What I Want to Do:
Flash the microG fork of LineageOS
Flash Magisk
Flash the Asus camera app
Install the unofficial port of the GCam app
Encrypt and divorce the boot password from the lockscreen as per this post (which I can't link to our XDA rejects my post, so I'm copy-pasting instead: https COLON SLASH SLASH forum.xda-developers.com/showpost.php?p=78699812&postcount=58 )
Question 1
Which recovery should I use? It sounds like there are three and each has problems. Is the following correct?
It sounds like the LineageOS has trouble flashing things other than LineageOS -- or is it just OpenGApps that's a problem? Can it flash the microG fork of LineageOS?
It sounds like mauronofrio's unofficial TWRP works generally, but can't flash LineageOS and can't decrypt the data partition if LineageOS encrypted it.
It sounds like bigbiff's official TWRP works generally, but there seem to be differing opinions about whether it can flash LineageOS; it can decrypt a data partition encrypted by LineageOS, but not if a password is set; and its permanent installation feature is currently buggy and might break the boot partition.
Question 2
Some posts suggest using different recoveries to flash different things. Is that advisable?
Question 3
Do I even need to install a recovery permanently? It sounds like it should be possible to boot a recovery using "fastboot boot something.img" and do everything I need to do. Is that right?
Are there any strong reasons why I should have a recovery installed permanently even if it's not necessary?
Question 4
What's the correct install order? LineageOS (microG fork), then Magisk, then Asus Camera?
Question 4b
How do I deal with the A/B thing?
Do I have to install everything to both partitions, or does the recovery install to both partitions automatically, or is stuff installed to just one partition and then somehow magically handled with the next update?
In particular, how do I get Magisk and Asus Camera to carry over to the other partition?
The instructions for the LineageOS recovery include an extra reboot right after installing LineageOS so that the remaining stuff ends up in the same partition. Does TWRP also need the same extra reboot?
Question 5
Do I understand correctly that the GCam port is just a regular apk that can be installed later through normal means -- no flashing required?
Question 6
About divorcing the boot password from the lockscreen:
Does that post apply to LineageOS?
Does the A/B thing complicate the instructions in any way? It sounds like the files to be backed up and restored are in the data partition, so I'm guessing not.
Do I need to remove the boot password to make a recovery work? It sounds like the LineageOS recovery can handle the password; the unofficial TWRP can't even handle the encryption format; and the official TWRP is currently bugged and needs the password removed. Is that right?
Question 7
So, OTA updates for Lineage OS are a thing now? Could someone explain how that works?
q1
- Just opengapps has problems but you can use lucas own opengapps build or mindthegapps. No idea about microG.
- True. There is some difference of opinion where it should be fixed (in lin or twrp).
- It played around with it a lot before giving up. In its current state i would not use it for any rom. As soon as pin/pattern/fp/stock rom/nandroid comes into play there will be problems.
q2
For convenience or if you have problems with stock lineage recovery it makes sense at the current time. Since there is currently no twrp out that fully supports lineage flashing + nandroid and encryption i would either not use twrp at all or wait for the official twrp to be fixed.
q3
This depends on your needs. Most recovery/rom combinations won't decrypt while only fastbooted. Especially when nandroid comes into play you will encounter problems.
q4
Depending on the weather, the build you use and the already installed build/addons you get different results. In general the order of those 2 should not matter but in my experience i get different/unexpected results/problems without beeing able to reliably reproduce the behavior.
q4b
I was in your shoes a year ago I'll try to keep it short. You have 2 slots. some partitions like boot exist in both slots (you will have them twice) while data only exists once. One slot is active. The phone boots from the active slot. You can manually change the active slot from fastboot and twrp so the next reboot will boot from the previously inactive slot (but you should rarely need to do that). Ah yes the most important change is there no longer is a persistent recovery partition. Recovery is embedded as a ramdisk in the boot partition.
Assuming the rom or whatever you are flashing is done right and the recovery you are using works correctly:
- flashing a rom from recovery will flash it to the inactive slot
- flashing an addon like magisk or asuscam or gapps will flash to the active slot (thats why you need to reboot after flashing a rom, so gapps will be flashed to your new rom)
- flashing a recovery installer flashes both boot partitions (at least that is the current state) and remove magisk
- flashing a recovery will install it on the active slot be it from twrp or fastboot
Due to this behavior you will have to install twrpinstaller + gapps+ magisk + asus cam every time you install a new rom (unless the rom has it already like asus cam in the next omnirom weekly) and you will have to reboot to recovery from twrp and lin recovery (active slot change to newly installed rom).
q5 yes
q6 no clue what that even does In general i had problems/errors with so many different combinations of roms/encryption/recovery and nandroid that currently i would advise to disable
pin/pattern/fp if you want to flash a rom and or take/restore a nandroid and reenable it after.
q7 It downloads the newest build and installs it in the backgroud but you still have to manage magisk, twrp etc. manually. So i prefer to just flash everythin from recovery.

Flashing & slot A/B

Hi all,
now, I started modifying the phone and trying around with custom ROMs. And after several fails, I could indeed install one ROM properly, but I have to admit that I am puzzled about how this slot management works.
Can someone please explain me how this works? Considering, I am running a custom rom, unlocked bootloader (of course), I would like to install a new ROM, don't care about data/apps/etc. Just tell me what I should do, please.
Thanks,
abprie
PS: I thought, wiping and flashing ROM and TWRP would suffice, but it does somehow not (I am always ending up in the bootloader).
This is quite a common thread, there are many sources available to search. There's even an explaining thread here: https://forum.xda-developers.com/ze...uide-how-to-root-asus-zenfone-6-twrp-t3940168 . If it's still not enough for you, search for "A/B partitions flashing" or "how does A/B slot works".
aleksander002 said:
This is quite a common thread, there are many sources available to search. There's even an explaining thread here: https://forum.xda-developers.com/ze...uide-how-to-root-asus-zenfone-6-twrp-t3940168 . If it's still not enough for you, search for "A/B partitions flashing" or "how does A/B slot works".
Click to expand...
Click to collapse
OK, thanks for the link. I understand now why this was introduced, but not how to use twrp with this.
Considering, I am booting into recovery and see slot A to be active. If I wipe anything, does this affect slot A or B? Same for install, backup or recover. Also: will the next boot be slot B?
It depends on what you wipe. /data is independent but /vendor, /system and /boot partitions will be wiped on the active slot. Backup will work on data+currently active slot. Recovery too. Installation is not so easy. Every zip that isn't a ROM will be flashed on the active slot. If it is a ROM, it will be flashed on inactive one and after a reboot the phone will switch currently active slot. That's why you have to reboot the phone after flashing if you want to add any mods to the device, otherwise they'll flash on inactive one and won't work.
aleksander002 said:
It depends on what you wipe. /data is independent but /vendor, /system and /boot partitions will be wiped on the active slot. Backup will work on data+currently active slot. Recovery too. Installation is not so easy. Every zip that isn't a ROM will be flashed on the active slot. If it is a ROM, it will be flashed on inactive one and after a reboot the phone will switch currently active slot. That's why you have to reboot the phone after flashing if you want to add any mods to the device, otherwise they'll flash on inactive one and won't work.
Click to expand...
Click to collapse
Thank a lot, this helps!

A/B slot questions

I tend to mess things up when flashing new ROMs on my Oneplus6. And I usually end up using the MSMdownloadtool to 'fix my phone' again.
* Does MSMdownloadtool install OOS on both slots?
* What do you advise to do before installing a custom (v10) rom?
* I tried doing a fastboot OOS install by mauronofrio, it didnt work. I got into bootloops after running/finishing the flash all bat file. So I used MSMdownloadtool again. I wondered if the fastboot OOS installer guide by mauronofrio installs OOS on both slots??
* Does the fastboot OOS installer do the same thing as MSMdownloadtool?
* In a lot of guides for clean install custom rom I read as first step: wipe system/data. But then I wonder why do you have to install the correct OOS version first, THEN wipe it, and then install custom ROM. Does an OOS installation leave some hidden (essential) files/partitions behind or something?
* Do you guys switch slots in twrp / or do you reboot to switch slots / or do you use the fastboot --set-active a/b command?
* Why does gapps only have to be installed on 1 slot and not on both?
* Why don't custom ROMS install themselves on both slots straight away, like when you flash the twrp installer zip.. ?
Im currently running carbonROMv8 ROM, its running fine so Im not looking to change yet. But im sure im gonna have to use msmdowndtool again when I wanna try out some other ROM in the future. I dont really feel like im having any control off the flashing process. It either works or it doesnt and when it doesnt I cant explain why..
dumbl3 said:
I tend to mess things up when flashing new ROMs on my Oneplus6. And I usually end up using the MSMdownloadtool to 'fix my phone' again.
* Does MSMdownloadtool install OOS on both slots?
* What do you advise to do before installing a custom (v10) rom?
* I tried doing a fastboot OOS install by mauronofrio, it didnt work. I got into bootloops after running/finishing the flash all bat file. So I used MSMdownloadtool again. I wondered if the fastboot OOS installer guide by mauronofrio installs OOS on both slots??
* Does the fastboot OOS installer do the same thing as MSMdownloadtool?
* In a lot of guides for clean install custom rom I read as first step: wipe system/data. But then I wonder why do you have to install the correct OOS version first, THEN wipe it, and then install custom ROM. Does an OOS installation leave some hidden (essential) files/partitions behind or something?
* Do you guys switch slots in twrp / or do you reboot to switch slots / or do you use the fastboot --set-active a/b command?
* Why does gapps only have to be installed on 1 slot and not on both?
* Why don't custom ROMS install themselves on both slots straight away, like when you flash the twrp installer zip.. ?
Im currently running carbonROMv8 ROM, its running fine so Im not looking to change yet. But im sure im gonna have to use msmdowndtool again when I wanna try out some other ROM in the future. I dont really feel like im having any control off the flashing process. It either works or it doesnt and when it doesnt I cant explain why..
Click to expand...
Click to collapse
Yoo.. So Many Questions. Will try to explain in easiest way..
1. Yes. It Does Flash OOS in Both Slot via Qualcomm Download Mode which is mainly for Manufactures to restore Device..
2. Let me clear that Most people's who face issue in booting custom ROM have their data encrypted by previous or stock ROM.
Here is Link Thread to know how to decrypt your device..
https://forum.xda-developers.com/oneplus-6/how-to/tutorial-decrypt-flash-rom-pie-oreo-roms-t3838643
My own Instructions to Flash Custom ROM (Strictly for Decrypted Device):-
Boot Into Recovery
Wipe Cache, Data & System
Flash Latest Stable/Beta OOS10 & Recovery
Reboot Into Recovery(Ignore No OS Installed Warning)
Flash Latest Stable/Beta OOS10 & Recovery again
Reboot Into Recovery
Now flash Custom ROM + Recovery(If Not Included)
Reboot Into Recovery
Flash Gapps(If not included in ROM), Magisk & No-Verity zip(to keep Device dencrypted)
Reboot & Done
For Installing Update on Same Custom ROM :-
Download the Update
Reboot Into Recovery
Flash Update ZIP & Recovery
Reboot Into Recovery
Flash Gapps(If not included in ROM), Magisk & No-Verity zip(to keep Device dencrypted)
Reboot & Done
3. Fastboot Don't always work if You try to Upgrade/Downgrade Android Version as it won't flash Critical Partitions.. Meanwhile MSMDownload tool Use Download mode which is more powerful.
4. Nope. Both are Different AS both use different mode to flash ROM.
5. Clean install required while flashing new custom ROM because Not All ROM uses Same Base. Some uses Stable OOS or some uses Beta OOS... Now, your answer is in these two build Types...
In my Opinion, Custom ROM have nothing to do with your System partition but it most like to related to Vendor Partition... Both Stable & Beta OOS Have little difference in Vendor partition data..
When any dev Build Any ROM, he uses any one of those Build as base for which he tweak/fix bugs.. That's why always Use Dev specified OOS build for avoid Bootloop/bugs..
6. I prefer last option as it's more reliable..
7. It's like when you clean install any ROM.. When you install Any ZIP, It get installed in an Inactive Slot which make those ZIP data Allowed to use in Active slot..
But when you update ROM for 1st time, You install Gapps as well.. So i don't think you need to Install Gapps on 2nd Update as it already installed in both slots.
1st time when Clean installed & 2nd time when Updated 1st time...
8. It's Because how A/B Partition works... Any zip you flash get installed in inactive slot & this applies to both Stock OOS & Custom ROM...
That's why we have to flash OOS twice before flashing any custom ROM.. Which confirms you will have same Vendor partition regardless to your current slot so when you flash custom ROM it will get booted anyways even after an update..
Hope that's helpful.. Any question or help, you can DM or reply here..
Thanks for your reply. It clears a few things up I think. I got a few follow up questions.
I don't really feel comfortable walking around with a decrypted phone. I have already been pick-pocketed once and also lost two smartphones. I would say the chances are likely that also my OP6 is gonna get lost at some point. Having it decrypted would leave it very vulnerable for people trying to access my files.
* So lets say I decrypt my phone. Is it possible then to encrypt the phone again after I have flashed a new ROM (for example LineageOS 17.1)?
dumbl3 said:
Thanks for your reply. It clears a few things up I think. I got a few follow up questions.
I don't really feel comfortable walking around with a decrypted phone. I have already been pick-pocketed once and also lost two smartphones. I would say the chances are likely that also my OP6 is gonna get lost at some point. Having it decrypted would leave it very vulnerable for people trying to access my files.
* So lets say I decrypt my phone. Is it possible then to encrypt the phone again after I have flashed a new ROM (for example LineageOS 17.1)?
Click to expand...
Click to collapse
Well, In my Opinion Every Device is Vulnerable to Hackers.. Doesn't matter if it's bootloader is Locked or Unlocked...
Your device is more Vulnerable at the time you unlocked bootloader because after that you can execute advanced commands with fastboot.....
If your device have pin/pattern, Thief gone reset your device anyway to reset pass.. Eventually your data get wiped as well....
Well, you can encrypt your data but you might face issue while migrating to other ROM if you face any bug + decrypting your encrypted device again is time taking process if you have alot of data..
I mean there is difference between someone being able to reset/delete my data than someone being able to read my data. As far as I know a thief cannot just read my data after he has stolen my device which is encrypted with unlocked bootloader. Sure, he can connect it to his computer and fastboot delete my sh!t but I don't care I got backups of my most important data anyway, as long as he/she cannot just read my device data its fine by me. But how would I encrypt my device again after I installed, lets say, LineageOS 17.1?
dumbl3 said:
I mean there is difference between someone being able to reset/delete my data than someone being able to read my data. As far as I know a thief cannot just read my data after he has stolen my device which is encrypted with unlocked bootloader. Sure, he can connect it to his computer and fastboot delete my sh!t but I don't care I got backups of my most important data anyway, as long as he/she cannot just read my device data its fine by me. But how would I encrypt my device again after I installed, lets say, LineageOS 17.1?
Click to expand...
Click to collapse
you can.. But do it only if you gone use it for long term....
Not fine to waste your whole day transfer your date from mobile to PC then PC to mobile..

Categories

Resources