[REPARTITION] Nexus 4 Repartition [MAKO] [8GB/16GB] [UA TWRP]

Mato_xXx

Member
Apr 25, 2012
32
2
0
Nove Mesto nad Vahom
@Clamor please add warning to 1. post about that you need to allow system partition modification to be able resize /system in recovery. Because that was causing my problem because I couldn't find that till I tried... This could save some time for n00bs as me. :D Installed ROM after maybe 3 years and forget almost everithing...
 

bgoel4132

Senior Member
May 3, 2017
201
63
0
Delhi-NCR
How to back stock partition?
dont flash factory image with different partition it will brick your device and you would have to use lgnpst method to fix it
Read the OP carefully it had already mention that you would have to do the same steps to repartition the system to stock

---------- Post added at 03:44 PM ---------- Previous post was at 03:42 PM ----------

directly install the factory image or without the need to unbrick on page one?
don't flash factory image directly buddy it will brick your device

i believe one should not give advice without knowing its consequences akhilesh

buddy i had already done this mistake and got a hard time up fixing that
 
Last edited:
  • Like
Reactions: rhmt1210

Clamor

Senior Member
Sep 4, 2013
363
654
133
Львів
@bgoel4132 @rhmt1210 @Akhilesh S V first of all flashing factory img won't return stock partition table as it doesn't have one included, ONLY my repartition pack has capability to return stock layout (if you don't know how to work with parted of course). Second is that factory img can't be flashed as is, BUT as a img collection it can be flashed with fastboot (excluding cache and data since they won't flash anyway).
 
Last edited:

rhmt1210

Member
Sep 21, 2018
30
6
0
@[email protected]@Akhilesh S V first of all flashing factory won't return stock partition table as it doesn't have one included, ONLY my repartition pack has capability to return stock layout (if you don't know how to work with parted of course). Second is that factory img can't be flashed as is, BUT as a img collection it can be flashed with fastboot (excluding cache and data since they won't flash anyway).
so I have to reinstall the zip to return to stock?
 

rhmt1210

Member
Sep 21, 2018
30
6
0
@rhmt1210 repartition pack, yes. It will return you to stock (don't forget to enable /system modifications in TWRP before returning to stock).

P.S. As I said in first post returning to stock is VERY non-recommended, but if you need go ahead.
I want to install kitkat odex rom, do I have to change the system size?
 

Sam Nakamura

Retired Forum Moderator
Dec 7, 2015
5,476
4,530
113
Landshut (Ndb.)
Well, I got a stupid situation here, even though I'm on official lineageOS I wanted to re-partition the table to be able to flash nano GApps, it all went smoothly along the explanations outlined in post #1, however after flashing the latest lineageOS build and returning to TWRP's advanced wipe section to change partition size of /system before flashing the bigger then usual nano GApps, which works perfectly as after the procedure checking /system size it's notably larger but still the open GApps installer aborts installation because package exceeds the partition size, which does not make sense by checking & judging from the numbers TWRP provides...

Would appreciate any help, I ran the logging tool and would want to share it, just didn't found where it's stored yet - I of course did try it several times by wiping all installed partitions (even formated all partitions individually as suggested), then flashing ROM and resize /system before doing so, still GApps aborts the option...

Edit: also using version 2 of the re-partition script!
So I can't figure out what I'm doing wrong here, only thing I did was restoring data from my previous old partitioned backup, may this be responsible for breaking the whole process?

Haha, right after posting here I saw that I unintentionally also copied a "open gapps" folder to the internal storage that had instructions to just perform a test installation / space calculation, deleted the folder and all is functional and fine, sorry for bothering, it's definitely on my side and your procedure is super easy and brilliant!

Thanks for the work, the sharing and supporting...

@rhmt1210 no, this layout is fully compatible with any custom ROM, just resize system after ROM flash before GAPPs install
 
Last edited:

Sam Nakamura

Retired Forum Moderator
Dec 7, 2015
5,476
4,530
113
Landshut (Ndb.)
@Sam Nakamura log is copied by path /sdcard. What do you mean by "version 2 of the re-partition script"? There is only one version, attached to download section.
I mean the script was re-uploaded also OP mentioned that it was replaced by slightly updated version and people should re-download if downloaded before this specific announcement from you but you're right, there aren't flowing around 2 different versions - not in this sense...

Even though all worked just fine in the end here's my log:

https://drive.google.com/file/d/1P3fE-Rj-TprS1ptKTxqfq_lQbhnQG5fU/view?usp=drivesdk

Sent from my Nexus 4 using XDA Labs
 

Sam Nakamura

Retired Forum Moderator
Dec 7, 2015
5,476
4,530
113
Landshut (Ndb.)
@Sam Nakamura partition log is clean, as it should be anyway. Problems you are facing aren't connected with your current partition layout. You should use UA TWRP, try to redownload gapps, reboot recovery -> recovery before resize etc.
Yeah, all fine here and no issues...

I just made the stupid mistake that I copied an open GApps folder to the empty device after formatting internal storage, so the GApps folder interfered with the installation without me noticing it, well I did notice it only after posting here - sorry for the trouble, was pure user error!

Sent from my OnePlus5T using XDA Labs