A very bad situation I want to install the Lineage 16 OS on Nexus 5 Without apps it install Ok With google apps(I select pico package arm, wich is under 100 MB) not and give error system partition space not sufficient. This is the actual situation

Filesystem           1K-blocks      Used Available Use% Mounted on
tmpfs                   949772        28    949744   0% /dev
tmpfs                   949772        44    949728   0% /tmp
                      28061148    643132  27418016   2% /data
                      28061148    643132  27418016   2% /sdcard
                        706392     13084    693308   2% /cache
                       1045804    899652    146152  86% /system

I have tried a parted binary for resize but said ext4 is not supported! And with fdisk allow me to delete only the gpt partition(!) number 1 How to resize the partition n25 /dev/block/mmcblk0p25? My idea is to decrease sdcard of 2GB and increase system with 2GB is possible?

  • Have you tried to use parted instead of fdisk? It should support GPT parted disks. – Robert Aug 23 '19 at 14:52
  • 1
    parted and gdisk both work great with Android's GPT. I have used them in past to alter partition size. But never touch mmcblk0p1 or any other partition related to SoC or bootloaders. Your device will be bricked for sure. Another idea is to bind mount some loop file or external SD card partition e.g. on /system/app at very early stage of boot proccess. – Irfan Latif Aug 23 '19 at 18:42

I have follow this method,shrink data,and recreate system partition, is not too "kind" but works. Warning: this method is ok from a fresh installation from 0, you will loose all data, so follow it only if expert user, I'm not responsible for loose data,brick device,etc you are warned. You must have twrp installed, a usb connected smartphone and adb,fastboot on pc

a)Get parted and gdisk from here

b)Reboot in recovery mode

adb reboot recovery

c)Push gdisk and parted

adb push parted /
adb push gdisk /

d)With parted resize the data partition,in my case is 28 and we resize from 30G to 27G

    adb shell
    umount /data 
    parted /dev/block/mmc0blk0
    resizepart 28 27G

e)Now exit from parted and open gdisk

umount /system
gdisk  /dev/block/mmc0blk0
d #delete, select the system partition, in my case is 25
n #new,I select the new size of 3G for my system partition and 0700 as fsid
w #write

f)Now reopen with parted and rename the partition 25 as system

g)Reboot in recovery mode from twrp or adb

adb reboot recovery

h)The command fdisk -l /dev/block/mmc0blk0 must report correct sizes

i)Now create the ext4fs

make_ext4fs /dev/block/mmc0blk0p25

l)resize the fs

umount /system||echo ok
e2fsck -f /dev/block/mmcblk0p25
resize2fs /dev/block/mmcblk0p25

m)Eventually correct /etc/fstab the command mount /system must complete successfully. With twrp try to wipe the partitions data,system,etc the command must complete successfully.

m)Install android rom or recover from a backup.

n)I see my lineageos image resize automatically the partition to 1G(sic!) so I'm tryng this workaround

1)install lineage
2)reboot and wait for Android OS
3)reboot in twrp
4)then resize the partition as explained on l)
5)then install the other zips
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.