FORUMS
Remove All Ads from XDA

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

344 posts
Thanks Meter: 606
 
By Clamor, Senior Member on 19th September 2018, 09:59 AM
Post Reply Email Thread
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 Code:
- 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 Code:
# 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_...egacy_recovery


Version Information
Status: Stable

Created 2018-09-19
Last Updated 2019-01-18
The Following 31 Users Say Thank You to Clamor For This Useful Post: [ View ] Gift Clamor Ad-Free
19th September 2018, 09:59 AM |#2  
Clamor's Avatar
OP Senior Member
Flag Львів
Thanks Meter: 606
 
More
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).
The Following 6 Users Say Thank You to Clamor For This Useful Post: [ View ] Gift Clamor Ad-Free
19th September 2018, 01:34 PM |#3  
Senior Member
Flag Delhi-NCR
Thanks Meter: 64
 
More
actually the lower left corner of my phone screen doesnt work so can you please elaborate what kind of commands are we used to use and terminal and is there any other way to access terminal

mine q,a,z,1 these key are inaccessible in twrp as screen rotation is not supported
19th September 2018, 02:41 PM |#4  
Clamor's Avatar
OP Senior Member
Flag Львів
Thanks Meter: 606
 
More
Quote:
Originally Posted by bgoel4132

actually the lower left corner of my phone screen doesnt work so can you please elaborate what kind of commands are we used to use and terminal and is there any other way to access terminal

mine q,a,z,1 these key are inaccessible in twrp as screen rotation is not supported

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.
The Following 3 Users Say Thank You to Clamor For This Useful Post: [ View ] Gift Clamor Ad-Free
20th September 2018, 01:47 AM |#5  
ddaggebi's Avatar
Senior Member
Flag Seoul
Thanks Meter: 179
 
More
What can I do to add support for 8GB models? Can I send you some partition tables that you can tinker with? Or sth else? Anyway, huge thanks for your dedication for this device!
The Following 2 Users Say Thank You to ddaggebi For This Useful Post: [ View ] Gift ddaggebi Ad-Free
20th September 2018, 06:46 AM |#6  
Clamor's Avatar
OP Senior Member
Flag Львів
Thanks Meter: 606
 
More
Quote:
Originally Posted by ddaggebi

What can I do to add support for 8GB models? Can I send you some partition tables that you can tinker with? Or sth else? Anyway, huge thanks for your dedication for this device!

PM me, I need a partition table and I'd ask you to test if you have 8GB model.
The Following 3 Users Say Thank You to Clamor For This Useful Post: [ View ] Gift Clamor Ad-Free
20th September 2018, 06:52 PM |#7  
cyberon's Avatar
Senior Member
Thanks Meter: 435
 
More
Something went wrong and now I have only 552mb space. When I try to flash again it says it's not a Nexus 4.
Can anyone help please?
20th September 2018, 07:02 PM |#8  
Clamor's Avatar
OP Senior Member
Flag Львів
Thanks Meter: 606
 
More
Quote:
Originally Posted by cyberon

Something went wrong and now I have only 552mb space. When I try to flash again it says it's not a Nexus 4.
Can anyone help please?

Sure. In PM.
The Following 2 Users Say Thank You to Clamor For This Useful Post: [ View ] Gift Clamor Ad-Free
21st September 2018, 08:00 AM |#9  
Senior Member
Flag Clinton Twp
Thanks Meter: 14
 
More
OK so my nexus 4 can't transfer files to or from PC at all so if I do this and have the ROM downloaded it will wipe the ROM and the ROM would be gone and my phone would be a nice brick because I can't transfer any files to my PC like it charges with the PC but data transfer doesn't work so again would I be screwed?
21st September 2018, 09:38 AM |#10  
Clamor's Avatar
OP Senior Member
Flag Львів
Thanks Meter: 606
 
More
@Nathan4923 correct. Usb connection and PC are mandatory
The Following User Says Thank You to Clamor For This Useful Post: [ View ] Gift Clamor Ad-Free
21st September 2018, 07:01 PM |#11  
Clamor's Avatar
OP Senior Member
Flag Львів
Thanks Meter: 606
 
More
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.
The Following 5 Users Say Thank You to Clamor For This Useful Post: [ View ] Gift Clamor Ad-Free
Post Reply Subscribe to Thread

Tags
mako, repartition, twrp, unlegacy project

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes