[GUIDE] Increase your Nexus 4's system partition for more space!

Gibson295

Member
Apr 25, 2019
14
0
0
will this work with Clockword recover mod v6.0 cause thats what i have ;o

I keep receiving an error when trying to do the step
./parted /dev/block/mmcblk0 p

it just gives me ./parted: line 1: syntax error: unexpected "("
~ #

no clue what to do here next.
Nexus 4
 
Last edited:

soor-si

New member
Jul 4, 2017
1
0
0
I couldn't find an answer on the forum, so I hope someone can help me with something...

I have increased the system partition on my Nexus 4 16Gb, but now I would like to flash an Ubuntu Touch ROM, but I can't.
The problem is that the partition size has to be like it was. How to make the reverse procedure, to get old partition sizes back?
 

simodepa97

New member
Sep 27, 2014
1
0
0
23
I used this guide to recreate system and data partition after they were accidentally canceled by a script. Only thing that doesn't work is mounting the new partitions, because there are no such /system nor /data directories. So I tried to create them but there's a conflict with /system and /data files that are already in place. What to do? Thanks.
 

derern

Member
Nov 8, 2014
13
4
23
51
www.facebook.com
Hi all,

tried to breathe some new life into my N4 which required the repartition. N4 sports TWRP 3.4.0-0. Managed to work along the script just fine and also can see that the GPT seems to be fine afterwards indicating the intended sizes and names for /system and /cache.

Trouble now is that I can't mount /system anymore - neither in shell nor in TWRP (after a restart as well).

Any ideas what could be the culprit here?

Edit: Okay, this is rather embarassing. Turns out I didn't restart TWRP properly after the process. Classic "Did you try to switch it off and on again did it"

Maybe for anybody else to avoid the culprit: If you click on Reboot --> Recovery in TWRP and are instantly greeted with the TWRP homescreen, it didn't restart. Forcing a shutdown via Power and then going to TWRP helped for me.
 
Last edited:

Luihart

New member
Jan 19, 2020
1
0
1
Hi all,

tried to breathe some new life into my N4 which required the repartition. N4 sports TWRP 3.4.0-0. Managed to work along the script just fine and also can see that the GPT seems to be fine afterwards indicating the intended sizes and names for /system and /cache.

Trouble now is that I can't mount /system anymore - neither in shell nor in TWRP (after a restart as well).

Any ideas what could be the culprit here?

Edit: Okay, this is rather embarassing. Turns out I didn't restart TWRP properly after the process. Classic "Did you try to switch it off and on again did it"

Maybe for anybody else to avoid the culprit: If you click on Reboot --> Recovery in TWRP and are instantly greeted with the TWRP homescreen, it didn't restart. Forcing a shutdown via Power and then going to TWRP helped for me.
I have the same Problem. It cant mount system. I cant wipe anything, even restore failed. Need Help. How can I Reset it now? In ADB Shell it still Shows ext4 21 System with 880mb
 

Tractor555

New member
Jan 26, 2021
1
0
1
@Luihart and @derern I had a similar problem with my N4 (I increased the partition size as per the instructions on the first page, and was able to install Lineage OS17.1 and Gapps OK. However the phone was really unstable and the System UI kept crashing) so I reverted the N4 to how it was. I basically revered the key resizing steps on the first page restoring the size and format of partitions 21 and 22. That seemed OK (with plenty of cache & data wipes and reboots). However, I was still having problems with running the stock OS or UBPorts. I then stumbled on a post which mentioned that the reformat to ext2 of the parted tool used on this instructionisn't very good so the N4 needs to have this redone using fastboot format system .Note that this also initially failed (connected on Linux computer) until I replaced the android-developer-tools form Ubuntu repository with the ones downloaded from https://developer.android.com/studio/releases/platform-tools. There is hope to restore Nexus 4 to how it was and my phone is now happily running UBPorts Touch again.
 

Malk4ever

Senior Member
Oct 18, 2012
237
48
58
Trantor
I got tired of installing amazing ROMs created by the talented folks here on XDA, but being held back on things like Google Apps because of the tiny /system partition we have on the Nexus 4. I looked around and found guides to increase the system space in the Nexus 5 and Nexus 7 2013, so I basically just adapted them to work on our beloved Nexus 4.
Thank you very much!
This is exactly what I was looking for, and it worked like a charm. Still I need to use nano GAPPS on Lineage 17.1, but without change i wasnt able to install it at all (not even when excluding most things).