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

Search This thread

alexandruvlad

Senior Member
Mar 10, 2010
527
22
Bucharest
@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.

Can you please describe what you mean by "resize" before flashing GApps?
I'm getting this error
Thanks in advance
 

Attachments

  • IMG_20181021_163616.jpg
    IMG_20181021_163616.jpg
    186.4 KB · Views: 613

bgoel4132

Senior Member
May 3, 2017
201
63
Delhi-NCR
@Clamor i noticed something that while flashing the repartition zip the modified twrp shows an error mounting /vendor that is why it is unable to use the repartition with modified twrp, but the repartition worked fine with normal twrp, i digged xda and found that vendor partition is meant for treble supported roms, and may be i was trying to flash it on stock rom that is why it was showing wrror but earlier when i used it with custom rom it worked fine does that mean those custom roms are intended to have treble support. earlier the twrp did ahow the error mounting vendor but it didn't refused to flash the package.
@Clamor i also had a issue going back to stock partition when i flashed the repartition again and format everything the only error i got is mounting vendor and afterwards my phone sucks i flahsed stock rom and it gave me a bootloop finally i had to go through the LGNPST method to get it back to life, but after that also with custom twrp it shows error mounting vendor and not flashing the repartition , so can you please explain what basically we had to do get back the stock rom back after repartition
 
Last edited:

Clamor

Senior Member
Sep 4, 2013
366
665
Львів
@bgoel4132 first about /vendor partition handle. It is possible to use standard TWRP with my repartition scheme in this case /vendor will be just hidden and there would be no opportunity to interact with it through TWRP interface. If UA TWRP is installed + repartition is made and you get error with mounting it, then just format it via Advanced wipe menu. On stock partition layout UA TWRP will give continuous error with unable to mount /vendor.

About stock. NO ONE MUST NOT FLASH PURE STOCK it is super bad idea. Never do that. Instead there are 3 solutions of stock flashing problem:
1. Backup your stock rom with TWRP (boot+system) and then restore it after repartition.
2. Unpack pure stock image and flash ONLY system image through fastboot mode.
3. Flash stock rom repacked for flash via TWRP (I'm Nexus 5 owner so I don't know if there are such roms for mako).

P.S. And remember don't do anything if you aren't certain in your actions. Check thread or ask, it is better than have more problems in future.
 

dnize

Member
Jan 17, 2012
5
0
My system storage is now increased to 1,5 GB. BUT ,now, while trying to flash gapps I still get error message 70 because of insufficient storage space. Any idea what could be missed? Thanks in advance!
 

jludt

Member
Aug 28, 2010
5
0
Any chance on some insight as to what my options might be for repartitioning a 16GB nexus 4 that I was trying to flash with pie. Trying to flash the mako_clamor zip and it's giving me "Failed to mount" errors which is pretty much what i'm getting when i try to do anything within TWRP.
 

TundraLK520

Senior Member
Apr 10, 2016
162
54
I'm getting unable to mount vendor errors. I went into mount section from twrp but can't select the vendor option, it allows me to select every other option just not vendor. Also part about missing updater script.
Update:
I downloaded the official twrp and tried again this time no vendor errors but it says missing updater script.

Final Update:
I can just say to read instructions carefully. I did the mistake of trying to repartition on UA twrp instead of official twrp which was giving me vendor errors. As for the updater script error, I re downloaded the repartition zip and it flashed successfully (make sure to tick system in mount options). Then it gave me directions to type modify in twrp terminal. Upon which it started the repartition and rebooted to recovery and the I flashed UA twrp and followed the procedure mentioned, don't worry about the mounting errors when wiping and then advanced wipe everything. Then flash ROM and after that resize through wipe section ticking the system option. Which results in error the first time and then do it again. This time no error. Now you can successfully flash gapps.
 
Last edited:
  • Like
Reactions: d_g_m_2000

pietls

Member
Mar 7, 2019
7
0
I had a Nexus 4 in the drawer and managed to put NitrogenOS on it that runs like a charm! But Gapps would not install. So i tried this method to resize System but after I tried resizing, I now have a Vendor partition of 0 Mb that stops all further actions and no resized system partition. Any suggestions?
Last update: Problem solved! I restored to an other ROM and started the procedure again. This time it worked and I installed Pie and GAPPS succesfully!
 
Last edited:

Burner2000

Senior Member
Mar 17, 2016
51
15
Hi,
Got a noob question. I hope this thread is the correct one.

Is 1.5G enough space to install Carbon 9.0 ROM along with Opengapps Micro Package (210MB zip file size)?

My previous experience with installing custom ROMs is limited to just flashing using TWRP. First time I am even thinking about required partition size for different packages etc.

Any help and/or responses would be appreciated greatly.

Regards,
- B
 

nitin.chobhe

Recognized Contributor
Jan 3, 2013
8,156
19,603
Pune
Hi,
Got a noob question. I hope this thread is the correct one.

Is 1.5G enough space to install Carbon 9.0 ROM along with Opengapps Micro Package (210MB zip file size)?

My previous experience with installing custom ROMs is limited to just flashing using TWRP. First time I am even thinking about required partition size for different packages etc.

Any help and/or responses would be appreciated greatly.

Regards,
- B
I guess that should be enough.

Nitin
 

Burner2000

Senior Member
Mar 17, 2016
51
15
Nitin,
Thanks for the reply man.

Yeah, I went ahead and used the script to repartition & installed latest Carbon ROM with Opengapps Arm Micro package. Seemed to work fine.

Thanks to OP for the script & also to Nitin for continuing to maintain newer ROMs for N4.
 
  • Like
Reactions: nitin.chobhe

track21

Member
May 19, 2011
12
5
Filadelfia (VV)
Hi, I've tried to download the partitioning zip many times, but the link doesn't work to me, is there any other link? thank you

---------- Post added at 10:20 AM ---------- Previous post was at 09:36 AM ----------

ok, done, thank you
 

Top Liked Posts

  • There are no posts matching your filters.
  • 39
    Nexus 4 Repartition​

    No one is responsible for your actions except yourself. Everything written further may potentially brick your device, although risk is reduced to minimum.

    This repartition package offers 1.5G /system; a /vendor partition and it is fully backward compatible with any ROM (including stock system.img).

    Known-issues
    HTML:
    - If repartition pack says that device isn't correct,
    than, if partition table wasn't modified before,
    congrats! your device has different memory chip
    that those I worked with. No worry, PM me and
    I'll add support for it.

    DO THE BACKUPs. Repartition will erase all your data
    USB connection to PC is MANDATORY else you will not have opportunity to push ROM to your device


    Installation

    HTML:
    # Before processing further we highly recommend you to use our TWRP which has support of EFS/Persist backup
    # Or you might lose your IMEI/WIFI + BT mac addresses
    
    # This mod is backwards compatible with any ROM so we highly recommend NOT to reverse it if repartition went well.
    # You should use ONLY recovery from this thread since other don't support all benefits of this mod.
    # When installing ROM just after you flashed zip and before installing GAPPs you MUST make a resize in TWRP since all roms are build for ~800M system.
    # To restore stock layout use same zip and steps as for repartition.
    
    1. Boot into recovery (You need to allow system partition modification to be able resize /system in recovery).
    2. Backup your data & Move your files from flash to your PC.
    3. Flash repartition pack zip.
    4. Do the actions asked by repartition pack (go to Terminal in ordinary recovery and input word that pack will tell you. Everything else will be done automatically).
    5. Phone will reboot into recovery.
    6. Install TWRP from below (it is build with support of new partitions layout and sizes. It can be differed from official TWRP by next format 3.x.x-1 UA).
    7. Format everything. (mount errors will not affect formatting!)
        - In TWRP: Wipe > Format data
        - Type yes
        - Once this completes go to: Wipe > Advanced Wipe
        - Tick all the boxes and wipe. There should be no further mount errors.
    8. Install ROM which you like.
    9. Enjoy better flash partition layout.

    If something gone wrong - we recommend you using this guide to restore your phone back

    Downloads:
    Repartitioning package
    : GitHub

    Credits:
    Special thanks to
    - Unlegacy-Android team;
    - Sudokamikaze;
    - ddaggebi for 8GB model layout;
    - surfrock66 for his gide for Nexus 5;

    As usual, feedback is appreciated :)

    XDA:DevDB Information
    Nexus 4 Repartition, Tool/Utility for the Google Nexus 4

    Contributors
    Clamor, sudokamikaze
    Source Code: https://github.com/clamor95/android_device_unlegacy_recovery


    Version Information
    Status:
    Stable

    Created 2018-09-19
    Last Updated 2019-01-18
    7
    Common issues and F. A. Q.

    Repartition pack should be safe for most devices. Common mistakes, issues and their solution will be published here.

    1. You shouldn't flash any internal parts of repartition pack (*.sh files) only flash whole zip using TWRP. You may use my scripts for personal use or projects but authorship should to be kept.

    2. If something isn't mounting after repartition try to format partitions that don't mount using Wipe -> Advanced Wipe in TWPR. Ideally you should format in that way all partitions in Advanced Wipe menu (see 5-th step of installation guide).

    3. To be sure that repartition went well I enclose loging zip. Flash it after repartition (when device reboots into TWRP). It won't modify anything only generates a partition.log in root of internal storage and outputs your current partition layout to screen. You shoud check if your layout is same as those fragments I provide under spoiler (file systems doesn't matter). If there are any differences you have to discribe what you did and enclose partition.log to your post.

    MAKO STOCK
    Code:
    21      159383552B    1040187391B   880803840B                 system
    22      1040187392B   1627389951B   587202560B                 cache

    MAKO MODIFIED
    Code:
    21      159383552B    1732247551B   1572864000B                system
    22      1732247552B   1994391551B   262144000B                 vendor
    23      1994391552B   2099249151B   104857600B                 cache
    4. If you have touchscreen problems use common instructions till you reach entering word. Than plug your phone to PC while you remain in recovery. Enter adb shell from cmd (if you don't know how - google) and enter word that repartition pack asked. Than your phone will reboot automatically into your old TWRP but with new partition layout.

    5. Flashable resize zip for ROMs that support addon.d (automatic resize when dirty flashing updates).
    5
    For those who downloaded repartition pack before this message is published, please redownload pack since previous version might have a problems with repartition. If repartition was already made, don't worry everything should be fine. Just use up-to-date pack.
    4
    @jluspo resize /system with TWRP after ROM install before GAPPs because ROMs are designed to use ~800MB system.

    @cqloveqc you had to format all partitions available in advanced wipe after repartition.
    4
    @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).
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone