FORUMS
Remove All Ads from XDA

[MOD][TWRP][RECOVERY] Reclaim the whole free space of your system partition

1,270 posts
Thanks Meter: 1,680
 
By Khaon, Senior Member on 13th February 2015, 08:42 AM
Post Reply Email Thread
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:

Quote:
Originally Posted by linux man page

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.).

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/0B9k...daU3R4Ujg/view


Credits :

@m11kkaa from whom I took the idea
The Following 36 Users Say Thank You to Khaon For This Useful Post: [ View ] Gift Khaon Ad-Free
 
 
14th February 2015, 12:15 AM |#2  
Senior Member
Thanks Meter: 340
 
Donate to Me
More
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?
14th February 2015, 12:49 AM |#3  
OP Senior Member
Flag Louvain-la-Neuve, Belgium
Thanks Meter: 1,680
 
Donate to Me
More
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
The Following 4 Users Say Thank You to Khaon For This Useful Post: [ View ] Gift Khaon Ad-Free
14th February 2015, 01:15 AM |#4  
Senior Member
Thanks Meter: 340
 
Donate to Me
More
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?
14th February 2015, 06:52 PM |#5  
Senior Member
Flag Minneapolis
Thanks Meter: 149
 
More
Which app do you use to see partition sizes? How can I see what it is vs what it should be? Thanks.
18th February 2015, 06:13 AM |#6  
OP Senior Member
Flag Louvain-la-Neuve, Belgium
Thanks Meter: 1,680
 
Donate to Me
More
Quote:
Originally Posted by CazeW

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?

Exactly.it corrects some internal ext4's variables that represents the size of fs to match the block's
Quote:
Originally Posted by lepa71

Which app do you use to see partition sizes? How can I see what it is vs what it should be? Thanks.

There are plenty out there . I use fx embedded filesystem's analysis
19th February 2015, 09:16 AM |#7  
Senior Member
Thanks Meter: 224
 
More
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?
19th February 2015, 11:02 AM |#8  
OP Senior Member
Flag Louvain-la-Neuve, Belgium
Thanks Meter: 1,680
 
Donate to Me
More
You are on aosp ?
19th February 2015, 01:12 PM |#9  
Senior Member
Thanks Meter: 224
 
More
Quote:
Originally Posted by Khaon

You are on aosp ?

Stock factory image + root, uninstalled Play Movies to make room for busybox
19th February 2015, 11:56 PM |#10  
Senior Member
Flag Minneapolis
Thanks Meter: 149
 
More
Do I need to do anything?
Attached Thumbnails
Click image for larger version

Name:	Screenshot_2015-02-19-17-41-17.png
Views:	3446
Size:	227.3 KB
ID:	3174274  
22nd February 2015, 11:13 AM |#11  
OP Senior Member
Flag Louvain-la-Neuve, Belgium
Thanks Meter: 1,680
 
Donate to Me
More
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/d....cls.partition

It will display the actual filesystem size .disk info display the size of your ssd

Sent from my nexus 10.
The Following 3 Users Say Thank You to Khaon For This Useful Post: [ View ] Gift Khaon Ad-Free
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes