Changing Partition Sizes of internal flash memory - Google Pixel 3 XL Questions & Answers

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

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.

[Q] Can I safely resize the system partition?

I have done wonderful things to my device thanks in large part to this community. Thank you.
I see that the system partition has about 1 GB of free space yet there are only 427 MB of files in there. Do I need that much free space? If not, how can I safely resize it?
Using parted. I've tried doing it though, shrinking my data partition to give more to system but it won't stick for some reason. Either I'm doing it wrong, or it doesn't work
The parted binary for android can be found on Cyanogenmod's github in the android_bootable_recovery repo
@CNexus, thanks. I appreciate that. I'll take a peek at that. Strangely enough I'm looking to shrink my system partition. I've seen others are wanting the opposite.
I've partitioned PC drives before but this appears to be much more involved.
Does anyone know of an optimum allotment for system and cache that I should follow?
You should be fine whatever you do.
Worst case if something goes wrong, just flash the PIT file for your internal storage size in Odin and all should be good
But yes, this will be more involved since it will need to be all command-line

[Q] memory problems on find 7

Hi there
Im having trouble with my find 7 recently-when Im trying to install an app its says the device has insufficient memory while the free space on the phone is 22gb. so right now I cant install anything
how can this be resolved?
thanks
Unfortunately, the free space available for media and other documents is not the same space available for installing apps in the system.
Basically, there are two different partitions: The System one (which the system can only use) and the User one (the one that you can use). Most phones have a unified partition, so that the system and the user partitions vary as needed.
Oppo thought it would be a good idea to set a limit on how big the system partition could be instead of using the much better unified layout, and this is where your problem lies: All the System space has been used up, and because of that limit, you're free space is inconsequential.
Oppo has promised a fix, but we'll see how long that takes.. In the meantime, check out LVM Repartitioning. It works really well!
BG64 said:
Unfortunately, the free space available for media and other documents is not the same space available for installing apps in the system.
Basically, there are two different partitions: The System one (which the system can only use) and the User one (the one that you can use). Most phones have a unified partition, so that the system and the user partitions vary as needed.
Oppo thought it would be a good idea to set a limit on how big the system partition could be instead of using the much better unified layout, and this is where your problem lies: All the System space has been used up, and because of that limit, you're free space is inconsequential.
Oppo has promised a fix, but we'll see how long that takes.. In the meantime, check out LVM Repartitioning. It works really well!
Click to expand...
Click to collapse
what is exactly the LVM Repartitioning and how do I solve the problem with it ?not so familiar with it
thanks again

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.

Android 11 - Removing system apps, is it still possible?

Heya all,
this is one of my first threads here. I recently got an Mi 10T Pro, and after rooting it, I tried to somehow de-bloat it. There's a lot of stuff that I either don't need, or downright don't want in my phone (I'm looking at you Facebook).
Some of the apps I was able to uninstall with a root-level uninstaller, however, as I found out, sometime since... Android 10? The whole /system partition is mounted RO, and apparently can no longer be remounted as RW, so some of the deeper system apps can no longer be so easily removed.
Yes, I know that removing system apps is a risk, don't bring it up, I wouldn't be rooting my phone if I wasn't also willing to tinker with it.
Is there still a way to remove the deeply seeded applications? (For example the "Mi Video" app that resides in /system/app/MiuiVideoPlayer/MiuiVideoPlayer.apk)
You could disable them with some of the debloating methods. You won't gain space on system partition, and it's not really recommended because system partitions today really don't like to be mounted rw because of dynamic partition scheme...
They can be uninstalled with this tool
https://forum.xda-developers.com/t/tool-xiaomi-adb-fastboot-tools.3887359/
calinorg said:
You could disable them with some of the debloating methods. You won't gain space on system partition, and it's not really recommended because system partitions today really don't like to be mounted rw because of dynamic partition scheme...
Click to expand...
Click to collapse
Huh, never heard of that. Is there someplace I could read up on the dynamic partitioning? I am familiar with the way Linux deals with disk partitions, and as that was the same way Android worked before, I am confused now.
nesoler said:
They can be uninstalled with this tool
https://forum.xda-developers.com/t/tool-xiaomi-adb-fastboot-tools.3887359/
Click to expand...
Click to collapse
Thanks! I'll check it out.
Aldenar said:
Huh, never heard of that. Is there someplace I could read up on the dynamic partitioning? I am familiar with the way Linux deals with disk partitions, and as that was the same way Android worked before, I am confused now.
Thanks! I'll check it out.
Click to expand...
Click to collapse
Dynamic Partitions | Android Open Source Project
source.android.com
Basically, dynamic partitioning allows oem to resize partitions as needed without messing up the system, but the downside is that twrp and non-dynamic apps see only one super partition, which contains other partitions inside. Newer twrp builds (3.5.0+ ) have support for dynamic partitions but it's still under development and there's much stuff to consider. Basically, if you make system partition rw and put a file inside, you change it's properties (and size), but in super partition system partition stays the same size and format, so basically you overwrite something, and things get out of hand
That's why only recommended way to change anything in system and other partitions is to make magisk script to do it, because magisk knows how to approach system and other partitions in a way that it won't kill everything...
calinorg said:
Dynamic Partitions | Android Open Source Project
source.android.com
Basically, dynamic partitioning allows oem to resize partitions as needed without messing up the system, but the downside is that twrp and non-dynamic apps see only one super partition, which contains other partitions inside. Newer twrp builds (3.5.0+ ) have support for dynamic partitions but it's still under development and there's much stuff to consider. Basically, if you make system partition rw and put a file inside, you change it's properties (and size), but in super partition system partition stays the same size and format, so basically you overwrite something, and things get out of hand
That's why only recommended way to change anything in system and other partitions is to make magisk script to do it, because magisk knows how to approach system and other partitions in a way that it won't kill everything...
Click to expand...
Click to collapse
Aaah. Yes, thank you for the explanation. It sounds kinda like LVM in Linux - One "Super" partition like a Volume Group with individual partitions like Logical Volumes, able to be dynamically resized, while leaving any of the free space to use for the other partitions.
Ah well, at least I managed to disable some of the apps. Turns out the Xiaomi ADB Tools only really called "pm uninstall --user 0 *package.name*", so nothing special.
Aldenar said:
Aaah. Yes, thank you for the explanation. It sounds kinda like LVM in Linux - One "Super" partition like a Volume Group with individual partitions like Logical Volumes, able to be dynamically resized, while leaving any of the free space to use for the other partitions.
Ah well, at least I managed to disable some of the apps. Turns out the Xiaomi ADB Tools only really called "pm uninstall --user 0 *package.name*", so nothing special.
Click to expand...
Click to collapse
Yes, something like LVM, but it keeps partitions in read-only state, to prevent users from modification. If you change even 1 byte, partition is flagged dirty and not even e2fsck couldn't fix it... basically, until we get proper tools with proper support, messing the partition layout in android is a big no-no...
Yes, XAT is just a frontend for pm uninstall, but it's easier than typing commands, and also it keeps a nice list of uninstalled apps, so you can re-enable them with one click...
cant disable using titanium backup either
paul999 said:
cant disable using titanium backup either
Click to expand...
Click to collapse
As far as I can see, disabling a system app is still possible. Just not uninstalling as that would require a writeable /system partition which currently, as pointed out above, isn't really possible. I even tried the Titanium Backup's exploit method, but didn't work either. App's still installed, albeit disabled.

Categories

Resources