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

Search This thread
Dec 3, 2015
5
2
Hm. I managed to get recovery to "Apply update". Command 'adb devices' then shows
Code:
> adb devices
List of devices attached
090a26b7        sideload

I tried sideloading Clamor again, but that doesn't help, even though the result is "Install completed with status 0."

I still cannot get adb shell to work because device is still unauthorized.

Code:
> adb devices
List of devices attached
090a26b7        unauthorized

I think I probably deleted by computer key from Nexus when I wiped all the storages and need to bring it back in. Is there a way to use Sideload to push my key in somehow so the tablet trusts me again?

Then I can probably do all the other steps to recover from failed repartitioning... :/
I ran in exactly the same issue.
The keys are not gone when wiping - you just have to "enable ADB" in advanced menu of the recovery tool when using the shell commands.
You probably did enable ADB the first time when repartitioning because in the instructions it is mentioned in step 2 under EFS/Persist Backup and stayed enabled for the next steps. Otherwise you would have gotten the unauthorized message before.
 
  • Like
Reactions: SGH-i200

extremko

Member
Nov 16, 2012
22
1
5
I ran in exactly the same issue.
The keys are not gone when wiping - you just have to "enable ADB" in advanced menu of the recovery tool when using the shell commands.
You probably did enable ADB the first time when repartitioning because in the instructions it is mentioned in step 2 under EFS/Persist Backup and stayed enabled for the next steps. Otherwise you would have gotten the unauthorized message before.
Thanks for the advice!
But it's all resolved a long time ago thanks to @k23m and his tool CROSS. Simply an epic piece of code. Immensely helpful.
 
  • Like
Reactions: SGH-i200

lelemka0

New member
Feb 1, 2017
4
1
I have a problem after repartitioning, I can't use reboot recovery to enter recovery in system or recovery, and can't select recovery mode in bootloader to enter recovery, they are all stuck in google screen.
I'm sure I've flashed the correct bootable recovery, I've tried fastboot boot FILENAME.img and got into twrp successfully.
The only way to get into recovery right now is to hold down the volume + and power keys while powered off.
This prevents me from using system updates properly. Can someone tell me what to do?

The current partition table is as follows.
Code:
~ # parted /dev/block/mmcblk0 unit b p quit
Model: MMC HBG4e (sd/mmc)
Disk /dev/block/mmcblk0: 31272730624B
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number  Start        End           Size          File system  Name      Flags
 1      67108864B    156745727B    89636864B     fat16        radio
 2      201326592B   204472319B    3145728B                   modemst1
 3      204472320B   207618047B    3145728B                   modemst2
 4      268435456B   283795455B    15360000B     ext4         persist
 5      335544320B   336343039B    798720B                    m9kefs1
 6      336343040B   337141759B    798720B                    m9kefs2
 7      402653184B   403451903B    798720B                    m9kefs3
 8      403451904B   406597631B    3145728B                   fsg
 9      469762048B   471298047B    1536000B                   sbl1
10      471298048B   472834047B    1536000B                   sbl2
11      472834048B   474931199B    2097152B                   sbl3
12      474931200B   480174079B    5242880B                   aboot
13      480174080B   480698367B    524288B                    rpm
14      536870912B   553648127B    16777216B                  boot
15      603979776B   604504063B    524288B                    tz
16      604504064B   604505087B    1024B                      pad
17      604505088B   606041087B    1536000B                   sbl2b
18      606041088B   608138239B    2097152B                   sbl3b
19      608138240B   613381119B    5242880B                   abootb
20      613381120B   613905407B    524288B                    rpmb
21      613905408B   614429695B    524288B                    tzb
22      614429696B   2187293695B   1572864000B   ext2         system
23      2187293696B  2263875583B   76581888B     ext4         cache
24      2263875584B  2264924159B   1048576B                   misc
25      2264924160B  2281701375B   16777216B                  recovery
26      2281701376B  2281709567B   8192B                      DDR
27      2281709568B  2281717759B   8192B                      ssd
28      2281717760B  2281718783B   1024B                      m9kefsc
29      2348810240B  2348843007B   32768B                     metadata
30      2348843008B  2610987007B   262144000B    ext2         vendor
31      2610987008B  31272713727B  28661726720B  ext4         userdata
 

eniac2000

Member
Jun 6, 2022
13
2
Hello together. I am new in the forum and I think I have a similar problem with my Nexus 7. I tried to update the tablet to LineageOS 18.1 with the manual of Lineage. While the process I got an Error in the Repartition part.
I powered off the tablet and on again but it could not boot. I can still enter the Fastboot Mode.
I had tried to do a factory reset but I get the Error: "Partion table doesn't exists"
Could you please help me to run LineageOS 18.1 on the tablet?
 

Altarentys

Member
May 8, 2022
12
1
Hi, it looks like loging zip doesn't exist anymore, where can I find it ? (got error 404 when i click the link in the OP)

edit: I don't need it anymore for now
 
Last edited:

bettzysdaddy

Senior Member
Jun 8, 2010
68
8
So I believe I repartitioned my 16GB Flo, but when I tried to install Lineage 18, it said "this is for flox, and this device is flo", so I'm wondering if I did anything wrong? I went ahead and flashed an unofficial Lineage 19 ROM because I didn't have an OS, so any help as to why official Lineage 18 for flox didn't recognize my tablet as repartitioned? Thank you
 

k0nki

New member
Oct 1, 2022
1
1
Hi,
I've started to update my valiant nexus7 2013 finally with success but not without fear...
I chose to install lineageos 18.1-20220926 by following the official guide from a linux terminal in root mode.

The first two repartitioning attempts failed and the third one finally succeeded.

I used the version of the script linked in the howto (flo-deb_clamor_repartition_20201203.zip).
Fortunately, the tablet remained in recovery lineage mode, which allowed me to retry the command: modify from the adb shell via: cancel then: apply from ADB on the tablet screen
The tablet did not restart automatically and I forced the recovery mode manually (Volume Down + Power)
Below is the capture of the linux terminal which seemed to indicate the success of the partitioning on the third attempt.

[email protected]:/home/konki# adb version Android Debug Bridge version 1.0.41 Version 28.0.2-debian Installed as /usr/lib/android-sdk/platform-tools/adb [email protected]:/home/konki# adb sideload /home/konki/flo-deb_clamor_repartition_20201203.zip Total xfer: 1.00x [email protected]:/home/konki# adb shell flox:/ # modify 2048+0 records in 2048+0 records out 1048576 bytes (1.0 M) copied, 0.104004 s, 10 M/s 20480+0 records in 20480+0 records out 10485760 bytes (10 M) copied, 0.295136 s, 34 M/s umount: /mnt/system: Invalid argument umount: /data: Invalid argument umount: /sdcard: Invalid argument GNU Parted 1.8.8.1.179-aef3 Using /dev/block/mmcblk0 Welcome to GNU Parted! Type 'help' to view a list of commands. (parted) rm 22 (parted) rm 23 (parted) rm 24 (parted) rm 25 (parted) rm 30 (parted) mkpart primary 614429696B 2187293695B (parted) name 22 system (parted) mkpart primary 2187293696B 2263875583B (parted) name 23 cache (parted) mkpart primary 2263875584B 2264924159B (parted) name 24 misc (parted) mkpart primary 2264924160B 2281701375B (parted) name 25 recovery (parted) mkpart primary 2348843008B 2610987007B (parted) name 30 vendor (parted) mkpart primary 2610987008B 31272713727B (parted) name 31 userdata (parted) quit Information: You may need to update /etc/fstab. mke2fs 1.45.4 (23-Sep-2019) The file /dev/block/mmcblk0p22 does not exist and no size was specified. mke2fs 1.45.4 (23-Sep-2019) The file /dev/block/mmcblk0p23 does not exist and no size was specified. mke2fs 1.45.4 (23-Sep-2019) The file /dev/block/mmcblk0p30 does not exist and no size was specified. mke2fs 1.45.4 (23-Sep-2019) The file /dev/block/mmcblk0p31 does not exist and no size was specified. 2048+0 records in 2048+0 records out 1048576 bytes (1.0 M) copied, 0.218750 s, 4.5 M/s 20480+0 records in 20480+0 records out 10485760 bytes (10 M) copied, 2.132935 s, 4.6 M/s 2/__________________________________________________________________________________ [email protected]:/home/konki# adb shell flox:/ # modify mkdir: '/tmp/backup': File exists 2048+0 records in 2048+0 records out 1048576 bytes (1.0 M) copied, 0.100219 s, 10 M/s 32768+0 records in 32768+0 records out 16777216 bytes (16 M) copied, 0.439942 s, 36 M/s umount: /mnt/system: Invalid argument umount: /data: Invalid argument umount: /sdcard: Invalid argument umount: /cache: Invalid argument /system/bin/modify[42]: parted: inaccessible or not found mke2fs 1.45.4 (23-Sep-2019) Discarding device blocks: done Creating filesystem with 384000 4k blocks and 96000 inodes Filesystem UUID: 0a4610db-74ad-4fa0-8375-1e0bcd1a19bc Superblock backups stored on blocks: 32768, 98304, 163840, 229376, 294912 Allocating group tables: done Writing inode tables: done Creating journal (8192 blocks): done Writing superblocks and filesystem accounting information: done mke2fs 1.45.4 (23-Sep-2019) Discarding device blocks: done Creating filesystem with 74784 1k blocks and 18720 inodes Filesystem UUID: a90ec884-cf8d-46ad-bafd-d017897d9050 Superblock backups stored on blocks: 8193, 24577, 40961, 57345, 73729 Allocating group tables: done Writing inode tables: done Creating journal (4096 blocks): done Writing superblocks and filesystem accounting information: done mke2fs 1.45.4 (23-Sep-2019) Discarding device blocks: done Creating filesystem with 256000 1k blocks and 64000 inodes Filesystem UUID: e6f4345f-4383-460d-8203-db2a8e7603f0 Superblock backups stored on blocks: 8193, 24577, 40961, 57345, 73729, 204801, 221185 Allocating group tables: done Writing inode tables: done Creating journal (4096 blocks): done Writing superblocks and filesystem accounting information: done mke2fs 1.45.4 (23-Sep-2019) Discarding device blocks: done Creating filesystem with 6997491 4k blocks and 1749664 inodes Filesystem UUID: 411c86ae-bb36-463c-8c3b-6da855173d88 Superblock backups stored on blocks: 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 4096000 Allocating group tables: done Writing inode tables: done Creating journal (32768 blocks): done Writing superblocks and filesystem accounting information: done 2048+0 records in 2048+0 records out 1048576 bytes (1.0 M) copied, 0.152008 s, 6.5 M/s 32768+0 records in 32768+0 records out 16777216 bytes (16 M) copied, 2.690246 s, 5.9 M/s rm: /sbin/parted: No such file or directory 3/_____________________________________________________________________________________________ [email protected]:/home/konki# adb shell flox:/ # modify mkdir: '/tmp/backup': File exists 2048+0 records in 2048+0 records out 1048576 bytes (1.0 M) copied, 0.108063 s, 9.2 M/s 32768+0 records in 32768+0 records out 16777216 bytes (16 M) copied, 0.446075 s, 36 M/s umount: /mnt/system: Invalid argument umount: /data: Invalid argument umount: /sdcard: Invalid argument umount: /cache: Invalid argument /system/bin/modify[42]: parted: inaccessible or not found mke2fs 1.45.4 (23-Sep-2019) /dev/block/mmcblk0p22 contains a ext4 file system created on Wed Sep 28 21:05:12 2022 Proceed anyway? (y,N) y Discarding device blocks: done Creating filesystem with 384000 4k blocks and 96000 inodes Filesystem UUID: 4ffdfb82-e79f-4be8-8efe-c8fdd21f8738 Superblock backups stored on blocks: 32768, 98304, 163840, 229376, 294912 Allocating group tables: done Writing inode tables: done Creating journal (8192 blocks): done Writing superblocks and filesystem accounting information: done mke2fs 1.45.4 (23-Sep-2019) /dev/block/mmcblk0p23 contains a ext4 file system created on Wed Sep 28 21:05:15 2022 Proceed anyway? (y,N) y Discarding device blocks: done Creating filesystem with 74784 1k blocks and 18720 inodes Filesystem UUID: c6bdbe47-cb2e-40df-bb99-de072f7e60e5 Superblock backups stored on blocks: 8193, 24577, 40961, 57345, 73729 Allocating group tables: done Writing inode tables: done Creating journal (4096 blocks): done Writing superblocks and filesystem accounting information: done mke2fs 1.45.4 (23-Sep-2019) /dev/block/mmcblk0p30 contains a ext4 file system created on Wed Sep 28 21:05:15 2022 Proceed anyway? (y,N) y Discarding device blocks: done Creating filesystem with 256000 1k blocks and 64000 inodes Filesystem UUID: 7a10e09f-472f-4ee6-9e37-db7811db5daa Superblock backups stored on blocks: 8193, 24577, 40961, 57345, 73729, 204801, 221185 Allocating group tables: done Writing inode tables: done Creating journal (4096 blocks): done Writing superblocks and filesystem accounting information: done mke2fs 1.45.4 (23-Sep-2019) /dev/block/mmcblk0p31 contains a ext4 file system created on Wed Sep 28 21:05:16 2022 Proceed anyway? (y,N) y Discarding device blocks: done Creating filesystem with 6997491 4k blocks and 1749664 inodes Filesystem UUID: d234b1a0-c3a7-42fe-9582-6fafb00aadfe Superblock backups stored on blocks: 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 4096000 Allocating group tables: done Writing inode tables: done Creating journal (32768 blocks): done Writing superblocks and filesystem accounting information: done 2048+0 records in 2048+0 records out 1048576 bytes (1.0 M) copied, 0.151215 s, 6.6 M/s 32768+0 records in 32768+0 records out 16777216 bytes (16 M) copied, 2.361572 s, 6.7 M/s rm: /sbin/parted: No such file or directory

The end of the installation was done without any error and as a reward the tablet is more fluid than under android 6.1

Thanks
Konki
 
  • Like
Reactions: SGH-i200

unclebob123abc

New member
Mar 27, 2023
2
0
Hi All, Is there support still available for this?
I am trying to go from Flo to Flox, but seem to be stuck.

I tried to sideload flo-deb_clamour_repartition.zip which went ok - used terminal to enter modified, went ok no errors.

Did the formatting. When I try and load Linage-18.1-20230301 i get an error - E304: This package is for device flox; this device is flo.

Any tips on where to look for whats gone wrong?


EDIT: I managed to get it working - formatting from the recovery image linked didnt seem to format correctly, found a different recovery from lineageos to format that that step has completed ok.
 
Last edited:

sh0nuff

Senior Member
A bit late to the game, just looking at updating my N7 Deb to Lineage 18/19/20 ... I saw there's a flash in the Cross thread that mentions a sysrepart-ultimate.zip file that ups the system to 4GB vs 1.5, is this not advisable seeing as this thread has more recent posts/comments?
 

Top Liked Posts

  • There are no posts matching your filters.
  • 80
    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:
    - 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:
    # 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 [user=7694808]@mr_rubbish[/user] 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
    : GitHub

    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_device_unlegacy_recovery


    Version Information
    Status:
    Stable

    Created 2018-09-19
    Last Updated 2019-01-18
    17
    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"
    15
    Flashable /system resize with addon.d support

    Here is a flashable zip that will resize the filesystem on /system back to the full partition size after a ROM install. It also includes an addon.d script that will allow upgrades/dirty flashes with persistent GAPPS and Magisk for ROMs with addon.d support (not UA). The addon.d simply resizes the filesystem before the other persistence scripts run. Note that this zip does not change or otherwise mess with the actual partition size - that needs to be performed prior to ROM installation with Clamor's script or other method.

    Simply flash after initial ROM installation. For ROMs without addon.d support (like UA), this script needs to be flashed every time before GAPPS reinstall. For ROMs with addon.d support, you only have to flash once. If you already have a ROM with addon.d support installed, flash this zip before the upgrade/dirty flash to add the addon.d script to /system.

    Thanks to Clamor for support and building the flashable zip!

    Tested on UA and AICP with multiple size GAPPS and Magisk but should work with any ROM...
    7
    Wiping partitions after resize.

    In case someone else gets the same problem as me, I thought I'd share what I did to complete the process successfully.

    -I pushed the repartition.zip file to the device and executed it with TWRP.
    -It completed and rebooted.
    -When i tried to wipe the partitions they all failed with a mount error. Tried multiple times, identical results.
    -Pushed LineageOS zip to device and attempted install. It finished with an Error 7. Essentially a complete failure to install. I think it was something about being unable to mount one of the partitions.

    How I fixed it
    - 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.


    However, I wonder if things might have been smoother if the instructions recommended installing the custom TWRP image as step 3, instead of towards the end of the process?
    Anyway, I hope that someone finds these instructions useful!
    4
    @L.F.B. that script is much simplier and offers less opportunities. For some device models (nexus 7 2013 for example) advanced solution is needed. Second is that I can't republish other devs work. Third is that repartition schemes are incompatible with each other and variety of them actually slows down further development. My current repartition for nexus 5 should have no problems.

    @lollyjay UA TWRP is needed to support /vendor partition. Sizes aren't that important for recovery, like for system image, although sizes of partitions are published in my device trees and can be cherry-picked.