Could someone in detail explain the a/b partition system?? - Google Pixel 2 XL Questions & Answers

I just came over from a Nexus 6p and am slightly confused by this a/b partition on the pixel 2. I understand what a hard drive partition is, but I don't understand the point of it for this phone? And I know this has caused headache for custom rom makers too. Is there a visual map of the harddrive file system to see a good visual representation of how the drive works?

From my understanding, it's split into two partitions so that you can download an update and install it in the background while running the other partition. If there was a problem with the install, you would still have a functional partition which didn't have the update installed on.

If not mistaken the partition system was designed to reduce the downtime required when installing OTA updates. By taking place in the background, it allows the device to quickly reboot after and switch partitions instead of taking relatively ages to wait for the patch to be applied upon boot up.

I guess we will be able to use it for a dual-boot type setup?
Sent from my Pixel 2 XL using Tapatalk

slaydog said:
I guess we will be able to use it for a dual-boot type setup?
Sent from my Pixel 2 XL using Tapatalk
Click to expand...
Click to collapse
Not that I'm aware of. The original Pixel also had a partitioned storage system and I can't recall any dual booting news.

Oh okay thanks! So it's just two 2gb system partitions to rotate between. Cool idea, but honestly I feel like that catering to the impatient haha. I never had problems in the past with updates. On my Nexus 6p you download update in background and then restart to install. Now that install process is quicker I guess, but you still have to restart.
With old system: it would have to restart to unmount the partition then install and boot in
New system: While in partition A, partition B is installing the update and then reboots to switch partitions.
Is that right?

Related

[Q] Shrink System ROM Size?

On my Play, the System ROM is 327mb with 120mb free. The Internal Storage is 398mb with 25mb free.
My question is: How can I take the wasted space from the System ROM and make it usable as part of the Internal Storage?
I'm not sure it's currently possible... Even on rooted or unlocked devices, it's not always possible to change the partition table - I think on a lot of devices the partition table is still stored somewhere you don't have access to (like within the bootloader or in other portions of flash memory, etc.)
Though if I'm wrong and there is some easy way to do this, someone please correct me. I'm speaking from my experience as a Nexus One user - it was simple to unlock being the first Google Nexus device. But people didn't mess with the partition table until they achieved something called S-OFF, which I think stands for Security Off allowing them to use custom hboot's (bootloader) and reconfigure the partition table (some users want to do this for ICS since the N1 didn't have much onboard storage). I may be wrong here too, but I think that's how it works - I haven't taken the time to fully understand it and haven't played with my N1 in a while or actually tried the ICS.
It should be possible to move important apps you always want available to your system partition though, essentially making them part of your ROM and freeing up space that way - I think I've heard that Titanium Backup might be able to do this.
Sorry this isn't much help.
~Troop
You could try routing a directory into the system partition with a symlink (always backup important data first of course, in case something goes wrong)
Longpress a user app in titanium backup and choose 'convert to system app'
Sent from my R800x using xda premium
Trooper_Max said:
I'm not sure it's currently possible... Even on rooted or unlocked devices, it's not always possible to change the partition table - I think on a lot of devices the partition table is still stored somewhere you don't have access to (like within the bootloader or in other portions of flash memory, etc.)
Though if I'm wrong and there is some easy way to do this, someone please correct me. I'm speaking from my experience as a Nexus One user - it was simple to unlock being the first Google Nexus device. But people didn't mess with the partition table until they achieved something called S-OFF, which I think stands for Security Off allowing them to use custom hboot's (bootloader) and reconfigure the partition table (some users want to do this for ICS since the N1 didn't have much onboard storage). I may be wrong here too, but I think that's how it works - I haven't taken the time to fully understand it and haven't played with my N1 in a while or actually tried the ICS.
It should be possible to move important apps you always want available to your system partition though, essentially making them part of your ROM and freeing up space that way - I think I've heard that Titanium Backup might be able to do this.
Sorry this isn't much help.
~Troop
Click to expand...
Click to collapse
Sony have locked down the device, even with unlocked bootloader, security prevents us access to things like the partition table. AFAIK hboot/bootloader is responsible for controling partition table.
Sent from my HTC Sensation XL with Beats Audio X315e using Tapatalk 2
Double post sorry lol
Trygon said:
Longpress a user app in titanium backup and choose 'convert to system app'
Sent from my R800x using xda premium
Click to expand...
Click to collapse
This worked beautifully! Thanks so much.

Encrypting just reboots the phone

I want to encrypt my OnePlus 3 but every time I hit "encrypt" my phone just reboots.
So I took a look at the logs and it says "Orig filesystem overlaps crypto footer region. Cannot encrypt in place."
So even after spending about 2 hours looking into this issue all I could find is that apparently android needs about 16KB of space at the end of some partition.
I found some how to's but unfortunately the steps are very complicated and I don't know how to follow them on the OnePlus 3.
So does anybody know how to solve this issue? There is an resize option in TWRP but it doesn't give you any options and doesn't solve the problem.
My OP3 already says it is encrypted. That's the way it came out of the box. Yours didn't? That's odd.
Sent from my D5803 using Tapatalk
Yes, it was encrypted out of the box but I installed TWRP and CM13. It seems like the partitioning got messed up somehow while wiping/formatting /data.
anyone23 said:
Yes, it was encrypted out of the box but I installed TWRP and CM13. It seems like the partitioning got messed up somehow while wiping/formatting /data.
Click to expand...
Click to collapse
After flash back OOS and doing a factory reset it will encrypt automatically again.
Planet X said:
After flash back OOS and doing a factory reset it will encrypt automatically again.
Click to expand...
Click to collapse
Yes, of course but I want to keep on using CM13.
Encryption is usually no problem with CM. I've been using CM with encryption on my Nexus 5 for 2 years.
I just don't know how to fix the partitioning.
Okay, after unsuccessfully playing around with the resize2fs command, I found the solution.
As resizing while Android is running doesn't work, I booted into TWRP, unmounted all partitions and then opened a terminal in the advanced menu.
I already knew that the /data partition is the one I needed to shrink and it's called /dev/block/sda15. So I used the command "resize2fs /dev/block/sda15 1xxx..."
On first try I accidentally used a number far too high but in the error message I got, it stated the current size and so I simply subtracted 40 from this value and ran the command again (4 should be enough for 16kb, but I wanted to make sure).
Well, now the encryption was successful.
I still think that this problem occurred after a format using TWRP and it needs be fixed as this is a problem very difficult to diagnose for the average person like me. TWRP seems to format the whole memory for /data but Android needs 16kb of free space for encryption.
I already had the same problem with encryption on a Moto G falcon after a TWRP format a few months ago.
anyone23 said:
Okay, after unsuccessfully playing around with the resize2fs command, I found the solution.
As resizing while Android is running doesn't work, I booted into TWRP, unmounted all partitions and then opened a terminal in the advanced menu.
I already knew that the /data partition is the one I needed to shrink and it's called /dev/block/sda15. So I used the command "resize2fs /dev/block/sda15 1xxx..."
On first try I accidentally used a number far too high but in the error message I got, it stated the current size and so I simply subtracted 40 from this value and ran the command again (4 should be enough for 16kb, but I wanted to make sure).
Well, now the encryption was successful.
I still think that this problem occurred after a format using TWRP and it needs be fixed as this is a problem very difficult to diagnose for the average person like me. TWRP seems to format the whole memory for /data but Android needs 16kb of free space for encryption.
I already had the same problem with encryption on a Moto G falcon after a TWRP format a few months ago.
Click to expand...
Click to collapse
I'm running cm13 with encryption on my OnePlus 3 too. I didn't had to resize my partitions.

Dual Partitions?

I heard talk of the partitions in these pixel phones being different than the Nexus phones were. Like how the Nexus phones had bootloader, radio, system, recovery, boot, userdata, and cache. What do they mean when they speculate "dual partitions"? And for that matter, how are they going to update older Nexus devices if the partitions are different than the Pixel? A lot of questions I know, but hell, figured why not ask away.
I want to know how much space the 32GB variants have left after the dual partitions are accounted for.
LLStarks said:
I want to know how much space the 32GB variants have left after the dual partitions are accounted for.
Click to expand...
Click to collapse
I think I saw a video that showed 29GB
Edit: formatted to 29 but 24.3 available
H4X0R46 said:
I heard talk of the partitions in these pixel phones being different than the Nexus phones were. Like how the Nexus phones had bootloader, radio, system, recovery, boot, userdata, and cache. What do they mean when they speculate "dual partitions"? And for that matter, how are they going to update older Nexus devices if the partitions are different than the Pixel? A lot of questions I know, but hell, figured why not ask away.
Click to expand...
Click to collapse
Current devices have a single "system" partition, containing the OS and included apps, which gets patched when an OTA update is released. You can't use the phone when the OS is being patched and it's a slow process.
With the new feature, the new phones will have two system partitions (let's call them A and B). The phone can run the OS from one of these partitions (A), while the other partition is upgraded by an OTA update in the background (B). When the upgrade has been downloaded and applied to partition B, the phone can quickly reboot into the OS on partition B, making the upgrade much faster from a user point of view.
The next time the phone installs an update, it can apply it to partition A in the background.
All existing devices will simply continue to use the existing partition structure and patching process.
Daveoc64 said:
Current devices have a single "system" partition, containing the OS and included apps, which gets patched when an OTA update is released. You can't use the phone when the OS is being patched and it's a slow process.
With the new feature, the new phones will have two system partitions (let's call them A and B). The phone can run the OS from one of these partitions (A), while the other partition is upgraded by an OTA update in the background (B). When the upgrade has been downloaded and applied to partition B, the phone can quickly reboot into the OS on partition B, making the upgrade much faster from a user point of view.
The next time the phone installs an update, it can apply it to partition A in the background.
All existing devices will simply continue to use the existing partition structure and patching process.
Click to expand...
Click to collapse
So basically, Android OS would be installed on both partitions? That's too weird. That will take some getting used to!
It's more than just 2 system partitions, as those aren't the only potential partitions affected by an update. llabtoofer posted the exact duplicate partitions a while ago on Twitter.
I want to the size of each partitions.
Please show below via adb shell.
cat /proc/partitions
ls -l /dev/block/platform/soc/7824900.sdhci/by-name
*7824900.sdhci is diffrent name folder.
Milly7 said:
It's more than just 2 system partitions, as those aren't the only potential partitions affected by an update. llabtoofer posted the exact duplicate partitions a while ago on Twitter.
Click to expand...
Click to collapse
Hey I know this post is a little old but do you happen to know where I can find that post ?
aholeinthewor1d said:
Hey I know this post is a little old but do you happen to know where I can find that post ?
Click to expand...
Click to collapse
Very old post lol. You should search XDA for a user named llabtoofer. He knows a lot about HTC phones. I'm quite sure he will answer. You can also search for him on Twitter which is where he originally posted it prior to the phones release date.

Unending trouble with system partition for hydrogen

hi guys, I am having trouble with my MI Max having 32GB internal memory.
From it's behaviour for last few days I have inferred it's system partition is the culprit.
On stock miui rom, it gives msg that encryption unsuccessful and I need to factory reset it. But even after doing factory reset it shows the same msg.
Its with locked boot loader but referring one thread I could install twrp latest version on it by replacing recovery image in stock rom and flashing with mi flash tool in edl mode.
So with two I tried installing few vision rooms like miui eu ROM, RR and crdroid based on Oreo. All the rooms while flashing fine error E1001, saying system image not updated and flashing failed.
I even tried repairing file system, fixing file system, Channing file system to fat, exfat, ext2, ext3, ext4 and f2fs several times (from advanced wipe menu) but things are not improving. Even tried formatting data partition as it's suggested at few places.
I am out of ideas after spending few days trying to fix it by flashing several times.
So please if some one can assist in resolving the issue, I would really appreciate.
Thank you in advance.
You need to format data not wipe . Go to twrp choose wipe , format data and type yes . Note, by doing this you will lose all of your data if you want to keep it make sure to save it to your PC or USB drive.
Zasnizas said:
You need to format data not wipe . Go to twrp choose wipe , format data and type yes . Note, by doing this you will lose all of your data if you want to keep it make sure to save it to your PC or USB drive.
Click to expand...
Click to collapse
Have already done it several times by now. Didn't make any difference.
harpy.eagle said:
Have already done it several times by now. Didn't make any difference.
Click to expand...
Click to collapse
As discussed yesterday on unofficial LineageOS (nijel8) thread the nand is damaged. You need to delate partition, compact unallocated space & then recreate the exactly the same partition. That way it won't be on the same spot & it will work.
Use a PC with an partition manager.
https://gparted.org/
Zola III said:
As discussed yesterday on unofficial LineageOS (nijel8) thread the nand is damaged. You need to delate partition, compact unallocated space & then recreate the exactly the same partition. That way it won't be on the same spot & it will work.
Use a PC with an partition manager.
https://gparted.org/
Click to expand...
Click to collapse
Tks a lot for the reply. It gave a ray of hope to me. Though I am hearing modifying partition on android device for the first time to fix it. That too for bricked device and to do it on PC. Is there any thread guiding about it? Would read a bit about how to do it in order to not mess things up even more.
harpy.eagle said:
Tks a lot for the reply. It gave a ray of hope to me. Though I am hearing modifying partition on android device for the first time to fix it. That too for bricked device and to do it on PC. Is there any thread guiding about it? Would read a bit about how to do it in order to not mess things up even more.
Click to expand...
Click to collapse
It's still ain't bricked so you can do this relatively easy. When it's bricked EDL programmer for used NAND chip used is needed.
So take a deep breath, see the exact size & type of the partition, delate it, create a new one exactly the same (type, size & name).
https://s10629.pcdn.co/wp-content/pictures/2010/01/captured_Image1.png51.png
https://helpdeskgeek.com/wp-content/pictures/2010/01/captured_Image1.png111.png
The tool I gave you URL is very good documented and with plenty examples & user guides available all which can be found on the site, it uses graphics GUI so it's as easy as it can be. So if you are inexperienced read/watch first how it's done. After you are done flash what you want in TWRP.
Best regards.
What I meant to ask is, how to access partitions of mobile on PC? I have used partitioning app on windows but never for android device. Anyway, as u have clued, I shall try accessing partitions with mobile connected in edl mode.

Changing Partition Sizes of internal flash memory

Hi,
after removing all the bloatware and some apps I will never use there is a little over 1G of free space in my system_root partition. Since both system a/b and userdata partitions are on sda I assume it is the same physical device. So in theory it should be possible to shrink the systems partitions and grow the userdata. Has anybody tried to do this? Does anybody know what type of encryption is used on userdata - it doesn't seem to be luks. I have a linux background and am quite surprised how much android differs from what I am used to...
Cheers
Paul
alpinista82 said:
Hi,
after removing all the bloatware and some apps I will never use there is a little over 1G of free space in my system_root partition. Since both system a/b and userdata partitions are on sda I assume it is the same physical device. So in theory it should be possible to shrink the systems partitions and grow the userdata. Has anybody tried to do this? Does anybody know what type of encryption is used on userdata - it doesn't seem to be luks. I have a linux background and am quite surprised how much android differs from what I am used to...
Cheers
Paul
Click to expand...
Click to collapse
In theory it's possible. But in practice it's extremely difficult, especially with all the partitions on todays devices. Changing a partition effects all partitions after it and they all need to be recreated. It's also extremely dangerous if you don't really know what your doing. I successfully did it on an old skyrocket just for fun. But I wouldn't want to try it on the pixel. I'm not even sure what the dual slots would entail.
Sent from my [device_name] using XDA-Developers Legacy app
alpinista82 said:
Hi,
after removing all the bloatware and some apps I will never use there is a little over 1G of free space in my system_root partition. Since both system a/b and userdata partitions are on sda I assume it is the same physical device. So in theory it should be possible to shrink the systems partitions and grow the userdata. Has anybody tried to do this? Does anybody know what type of encryption is used on userdata - it doesn't seem to be luks. I have a linux background and am quite surprised how much android differs from what I am used to...
Cheers
Paul
Click to expand...
Click to collapse
What bloatware did you remove?
airmaxx23 said:
What bloatware did you remove?
Click to expand...
Click to collapse
Everything that is not related to basic phone functionality or camera. Like two dozen apps. arcore, vrcore, all the carrier and e-sim stuff, play music/video, and a lot of other unnecessary stuff.
This is an answer to jd1609, I hit the wrong button:
Yeah, I thought so. Android has evolved quite a bit since cm14 (Android 7.1). I am just starting to understand whats going on with a/b partitions. I still don't quite understand why they had to go with sparse images instead of just raw images. Most probably to confuse me a bit more ....
But thanks a lot for sharing your experiences.
Cheers
Paul

Categories

Resources