A and B partitions - OnePlus 6T Questions & Answers

So on the partitions our phone boots normally from partition A correct? When we flash new kernels/ROMs which partition gets flashed? And is there a way to switch between the two? Sorry for the questions I'm just trying to figure everything out before I jump into a new phone and rooting, unlocking and flashing.

majortaylor said:
So on the partitions our phone boots normally from partition A correct? When we flash new kernels/ROMs which partition gets flashed? And is there a way to switch between the two? Sorry for the questions I'm just trying to figure everything out before I jump into a new phone and rooting, unlocking and flashing.
Click to expand...
Click to collapse
When you do OTA updates partition is changed to other one..you can change partition in TWRP.. but remember it will have previous oxygenos version

So essentially were dual booting so to speak

majortaylor said:
So essentially were dual booting so to speak
Click to expand...
Click to collapse
Not really. There is only a single data partition, so if you try to have different OS on each slot then you will have problems because all of the data may not be compatible.
Sent from my crosshatch using XDA Labs

So when flash in twrp should I worry about with partition I'm flashing too? Or does it even matter?

majortaylor said:
So when flash in twrp should I worry about with partition I'm flashing too? Or does it even matter?
Click to expand...
Click to collapse
TWRP will flash/install to the "current" partition.
Do:
Code:
> adb shell
> getprop | grep slot
This will show what the current boot slot is "_a" or "_b".
In principle you could dual boot ... but there is only one data partition !!! So if might be that your data partition is not compatible with one of both.
I am using dual boot. Slot _a contains the original OTA 9.0.7; slot _b contains a debloated version with additions for pixel functionality. I use _b as daily driver, but if something goes wrong as a result of my patching on _b, I can quickly switch to _a and have a working phone.
The data partition is compatible in this case.
You can switch between _a or _b in TWRP.

So, if I have my stock ROM on slot A and want to flash Pixel Experience to Slot B, will data partition be compatible ?

Adiker said:
So, if I have my stock ROM on slot A and want to flash Pixel Experience to Slot B, will data partition be compatible ?
Click to expand...
Click to collapse
Nope.

Related

Safestrap File Hiearchy Location?

Does anyone know where safestrap boot is physically located?
I was going to replace my stock rom (its borked for reasons unrelated to safestrap) but I'm unsure as to where the safestrap boot files are located.
Are they on stock rom /boot or /system. I'm hoping that if I just leave /boot alone I could just flash over /system and be ok but I wanna make sure I correct in assuming this as I dont want to lose access to safe strap.
to put it another way would flashing over stock /system wipeout the safestrap boot?
Thanks in Advance
alkmie said:
Does anyone know where safestrap boot is physically located?
I was going to replace my stock rom (its borked for reasons unrelated to safestrap) but I'm unsure as to where the safestrap boot files are located.
Are they on stock rom /boot or /system. I'm hoping that if I just leave /boot alone I could just flash over /system and be ok but I wanna make sure I correct in assuming this as I dont want to lose access to safe strap.
to put it another way would flashing over stock /system wipeout the safestrap boot?
Thanks in Advance
Click to expand...
Click to collapse
If you're replacing your stock slot, I believe you need to reinstall safestrap, and you'll have to install root before you reboot if your ROM doesn't have it already. I know ROM slots are in the data partition, but i'm pretty sure it has files in /system to get the splash on boot.
augeeLt Musical
Thanks for the reply.
I have one more question if anyone knows, I have a good stable rom in rom slot 1 and have made a backup so I have a system.ext4.win file.
So can I just switch to my stock rom slot and restore using this file
or perhaps rename it system.img and use adb to flash it to my system partition?
I'm unsure since I made the rom slot system partition 1800MB what would happen if I tried to flash this to my stock slot
would it just install the files to the full system partition or change my stock partition to 1800MB or would it not even work as the partition size probably do not match.
Sorry for all the question if I have a normal recovery id just flash away but don't wanna lose safe strap and have to terminal my way back in.
Thanks in advance

OP6T partion A/B

Hello,
I read about partition A/B, but I would like to have more insight some points are not really clear in my head.
My OP6T is rooted on partition B, everything works fine on this partition
On partition A, It automatically boot into recovery
How can I have a fresh install on both partition ?
Does I have to root both partition ?
You don't have to root both partitions, your second partition is probably blank, you can flash a rom to that partition or just let it be, its not a must have for a working device and generally when you root magisk inserts intself into both partitions.
Dark Nightmare said:
You don't have to root both partitions, your second partition is probably blank, you can flash a rom to that partition or just let it be, its not a must have for a working device and generally when you root magisk inserts intself into both partitions.
Click to expand...
Click to collapse
Ok, thank you for quick answer.
how do you flash a rom only on one partition ?
when you wipe in TWRP, does it wipe both or only one partition ?
I would like to have both partition at the same stage of update in case one get broken.
It is possible to make a copy of one partition to the other ?
Soujyu51 said:
Ok, thank you for quick answer.
how do you flash a rom only on one partition ?
when you wipe in TWRP, does it wipe both or only one partition ?
I would like to have both partition at the same stage of update in case one get broken.
It is possible to make a copy of one partition to the other ?
Click to expand...
Click to collapse
Well the whole point of two partitions is to have one in the previous state if an update breaks the current one...
You can flash one of the fastboot roms or full zips available in the general section, but you may have to modify the zip files to only flash to a single slot as the zips currently flash to both slots.
Dark Nightmare said:
Well the whole point of two partitions is to have one in the previous state if an update breaks the current one....
Click to expand...
Click to collapse
that's my point, I want to copy my partition B to my partition A, then modify one or the other, for a period they will be at the same state but this will rapidly change
Dark Nightmare said:
You can flash one of the fastboot roms or full zips available in the general section, but you may have to modify the zip files to only flash to a single slot as the zips currently flash to both slots.
Click to expand...
Click to collapse
is it possible to wipe everything and make a fresh install on both ?
Soujyu51 said:
is it possible to wipe everything and make a fresh install on both ?
Click to expand...
Click to collapse
use fastboot rom.
dieandromeda said:
use fastboot rom.
Click to expand...
Click to collapse
I will need a bit more information please xD
Soujyu51 said:
I will need a bit more information please xD
Click to expand...
Click to collapse
Only system / boot are concerned by the slot organization. Read general texts and tutorials about that and fastboot use. Everything needed is on the internet.
Striatum_bdr said:
Only system / boot are concerned by the slot organization. Read general texts and tutorials about that and fastboot use. Everything needed is on the internet.
Click to expand...
Click to collapse
Thank you very much that is a big help in my questionning
I followed this
https://forum.xda-developers.com/oneplus-6t/how-to/rom-stock-fastboot-roms-oneplus-6t-t3862516
and use this one flash-all.bat
it boot on both partition
Thank you
Thanks!
It solved my problems

Need a little help understanding A/B partitions

I have a few questions I'm new to the a/b partitions thing I've read the page on a/b partitions. But I'm still in the mud.
1 I'm on Verizon bootloader unlocked twrp 3.2.3-23 and magisk installed I have 9.0.11 installed twrp and magisk in slot a/b
now is it necessary to backup stock rom? If I install lets say crDroid in slot A install twrp installer I know twrp goes into both slots reboot back to recovery making sure I'm still in A install gapps and magisk reboot back to recovery making sure again I'm still in A slot then reboot to crDriod that should work yes?
2 Now If I wanted to go back to my stock rom witch is in B slot can I not reboot back to twrp and switch to slot B and go to stock?
Thanks guys this A/B partition is still clear as mudd
Making a back up is always recommend, but it's up to the user to decide if the want to or not. The down side is loosing all your data, so there is that.
The short answer to your 2nd question is no you can not dual boot ROMs on this device. I posed the same question in a different thread and you can read the explanation from Dark Nightmare here.
https://forum.xda-developers.com/showpost.php?p=78375631&postcount=988
Sent from my ONEPLUS A6013 using Tapatalk
foamerman said:
I have a few questions I'm new to the a/b partitions thing I've read the page on a/b partitions. But I'm still in the mud.
1 I'm on Verizon bootloader unlocked twrp 3.2.3-23 and magisk installed I have 9.0.11 installed twrp and magisk in slot a/b
now is it necessary to backup stock rom? If I install lets say crDroid in slot A install twrp installer I know twrp goes into both slots reboot back to recovery making sure I'm still in A install gapps and magisk reboot back to recovery making sure again I'm still in A slot then reboot to crDriod that should work yes?
Click to expand...
Click to collapse
I'm new to A/B as well but have been flashing quite a bit. Maybe someone can correct me if I'm wrong. From what I've observed, ROMs are designed to flash to the slot you're not using and, on reboot, switch slots. TWRP zip installer is designed to install to both slots. Magisk and Gapps, however, install to the current slot. This means you should flash the ROM (which flashes to the non-active system and boot partitions and possibly others), flash the TWRP installer (which installs to both boot partitions, including the one that was just flashed). Then reboot back into recovery (which will be the other slot that the ROM was installed to), and then install all the other zips needed (i.e., Gapps, Magisk, etc...).
Switching A/B partitions in the TWRP reboot menu also triggers the partition switch after reboot, if needed. It doesn't seem to immediately switch before a reboot however, even though it gives that impression.
foamerman said:
2 Now If I wanted to go back to my stock rom witch is in B slot can I not reboot back to twrp and switch to slot B and go to stock?
Click to expand...
Click to collapse
The data partition, which contains user apps and system and user app data, is not slotted. Moving back and forth between slots that share a common ROM type and are close in version might not pose a problem. But A/B slotting wasn't designed for switching Roms back and forth. It was designed to try to ensure that there is always a valid bootable ROM without regard to use data (i.e., potentially, after a factory-reset). Don't expect to boot up an AOSP modded ROM using the data and apps from an OygenOS ROM. Do a backup of all partitions to be safe (with the exception of system and vendor since system_image and vendor_image give a bit-for-bit copy, instead of file-for-file copy). Copy the TWRP directory to a computer afterward, if possible. Make sure to wipe data if flashing a ROM of a different type, not just a different version (after flashing everything but before initial system boot).
phillymade said:
Making a back up is always recommend, but it's up to the user to decide if the want to or not. The down side is loosing all your data, so there is that.
The short answer to your 2nd question is no you can not dual boot ROMs on this device. I posed the same question in a different thread and you can read the explanation from Dark Nightmare here.
https://forum.xda-developers.com/showpost.php?p=78375631&postcount=988
Sent from my ONEPLUS A6013 using Tapatalk
Click to expand...
Click to collapse
Nsane457 said:
I'm new to A/B as well but have been flashing quite a bit. Maybe someone can correct me if I'm wrong. From what I've observed, ROMs are designed to flash to the slot you're not using and, on reboot, switch slots. TWRP zip installer is designed to install to both slots. Magisk and Gapps, however, install to the current slot. This means you should flash the ROM (which flashes to the non-active system and boot partitions and possibly others), flash the TWRP installer (which installs to both boot partitions, including the one that was just flashed). Then reboot back into recovery (which will be the other slot that the ROM was installed to), and then install all the other zips needed (i.e., Gapps, Magisk, etc...).
Switching A/B partitions in the TWRP reboot menu also triggers the partition switch after reboot, if needed. It doesn't seem to immediately switch before a reboot however, even though it gives that impression.
The data partition, which contains user apps and system and user app data, is not slotted. Moving back and forth between slots that share a common ROM type and are close in version might not pose a problem. But A/B slotting wasn't designed for switching Roms back and forth. It was designed to try to ensure that there is always a valid bootable ROM without regard to use data (i.e., potentially, after a factory-reset). Don't expect to boot up an AOSP modded ROM using the data and apps from an OygenOS ROM. Do a backup of all partitions to be safe (with the exception of system and vendor since system_image and vendor_image give a bit-for-bit copy, instead of file-for-file copy). Copy the TWRP directory to a computer afterward, if possible. Make sure to wipe data if flashing a ROM of a different type, not just a different version (after flashing everything but before initial system boot).
Click to expand...
Click to collapse
OK I understand what you both are saying my understanding is that data is still there in both slots yes? so If I want to go back to my 9.0.11 stock rom I should be able to just reboot to twrp and select slot B and go back to to stock yes? guys I'm sorry this is my first A/B partition phone I'm just trying to figure it out
foamerman said:
OK I understand what you both are saying my understanding is that data is still there in both slots yes?
Click to expand...
Click to collapse
As long as it isn't wiped, yes.
foamerman said:
so If I want to go back to my 9.0.11 stock rom I should be able to just reboot to twrp and select slot B and go back to to stock yes? guys I'm sorry this is my first A/B partition phone I'm just trying to figure it out
Click to expand...
Click to collapse
No. Except for the possible exception that both slots contain different versions of the same ROM, the data will work with one ROM but not the other.
When flashing a ROM in TWRP, just mke sure to make a nandroid backup first and follow the installation directions. If you have to switch back, you will need to flash the nandroid backup.
It is a pain and there are pitfalls. This phone is relatively new and this is the cost of flashing a custom ROM/bootloader.
No. Except for the possible exception that both slots contain different versions of the same ROM, the data will work with one ROM but not the other.
When flashing a ROM in TWRP, just mke sure to make a nandroid backup first and follow the installation directions. If you have to switch back, you will need to flash the nandroid backup.
It is a pain and there are pitfalls. This phone is relatively new and this is the cost of flashing a custom ROM/bootloader.[/QUOTE]
OK one more I think lol If I have 9.0.11 on my internal storage can I not go into slot A and wipe it and install it back on there and be OK?
foamerman said:
OK one more I think lol If I have 9.0.11 on my internal storage can I not go into slot A and wipe it and install it back on there and be OK?
Click to expand...
Click to collapse
Internal storage is an encrypted folder in the data partition that is wiped separately from data. As long as you don't wipe internal storage for any reason it should be ok, in theory. But it's not in practice.
Most of the problem with this phone is maintaining encryption back and forth between ROMs. Honestly, if you can't afford to lose data, don't try to flash ROM's yet. I have had very little luck flashing back and forth and, after reflashing data, being able to avoid a bootloop. TWRP has only supported encryption on this phone for a month or so and IMHO it's not ready for prime time. I have relied on Titanium Backup and moved it's backup folder back and forth between my phone and computer.
Nsane457 said:
Internal storage is an encrypted folder in the data partition that is wiped separately from data. As long as you don't wipe internal storage for any reason it should be ok, in theory. But it's not in practice.
Most of the problem with this phone is maintaining encryption back and forth between ROMs. Honestly, if you can't afford to lose data, don't try to flash ROM's yet. I have had very little luck flashing back and forth and, after reflashing data, being able to avoid a bootloop. TWRP has only supported encryption on this phone for a month or so and IMHO it's not ready for prime time. I have relied on Titanium Backup and moved it's backup folder back and forth between my phone and computer.
Click to expand...
Click to collapse
Well the mud is starting to clear up a little. Yea I've been a little leery about trying to install roms yet. I have read all the post in the Recovery thread mauronofrio is getting a 6t soon so maybe he can figure it out. But again Thank you.

TWRP Slot A/B Issue...

My question is generic and doesn't relate to any specific ROM. Let's say that I setup the ROM/apps on slot A and the data is encrypted. I updated to a new version of the same ROM. This should have updated the ROM to slot B.
When I go to TWRP, it asks me to decrypt data and that is good. Then, I manually change to slot B in TWRP and reboot to recovery. It doesn't ask me to decrypt data and I don't see anything on the /system or /data partition as everything is empty.
1. Shouldn't /system have lots of files/directories as I updated to a new version while on slot A?
2. Why was the /data partition not available in TWRP when I manually changed to slot B?
3. Once I manually change to slot B, and reboot to system, will it bootloop as the data was setup while on slot A and was encrypted? Does the encryption break booting into the second slot B? Is that by design?
My main concern is the availability of data (encrypted) on the slots. If you setup everything on one slot, and later change it manually to the other slot, will the data be accessible? I am on the same android release (Android 10, for example) but different updates (Android 10.1, for example). And, will it boot?
Thanks in advance for any and all replies as I am trying to decipher this A/B mystery.

Copy A Partion to B after Brick?

Somehow my device tried to update to Android 10 expect different settings. I assume my changes to the system partition caused a brick. I booted to TWRP and changed the partition. Now it is booting again.
My concern is that the device tries to update again the current partition will be bricked too. Can I copy my working A partition to the non functional B? How do I do this?
domina said:
Somehow my device tried to update to Android 10 expect different settings. I assume my changes to the system partition caused a brick. I booted to TWRP and changed the partition. Now it is booting again.
My concern is that the device tries to update again the current partition will be bricked too. Can I copy my working A partition to the non functional B? How do I do this?
Click to expand...
Click to collapse
If it successfully boots, You're fine. Just boot to stock recovery and flash to 415 MR again from the current slot.

Categories

Resources