For a while now I've been playing around with custom MTD partitions. I ran MIUI for several months with Caulkin's "stock" partition sizes (whatever the presets are that come with his mod) and then recently increased the size of my system partition (at the expense of some cache size) so that I could run a Sense 3.5 ROM. My questions are as follows:
A.) How does smaller/larger cache partition affect the overall performance of the system?
B.) If data partition size was to remain constant, would it behoove me to allot the excess internal space to my system partition or to my cache partition?
I have read that excess space on the system partition can increase ROM performance but I'm unclear as to whether sacrificing cache space for system space would be counter-productive...
Thanks in advance.
Anyone? Anyone? Bueller?...
Sent from my Pee-Cee Thirty-Six One-Hunnet
Last ditch effort at a bump. Sry.
Sent from my Pee-Cee Thirty-Six One-Hunnet
Is it possible change partition table to have more system size and less data size?
My device is S-ON.
Thanks.
You can only do this if you are S-OFF.
Hello,
many users complain that since lollipop their system partition size doesn't reflect the actual system of the block device. Therefore, they can not install some extra in this partition( busybox, big gapps packages,etc.).
This is due to the system image size specified when building the rom:
One of the parameter of your system partition(which has been hardcoded in some config file, I.e. BoardConfig) is its size, but if the block device(i.e. the part of your internal storage that will be mounted for the system partition)'s size that is mounted is larger than the system partition's size than you will loose some space.
TWRP has included this feature into their recovery from 2.8.7.0 and onwards ! You don't need to get my flashable package if you got a newer version than this.
Fortunately resize2fs executable allows to modify an ext2,ext3,ext4 partition size:
linux man page said:
The resize2fs program will resize ext2, ext3, or ext4 file systems. It can be used to enlarge or shrink an unmounted file system located on device. If the filesystem is mounted, it can be used to expand the size of the mounted filesystem, assuming the kernel supports on-line resizing. (As of this writing, the Linux 2.6 kernel supports on-line resize for filesystems mounted using ext3 only.).
Click to expand...
Click to collapse
This package simply resizes your system size to match the size of your block device size.
It does not alter your partitions table just reclaim the unmounted space.
Instructions:
Boot on a twrp 2.8.x.y TWRP recovery
flash the package
Download :
https://drive.google.com/file/d/0B9kxrJw-dzUmNG12QkdaU3R4Ujg/view
Credits :
@m11kkaa from whom I took the idea
Lets see if I understood this correctly. Currently in Lollipop the system partition is smaller than the block where the partition resides? And if the partition size doesn't match the block size, you will loose the remaining space on the block? The remaining space on the block is not available to any other partition?
That's correct. Your system partition is mounted with am 800 mb allocated space. Depending on your ROM ypou might loose some space.
Here I got 437 mb of free space .
Sent from my nexus 10
Tried it and my system partition went from 643.7MB to 787.9MB in size on Lollipopalooza. That definetily helps with installing gapps as last time I had to leave off quite a few apps to get it to fit. So just to make sure, this extra space isn't taken from any other partition? It just made the system partition use the unallocated free space on the block?
Which app do you use to see partition sizes? How can I see what it is vs what it should be? Thanks.
CazeW said:
Tried it and my system partition went from 643.7MB to 787.9MB in size on Lollipopalooza. That definetily helps with installing gapps as last time I had to leave off quite a few apps to get it to fit. So just to make sure, this extra space isn't taken from any other partition? It just made the system partition use the unallocated free space on the block?
Click to expand...
Click to collapse
Exactly.it corrects some internal ext4's variables that represents the size of fs to match the block's
lepa71 said:
Which app do you use to see partition sizes? How can I see what it is vs what it should be? Thanks.
Click to expand...
Click to collapse
There are plenty out there . I use fx embedded filesystem's analysis
Excellent! I have one more question. As we know, modifying the system partition means that otas will fail. So if before I had to uninstall say Play Movies to make room for busybox, then I'd have had to reinstall it if I wanted to flash an OTA. With this method, the md5 signature of system isn't altered, and therefore otas wont fail, right?
You are on aosp ?
Khaon said:
You are on aosp ?
Click to expand...
Click to collapse
Stock factory image + root, uninstalled Play Movies to make room for busybox
Do I need to do anything?
You used my mod right ?
Best way is either issue
df in a terminal console or install this app
https://play.google.com/store/apps/details?id=com.cls.partition
It will display the actual filesystem size .disk info display the size of your ssd
Sent from my nexus 10.
Khaon said:
You used my mod right ?
Best way is either issue
df in a terminal console or install this app
https://play.google.com/store/apps/details?id=com.cls.partition
It will display the actual filesystem size .disk info display the size of your ssd
Sent from my nexus 10.
Click to expand...
Click to collapse
Thank you very much for your mod.
I want to try it but I'm a little bit afraid. Do I lose any data? Will this affect the installation of other ROMs? I'm on stock now but I want to try some custom ROMs to decide. Do I have to use your mod every time I install a new ROM?
Thanks in advance!
You won't loose any data it will adjust the size of ext4 fs to the actual physical size of your partition.
Flashing a new lollipop ROM flashes a new system image which specifies the image size.
Our device system image size is defined here https://github.com/CyanogenMod/android_device_samsung_manta/blob/cm-12.0/BoardConfig.mk#L64
685768704 is 654 megabyte but your mmcblk0p8 partition mounted on /system is 800 mb.
Until this is fixed. Will open a ticket to increase this value but there are maybe few reason google chose 654.
And yes you must reflash it each to flash
Sent from my nexus 10.
If you replying to my question then I didn't do anything. I'm asking I should do it.
Is this only for CM based roms?
Thanks
Khaon said:
You used my mod right ?
Best way is either issue
df in a terminal console or install this app
https://play.google.com/store/apps/details?id=com.cls.partition
It will display the actual filesystem size .disk info display the size of your ssd
Sent from my nexus 10.
Click to expand...
Click to collapse
lepa71 said:
If you replying to my question then I didn't do anything. I'm asking I should do it.
Is this only for CM based roms?
Thanks
Click to expand...
Click to collapse
any roms
Khaon said:
any roms
Click to expand...
Click to collapse
I installed the app you said, but I didn't see any unclaimed space. Is your mod for stock ROM as well? I seem to have 644MB of space on the /system partition.
Sent from my Nexus 10 using Tapatalk
_Raziel666 said:
I installed the app you said, but I didn't see any unclaimed space. Is your mod for stock ROM as well? I seem to have 644MB of space on the /system partition.
Sent from my Nexus 10 using Tapatalk
Click to expand...
Click to collapse
Well the maximum space you system partition can get is 800mb. The system of je partition number 8.
Thus you are looking space.
The resizes just fixes that
Read this post.
http://forum.xda-developers.com/showthread.php?p=59016220
Sent from my Xiaomi MI2s.
So mine shows 800 for system partition. Does this mean I don't have to do anything? Thanks
Khaon said:
You used my mod right ?
Best way is either issue
df in a terminal console or install this app
https://play.google.com/store/apps/details?id=com.cls.partition
It will display the actual filesystem size .disk info display the size of your ssd
Sent from my nexus 10.
Click to expand...
Click to collapse
Don't use disk info but rather one of tje two over here.
Sent from my Xiaomi MI2s.
lepa71 said:
So mine shows 800 for system partition. Does this mean I don't have to do anything? Thanks
Click to expand...
Click to collapse
Yes, if your system partition is already 800MB in size then you're already using the whole block.
I have a brand new G3 (D852) with Koodo that I just got 2 days ago. I've rooted, installed TWRP and flashed a few AOSP roms. Not a fan of any manufacturer UI, even though LG's is very minimal, so AOSP it is. I noticed that my system partition has more than 1GB of free space after everything is flashed and good to go. I also noticed that the latest TWRP (2.8.7.0) has a resize partition option inside the Wipe section. What I want to know is, how can I use this to resize the system and data partitions so that 1GB+ isn't being wasted and unused. I'd really like to get that 1GB+ added to my data partition for apps.
I've tried using it. The only time it didn't spit out an error was after I wiped the system partition. It succeeded in "resizing" it after that, but it didn't change anything. The system partition remained the same size.
ToYeD said:
I have a brand new G3 (D852) with Koodo that I just got 2 days ago. I've rooted, installed TWRP and flashed a few AOSP roms. Not a fan of any manufacturer UI, even though LG's is very minimal, so AOSP it is. I noticed that my system partition has more than 1GB of free space after everything is flashed and good to go. I also noticed that the latest TWRP (2.8.7.0) has a resize partition option inside the Wipe section. What I want to know is, how can I use this to resize the system and data partitions so that 1GB+ isn't being wasted and unused. I'd really like to get that 1GB+ added to my data partition for apps.
I've tried using it. The only time it didn't spit out an error was after I wiped the system partition. It succeeded in "resizing" it after that, but it didn't change anything. The system partition remained the same size.
Click to expand...
Click to collapse
This it why the option is there:
resize2fs feature: On some devices like the Nexus 6, the factory images include a userdata image that is the proper size only for the 32GB units. If you flash the factory image to a 64GB Nexus 6, the data partition will appear as if it only has the free space of a 32GB device. Using the resize2fs option, TWRP can resize your data partition to take up the full space available. The resize2fs may also be useful to resize system partitions on devices where custom ROM system images don’t take up the full partition space. Lastly, resize2fs may be useful in some cases to reserve the proper space at the end of a data partition for a full disk encryption key, should your partition be formatted incorrectly for some reason.
jeffrey268 said:
This it why the option is there:
resize2fs feature: On some devices like the Nexus 6, the factory images include a userdata image that is the proper size only for the 32GB units. If you flash the factory image to a 64GB Nexus 6, the data partition will appear as if it only has the free space of a 32GB device. Using the resize2fs option, TWRP can resize your data partition to take up the full space available. The resize2fs may also be useful to resize system partitions on devices where custom ROM system images don’t take up the full partition space. Lastly, resize2fs may be useful in some cases to reserve the proper space at the end of a data partition for a full disk encryption key, should your partition be formatted incorrectly for some reason.
Click to expand...
Click to collapse
Thank you for the reply
If I understand you correctly, the feature's original intent is to resize /data partitions in the event the rom/system image treats a larger storage capacity device as a lower capacity one, ie. 64GB device is treated like 32GB so /data will only reflect 32GB minus (system image install size), wasting 32GB and leaving it inaccessible to the user.
However, it also seemed like you were saying I also could use it to resize my /system partition to a smaller size so CM12.1 (with it's ~900MB install size after Full TK-Gapps) will only leave ~50MB to ~100MB on /system instead of ~1.5GB. However, the question remains. How do I do this and can I reallocate the ~1.5GB to the /data partition for apps and internal storage? If this can't be done then I see no point in resizing /system to begin with as it will still be inaccessible to me as the user.
ToYeD said:
Thank you for the reply
If I understand you correctly, the feature's original intent is to resize /data partitions in the event the rom/system image treats a larger storage capacity device as a lower capacity one, ie. 64GB device is treated like 32GB so /data will only reflect 32GB minus (system image install size), wasting 32GB and leaving it inaccessible to the user.
However, it also seemed like you were saying I also could use it to resize my /system partition to a smaller size so CM12.1 (with it's ~900MB install size after Full TK-Gapps) will only leave ~50MB to ~100MB on /system instead of ~1.5GB. However, the question remains. How do I do this and can I reallocate the ~1.5GB to the /data partition for apps and internal storage? If this can't be done then I see no point in resizing /system to begin with as it will still be inaccessible to me as the user.
Click to expand...
Click to collapse
I read a few things online and it seems you need aan unlocked bootlader, the G3 bootloader is not unlockable, so you are probily out of luck maby you can ask in the Q&A thread of the rom you are using.
hi, with the new marshmallow roms we have very few available system space, in my phone i have 96mb after gapps and xposed, but we have a huge cache partition, 800mb of wich i am using only 26mb, 800 is kind of a waste, even the nexus 6 has a 260mb cache partition, is there any way to resize the cache partition to like 200mb and use the rest for the system? 600mb more to the system will help us with future and heavier updates