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

Search This thread

_Raziel666

Senior Member
Jun 15, 2011
727
209
Athens
Yeah I can confirn that the mod is working fine, but not much use for it with stock! Maybe it's much more useful with an AOSP-based ROM...

Sent from my Nexus 10 using Tapatalk
 

Beaster

Senior Member
Feb 20, 2009
268
59
Khaon, I used this to free some storage and succesfully installed xposed, which i couldn't before probably due to low storage..

I appreciate the work you do for our device! :)
 

BurtonJFoley

Member
Jan 9, 2010
7
2
Similar problem with Nexus 4...

Thank you for an elegant solution for our Nexus 10!
I'm experiencing a similar problem when installing the stock gapps package on my nexus 4. (Insuffiencient space in the system partition)
Any idea if its a similar problem? Or if coiukd be addressed in a similar way?
 

Khaon

Senior Member
Apr 3, 2012
1,271
1,677
Louvain-la-Neuve, Belgium
Thank you for an elegant solution for our Nexus 10!
I'm experiencing a similar problem when installing the stock gapps package on my nexus 4. (Insuffiencient space in the system partition)
Any idea if its a similar problem? Or if coiukd be addressed in a similar way?


Sorry for the late reply.

I have built a static binary targeting generic arm v7. Therefore, I think, it should workon any device.

.
Can anyone using something else than manta confirms?this! ty.

Won't harm the device: either it succeds or fails :p
 
Last edited:

BurtonJFoley

Member
Jan 9, 2010
7
2
Sorry for the late reply.

I have built a static binary targeting generic arm v7. Therefore, I think, it should workon any device.

.
Can anyone using something else than manta confirms?this! ty.

Won't harm the device: either it succeds or fails :p
Much thanks! Will probably try over the weekend. I will respond as soon as I have feedback for you.
 

Khaon

Senior Member
Apr 3, 2012
1,271
1,677
Louvain-la-Neuve, Belgium
Thank you for an elegant solution for our Nexus 10!
I'm experiencing a similar problem when installing the stock gapps package on my nexus 4. (Insuffiencient space in the system partition)
Any idea if its a similar problem? Or if coiukd be addressed in a similar way?

Much thanks! Will probably try over the weekend. I will respond as soon as I have feedback for you.

Would be great to see the /tmp/recovery.log after having flashed this!
 

slixzen

Senior Member
Jan 9, 2010
382
17
Does this script also work for devices like the Nexus 5? I have a similar issue there, with the system partition being full after installing the factory image and being able to install SU.
 

Khaon

Senior Member
Apr 3, 2012
1,271
1,677
Louvain-la-Neuve, Belgium
Does this script also work for devices like the Nexus 5? I have a similar issue there, with the system partition being full after installing the factory image and being able to install SU.


I had target armv7 for resize2fs my script should work but you must enter the correct paths.
Eitherway wontblow your phone success or fail.

can you please give me /tmp/recovery.log? or just go to advanced.

thx
 
  • Like
Reactions: jesus_c

goldlocke

Senior Member
Jan 28, 2009
422
73
Vienna
...I have built a static binary targeting generic arm v7. Therefore, I think, it should workon any device.
.
Can anyone using something else than manta confirms?this! ty.
Won't harm the device: either it succeds or fails :p

@Khaon, I just tested on my old Galaxy Nexus (maguro) on a KK ROM. After replacing the updater-binary within your ZIP file, the script ran thru. log attached. Of course I did not see any changes on /system size, but just wanted to test basic run for you. Will try on the next LP flash as well...
 

Attachments

  • recovery.log
    19.6 KB · Views: 44

Khaon

Senior Member
Apr 3, 2012
1,271
1,677
Louvain-la-Neuve, Belgium
@Khaon, I just tested on my old Galaxy Nexus (maguro) on a KK ROM. After replacing the updater-binary within your ZIP file, the script ran thru. log attached. Of course I did not see any changes on /system size, but just wanted to test basic run for you. Will try on the next LP flash as well...

The path to the system partition is not correct, I have set up something more generic.

In your case just replace the path with the correct one:

Code:
/dev/block/platform/omap/omap_hsmmc.0/by-name/system

EDIT

Hm, have improved the script now checking for a system partition at
Code:
block0=/dev/block/platform/*/by-name/system;
and
Code:
block1=/dev/block/platform/*/*/by-name/system;
If there is a block device existing at one of those regex then it resizes the matching one.
 

Attachments

  • resize_generic_armv7.zip
    373.7 KB · Views: 222
Last edited:

Khaon

Senior Member
Apr 3, 2012
1,271
1,677
Louvain-la-Neuve, Belgium
@Khaon, I guess success...kindly find the new log attached

all seems ok indeed


*********************************************
* Manta: resize system partition patch *
*********************************************

about to run program [/sbin/sh] with 2 args
/dev/block/platform/*/by-name/system: No such file or directory
/dev/block/platform/omap/omap_hsmmc.0/by-name/system for system partition found!
resizing your system partition...
e2fsck 1.41.14 (22-Dec-2010)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/block/platform/omap/omap_hsmmc.0/by-name/system: 1310/41856 files (0.8% non-contiguous), 130349/167424 blocks
resize2fs 1.42.9 (28-Dec-2013)
The filesystem is already 167424 blocks long. Nothing to do!

e2fsck 1.41.14 (22-Dec-2010)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/block/platform/omap/omap_hsmmc.0/by-name/system: 1310/41856 files (0.8% non-contiguous), 130349/167424 blocks
Done!

*****************Resizing done!***************
 

Top Liked Posts

  • There are no posts matching your filters.
  • 36
    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.).

    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
    5
    Just reminding you, and thanks in advance! :good:

    This should resize your partition
    4
    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
    3
    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.
    3
    Yes, if your system partition is already 800MB in size then you're already using the whole block.
    Diskinfo reports always 800mb. It not reliable for this 'hehe

    Sent from my Xiaomi MI2s.