• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

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

Search This thread

LunkHead

New member
Nov 12, 2020
2
0
Oh nice! I somehow missed that guide, thanks for linking it!

I did managed to un-bork the phone because I had missed the step to re-format all the partitions so all is well. And I'm leaving my post with all that in it as a permanent shrine to my shame and poor reading comprehension skills. =) And also, in case anyone else makes the same blunder I did.



The easiest thing to do is to go back to stock rom and start all over again, but this time in the right way.

.
 

ze7zez

Senior Member
Aug 24, 2012
2,711
1,326
Kraków
nz.geoview.info
I have same problem. I try back to stoch, but if I flast system img, so returt error: partition table doesn't exist

Any idea?

Try to fix or refresh the partition.

TWRP -> Wipe -> Advanced Wipe -> Check system -> Repair or Change File System -> Repair File System -> Swipe to Repair

If it doesn't help, then
TWRP -> Wipe -> Advanced Wipe -> Check system -> Repair or Change File System -> Change File System -> ( choose something different than you see in the description under "Mount Point /system") -> Swipe to Change

and then repeat this action by selecting EXT4:
TWRP -> Wipe -> Advanced Wipe -> Check system -> Repair or Change File System -> Change File System => EXT4 -> Swipe to Change

.
 

iniyanc1

New member
Nov 3, 2017
4
1
I used the latest TWRP 3.4.0 and after following the directions, I seemed to be stuck in a TWRP recovery bootloop after sideloading my ROM. TWRP said I had no OS installed and I couldn't even Power Off, it would just go back to TWRP.

However, I was able to press and hold the power button and volume down buttons in TWRP which rebooted my Nexus 4 and was able to boot into my system ROM normally.
 

PhilRoll

Member
Jan 5, 2016
25
3
Palermo
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
: mako_clamor_repartition.zip
Recovery: twrp-3.3.1-1_UA-mako.img

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


download links don't work! plz FIX it
 

Jack love

Member
Sep 23, 2020
6
0
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:
重新分区软件包
mako_clamor_repartition.zip
恢复twrp-3.3.1-1_UA-mako.img

学分:
特别感谢
- Unlegacy-Android团队;
- Sudokamikaze ;
- ddaggebi为8GB机型的布局;
- surfrock66他纪德为Nexus 5;

像往常一样,反馈是赞赏 :)

XDA:DevDB信息[/ PLAIN][/SIZE][/U][/B]
[SIZE=3][B]Google Nexus 4的Nexus 4分区,工具/实用程序[/B][/SIZE]

[B][U]贡献者[/U][/B]
[URL='https://forum.xda-developers.com/member.php?u=5424240']叫嚣[/URL],[URL='https://forum.xda-developers.com/member.php?u=7970097']sudokamikaze[/URL]
[B]源代码:[/B] [URL='https://github.com/clamor95/android_device_unlegacy_recovery']https [/URL][B]: [/B][URL='https://github.com/clamor95/android_device_unlegacy_recovery']//github.com/clamor95/android_device_unlegacy_recovery[/URL]


[B][U]版本信息[/U]
状态:[/B]稳定

[B]创建了[/B]2018-09-19
[B]上次更新时间[/B]2019-01-18
[/引用]
谢谢!but I want to know What's the pack tell me?i flashed,but nothing happened ,my English is bad,i really want a movie about it!!!😭😭😭
 

Jack love

Member
Sep 23, 2020
6
0
[QUOTE =“ ALEXIS_0071,帖子:81116275,成员:4358472”]
最好有人录制视频解释如何做,以便像我这样的新朋友得到指导
[/引用]
是!i need a movie to help!
 

aospray

Member
Feb 7, 2017
18
5
Can you please reupload files? Links are down
You can find clamor's repartition script here - https://drive.google.com/drive/folders/1sYrE8PtMy3L6ptWK-j0tHfjU8KTeyo1U

Filename is mako_clamor_repartition.zip. Links are by voron00.

===

Anyway, the main reason why I wanted to post here is I used this script with voron00's latest TWRP and had a problem with clamor's instructions.

I wanted to upgrade from LineageOS 15.1 to the latest version.

Before you attempt this, make sure you know how to use adb sideload from your PC to transfer your rom to the phone after wiping the data. If you don't have adb.exe on your PC, you'll need to install it from here: https://forum.xda-developers.com/t/tool-minimal-adb-and-fastboot-2-9-18.2317790/

Here's what worked for me:

1. Download mako_clamor_repartition.zip to your phone.
2. Flash voron00's latest TWRP recovery from here - https://drive.google.com/drive/folders/1uVfsBAtJC3GZ0Jo0TSy2EWU_CTUTSQwa. You can flash over the existing recovery with the official TWRP app and flashing with this file.
3. Boot into recovery
4. If you want to make a backup of your data, do so now and transfer the backup to your PC before proceeding!
5. Next, in TWRP, tap on "Install" and select mako_clamor_repartition.zip, which you downloaded to your phone in step 1, and flash it.
6. This is the part that was missing for me. In TWRP, go back to the main menu and tap "Advanced" and then "Terminal". Now, type modify and hit enter.
7. After the script is finished, the phone will reboot into recovery again.
8. Now, 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.
9. Time to install our rom. Make sure you connect your phone to the PC. Then, in TWRP, go to "Advanced" and "ADB Sideload". Now, from your PC, you'll need to open the command prompt. In the command prompt, go to the directory where adb.exe is installed. Also make sure you move your rom that you want to install to the same directory. Now type, adb sideload YOUR-ROM.zip and hit enter (replace YOUR-ROM.zip with the rom you want to install). If you need some help with ADB sideload, here's a guide - https://twrp.me/faq/ADBSideload.html.
9. After your rom is installed, in TWRP, reboot to system and your rom should be loaded.

Hopefully, I'm not missing anything.

Thanks to clamor for the script. Just upgraded from LineageOS 15.1 to 18.1 thanks to the hard work of voron00.

Can't believe this Nexus 4 can still run Android 11! Runs quite smoothly.
 
Last edited:
  • Like
Reactions: darethehair

alfa53

New member
Jun 8, 2008
2
0
Hello,
I have read everything carefully.
Unfortunately there is no working link for the ROM 18.1.
The last tutorial is great, and also thanks to all the preworkers who made it possible.
Currently I have only the 17.1 on it, but would also like to get the link for the 18.1 to have this preference.
Is there also an 18.1 for the nexus 5 and 7?
My englich is miserable, so the text was translated.
mfg
 

GolDRoger1

New member
Jul 24, 2021
1
0
Hi I read your pre post but my problem is: system and data not mount and " invalid argument error error16" and system & data do not repair or resize and change type
i Tried to unbrick method on first page it is not work for me
Pls guide me to i can repair my device @Clamor
Hello I found a way to solve this in a very simple and easy way, just connect the device to the PC with TWRP, go to advanced and look for sideload select the boxes of caches. then open a terminal where is the zip clamor repartition and do the following command:

adb devices (the terminal on the PC must recognize the device).

adb sideload (name of the clamor zip).zip and press enter.

it will install the repartition zip, when it does so go to the TWRP terminal and type stock and enter it will repartition to stock again, then just go to farmat data(yes), wipe advanced select all boxes and clear, partition solved.
 

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).