FORUMS
Remove All Ads from XDA

[REPARTITION] Nexus 7 (2013) Repartition [FLO/DEB] [16GB/32GB] [UA TWRP]

321 posts
Thanks Meter: 525
 
By Clamor, Senior Member on 19th September 2018, 09:21 AM
Post Reply Email Thread
Nexus 7 (2013) 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


Backup

# Before processing further we highly recommend you backup persist and EFS using adb
# Or you might lose your IMEI/WIFI + BT mac addresses

Code:
adb root
adb shell
dd if=/dev/block/mmcblk0p2 of=/sdcard/modemst1.img
dd if=/dev/block/mmcblk0p3 of=/sdcard/modemst2.img
dd if=/dev/block/mmcblk0p4 of=/sdcard/persist.img
Now you can find 3 *.img files at path /sdcard. Copy them to your PC since internal memory will be erased.


Installation
HTML Code:
# 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.
# Package is unified for flo and deb. 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. (Thanks @mr_rubbish for corrections in formatting).
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: flo-deb_clamor_repartition.zip
Recovery flo: twrp-3.2.3-1_UA-flo.img
Recovery deb: twrp-3.2.3-1_UA-deb.img

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

As usual, feedback is appreciated

XDA:DevDB Information
Nexus 7 (2013) Repartition, Tool/Utility for the Nexus 7 (2013)

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 34 Users Say Thank You to Clamor For This Useful Post: [ View ] Gift Clamor Ad-Free
 
 
19th September 2018, 09:21 AM |#2  
Clamor's Avatar
OP Senior Member
Flag Львів
Thanks Meter: 525
 
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. If you want 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 should 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 describe what you did and enclose partition.log to your post.


FLO/DEB STOCK
Code:
22      671088640B   1551892479B   880803840B                 system
23      1551892480B  2139095039B   587202560B                 cache
FLO/DEB MODIFIED
Code:
22      614429696B   2187293695B   1572864000B                system
23      2187293696B  2270167039B   82873344B                  cache
...
30      2348843008B  2610987007B   262144000B                 vendor
4. After flashing most ROMs system size will reduce to stock, you need to resize /system in TWRP or use flashable resize zip for ROMs that support addon.d (automatic resize when dirty flashing updates).

5. After returning to stock partition table you won't be able to get into the Recovery from the bootloader anymore, but when you start the tablet normally it goes straight in the Recovery. It is normal state. New partition table proposes larger /recovery size (16MB) while stock gives only 10MB. During restoring stock process, it is impossible to restore larger recovery backup into new smaller partition. Whether not to leave user without recovery excess, recovery backup restores into /boot partition. Just flash ordinary TWRP and install ROMs from it.

6. Don't install the zip file from the USB OTG. Copy them into the /sdcard. Else you will get message after flashing repartition pack.
Code:
"Can not extract updater-script. Do you have it in package?
Updating partition details...
...done"

The Following 9 Users Say Thank You to Clamor For This Useful Post: [ View ] Gift Clamor Ad-Free
19th September 2018, 11:42 AM |#3  
Member
Flag Clemson, SC
Thanks Meter: 43
 
More
Link not working for the repartitioning package...
19th September 2018, 11:59 AM |#4  
Clamor's Avatar
OP Senior Member
Flag Львів
Thanks Meter: 525
 
More
@rlw6534 should be fine now
19th September 2018, 12:28 PM |#5  
Member
Flag Clemson, SC
Thanks Meter: 43
 
More
Any chance you give details on backing up persist and EFS with dd command? I'm not really a noob but I also don't want to mess up my tab...
The Following User Says Thank You to rlw6534 For This Useful Post: [ View ] Gift rlw6534 Ad-Free
19th September 2018, 01:36 PM |#6  
Clamor's Avatar
OP Senior Member
Flag Львів
Thanks Meter: 525
 
More
@rlw6534 You actually should't brake anything. Added an instruction how to backup EFS and persist.
19th September 2018, 04:03 PM |#7  
Member
Flag Clemson, SC
Thanks Meter: 43
 
More
OK. Tried to flash on a clean, freshly wiped system (Flo 32G), all stock, ext4 on cache and Data, TWRP 3.2.3-0. Got the following:

******Applying dark magic******

This is not a Nexus 7 (2013)
Updater process ended with ERROR: 1
19th September 2018, 04:08 PM |#8  
MikiGry's Avatar
Senior Member
Thanks Meter: 350
 
More
How to restore files, that we copied from our tablet using dd command ? (I haven't done anything yet. Just asking)

Sent from my whyred using XDA Labs
19th September 2018, 04:56 PM |#9  
Clamor's Avatar
OP Senior Member
Flag Львів
Thanks Meter: 525
 
More
@rlw6534 your partition table was modified.
@MikiGry same commands, just switch paths.
The Following User Says Thank You to Clamor For This Useful Post: [ View ] Gift Clamor Ad-Free
19th September 2018, 05:10 PM |#10  
lollyjay's Avatar
Senior Member
Flag Fresno
Thanks Meter: 1,516
 
Donate to Me
More
Quote:
Originally Posted by Clamor

@rlw6534 your partition table was modified.
@MikiGry same commands, just switch paths.

Do you mean that despite this error message:

******Applying dark magic******

This is not a Nexus 7 (2013)
Updater process ended with ERROR: 1


The partition table has been modified correctly?
19th September 2018, 05:14 PM |#11  
Clamor's Avatar
OP Senior Member
Flag Львів
Thanks Meter: 525
 
More
@lollyjay No it wasnt. Package has 2 step security system. It checks if partition table was modified and in what way (by package itself, by user or it is stock). Second step is that package itself doesn't modify anything, it needs manual confirmation in terminal, else no changes will be applied.
The Following User Says Thank You to Clamor For This Useful Post: [ View ] Gift Clamor Ad-Free
Post Reply Subscribe to Thread

Tags
deb, flo, 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