FORUMS
Remove All Ads from XDA

[REPARTITION] Nexus 5 Repartition [HAMMERHEAD] [16GB/32GB] [UA TWRP]

339 posts
Thanks Meter: 580
 
By Clamor, Senior Member on 19th September 2018, 09:41 AM
Post Reply Email Thread
Nexus 5 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 backup persist using terminal and dd comand and EFS 
# 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 ~1G 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 NOT to do anything by yourself. Write here for help, else you may do only worse.

Downloads:
Repartitioning package: hh_clamor_repartition.zip
Recovery: twrp-3.3.1-1_UA-hh.img

Credits:
Special thanks to
- Unlegacy-Android team;
- Sudokamikaze;
- surfrock66 for his gide for Nexus 5;

As usual, feedback is appreciated

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

Contributors
Clamor
Source Code: https://github.com/clamor95/android_...egacy_recovery


Version Information
Status: Stable

Created 2018-09-19
Last Updated 2019-01-18
The Following 41 Users Say Thank You to Clamor For This Useful Post: [ View ] Gift Clamor Ad-Free
 
 
19th September 2018, 09:41 AM |#2  
Clamor's Avatar
OP Senior Member
Flag Львів
Thanks Meter: 580
 
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.

HAMMERHEAD STOCK
Code:
25      192937984B    1266679807B   1073741824B                system
26      1266679808B   1298137087B   31457280B                  crypto
27      1298137088B   2032140287B   734003200B                 cache
HAMMERHEAD MODIFIED
Code:
25      192937984B    1803551231B   1610613248B                system
26      1803551232B   2065695231B   262144000B                 vendor
27      2065695232B   2097152511B   31457280B                  crypto
28      2097152512B   2306867711B   209715200B                 cache
4. Flashable resize zip for ROMs that support addon.d (automatic resize when dirty flashing updates).

5. To backup persist partition you need PC with installed adb. Boot your hammerhead in TWRP and plug to PC. Than use next commands.
Code:
adb root
adb shell
dd if=/dev/block/mmcblk0p16 of=/sdcard/persist.img
Than copy .img file from root of internal storage to your PC. Although, script doesn't affect that area, backup of this partition may help in case of any problems with mac address etc.
The Following 11 Users Say Thank You to Clamor For This Useful Post: [ View ] Gift Clamor Ad-Free
20th September 2018, 02:07 AM |#3  
Thank you for this zip!!! It works fine but I used nano package gapps for the face unlock but still does not work on LOS 15.1. Any suggestions
20th September 2018, 05:11 AM |#4  
Junior Member
Flag Navi Mumbai
Thanks Meter: 1
 
More
Vendor partition means support for treble.... Right?

---------- Post added at 04:11 AM ---------- Previous post was at 03:44 AM ----------

After flashing a ROM the system partition resizes back to 1009mb...
Can this be fixed?
20th September 2018, 05:52 AM |#5  
Clamor's Avatar
OP Senior Member
Flag Львів
Thanks Meter: 580
 
More
@sinkoo1979 try bigger gapps, alse, it may be Lineage problem.
@getrooted0019 you didn't read Installation part carefully, did you? You need to use resize option in TWRP to restore original size after flashing ROMs since they are build for 1G /system partition.
The Following 3 Users Say Thank You to Clamor For This Useful Post: [ View ] Gift Clamor Ad-Free
20th September 2018, 07:19 AM |#6  
getting a message in twrp "this is not a nexus 5" and won't let me switch back to stock.
20th September 2018, 08:16 AM |#7  
Clamor's Avatar
OP Senior Member
Flag Львів
Thanks Meter: 580
 
More
@sinkoo1979 send me your partition table in bytes
The Following User Says Thank You to Clamor For This Useful Post: [ View ] Gift Clamor Ad-Free
20th September 2018, 08:22 AM |#8  
Quote:
Originally Posted by Clamor

@sinkoo1979 send me your partition table in bytes

Data and vendor partitions in my nexus 5 are 0mb and not present. System showing about 1028mb while cache is on 29mb.
Thank you for your help but can't change the cache storage back to stock. Can't access the internal storage in TWRP. I think I corrupted my partitions on the nexus 5. Nexus 5 boots into TWRP but can't access nothing. Tried to flash different rom with OTG but bootloops. Can't flash stock because the cache partition is too small.
20th September 2018, 08:59 AM |#9  
Clamor's Avatar
OP Senior Member
Flag Львів
Thanks Meter: 580
 
More
@sinkoo1979 just stop. I'd ask you to create a telegram account and PM it to me here. I'll help you, just don't do anything
The Following User Says Thank You to Clamor For This Useful Post: [ View ] Gift Clamor Ad-Free
20th September 2018, 09:15 AM |#10  
Quote:
Originally Posted by Clamor

@sinkoo1979 just stop. I'd ask you to create a telegram account and PM it to me here. I'll help you, just don't do anything

Thank you for your help
20th September 2018, 10:34 AM |#11  
typow102's Avatar
Senior Member
Flag Grand Rapids
Thanks Meter: 50
 
More
This is fixable! I was a noob and didn't resize my system partition after flashing rom. Flashed the hh repartition to go back to stock in the ua twrp and got a bunch of errors. Then flashed stock recovery and tried again. This is not a Nexus 5 popped up. The backup file is inside the flashable zip. I just used adb shell and parted to execute the commands listed in backup and viola my Nexus 5 is back. So those freaking out that they messed up their phone...don't worry it's fixable just listen to Clamor. Anyone can pm me too if you need help.
Post Reply Subscribe to Thread

Tags
hammerhead, 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