yashsingh1/xdaforums huggingface dataset:
[Nexus 7 (2013) Original Android Development] sobokuone:
Ok I think I forgot step 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). however everything seems ok I did install a lineage-16.0-20190505-UNOFFICIAL-flo.zip rom and gapps and all is working fine but just wanted make sure all is right. Here is the output of the partition log.

Model: MMC MMC16G (sd/mmc)

Disk /dev/block/mmcblk0: 15468593152B

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 ext4 vendor

31 2610987008B 15468576255B 12857589248B ext4 userdata
[Nexus 7 (2013) Original Android Development] Clamor:
[MENTION=6037644]sobokuone[/MENTION] all is right
[Nexus 7 (2013) Original Android Development] mishko77:
How to revert

Hi

I wanted to go back to stock android image to be able to watch Netflix in hd on my flo so I executed your script again on modified device. I entered 'stock' on terminal and it executed successfully. After flashing standard twrp and flashing stock ROM, I'm stuck on Google logo. The whole reverse process went smoothly with no errors. I had formatted and resized partitions afterwards. Every partition (after reverse) is mountable. Other ROMs as Lineage 14 work fine. Is there a way to go back to stock now? I did not backup the files you mentioned in backup section. So is it possible without it?

Thanks in advance
[Nexus 7 (2013) Original Android Development] Clamor:
[MENTION=5331342]mishko77[/MENTION] first of all you could just flash any 6.0 custom rom without reverting partitioning. Oh, well. Take a partition log and send me in PM.
[Nexus 7 (2013) Original Android Development] tako2k:
twrp-3.3.0-0-deb

There is a new twrp-3.3.0-0-deb out. Is it planned, to change this new release to the repartition version?

Best regards
[Nexus 7 (2013) Original Android Development] flohwie:
The script perfectly worked for me (Nexus 2013 WiFi -flo ) using the offcial TWRP 3.3.0 version!
[Nexus 7 (2013) Original Android Development] nocaldawg:
Big Time Thank You!!!!

I thought I was almost done flashing pie on my N7 2013 and then GAPPS failed to install. This thread made it easy for me to re-partition and get the ROM and GAPPS onto my tablet. Pretty sweet to be rolling pie on such an old tablet.....A new lease on its life!

Thanks much!
[Nexus 7 (2013) Original Android Development] tako2k:
That's right, but with the 3.3.0.0 my Nexus 7 deb makes backup errors with the repartioned unit. With the special twrp-3.2.3-1_UA-deb.img the backups are working well.
[Nexus 7 (2013) Original Android Development] flohwie:
I did not experience backup errors with 3.3.0.0 on flo.
[Nexus 7 (2013) Original Android Development] sushiboba:
Dude that doesn't make any sense... mini is much bigger size than pico. mini is over 340MB whereas pico is 94MB... and we have to partition to be able to even install the small gapps.

---------- Post added at 09:29 AM ---------- Previous post was at 09:14 AM ----------

Honestly there should be a big fat warning of not using USB OTG for the zip installation.... not later under FAQ. Also you should mention to type "modify" under the TWRP Terminal

Also tablet reboots to TWRP after step 5, so you actually have to go back to bootloader to flash the new TWRP...

I don't think the instructions are completely newbie friendly... I got it to work though. So there is no way around installing gapps without partitioning? Also, if you don't have USB-OTG, you'd have to push the rom via TWRP?
[Nexus 7 (2013) Original Android Development] tako2k:
With the 3.3.0.0 in backup I only see 4 partition and the error message when the backup runs. With the special twrp I see 7 partition in the backup and no error message when backup is running.

So I think, when the repartition is on the Nexus 7 deb, we have to use the special twrp.
[Nexus 7 (2013) Original Android Development] chrisg4493:
PROBLEM SOLVED**

So, I think I may have bricked* my N7....I followed the steps exactly and couldn't get system or data to mount, wiped them and system mounted but data still didn't. So I flashed the partition zip again using usb otg, reverted back to stock partition, and TWRP booted up. Flashed the partition zip again, same problem, did the same process going back to stock partition, now I am stuck on google screen and cant get it to be recognized by PC on the bootloader, anything i can do to fix this?

*update- got fastboot to connect and re-flashed TWRP 3.0.2-0, so not bricked thankfully. But i still cant for the life of me figure out this partition tool, No matter what I do i cant get data to mount and when i select storage in TWRP is shows internal storage as 0MB. what am i doing wrong here?!?

** update 2(fixed) So got it to work , got lineage 16.0 and Gapps both to install. Heres what I did in case someone else has the same issue. I went back to stock 6.0.1 android, flashed the partition zip and ran it following the instructions. after partition finished, I formatted data, then went into advanced wipe and formatted each box one at a time. Then went back into wipe>advanced wipe> checked off system and tapped repair or change file system then tap resize file system, this wasn't mentioned in the original instructions. Then flashed the custom TWRP and installed gapps. Everything is running smoothly as far as I tell so far!
[Nexus 7 (2013) Original Android Development] katsooba:
hi,

on nexus 7 flo with 32 gb

did as op instructed but now my device is stuck on a bootloop with the following screen

please help
[Nexus 7 (2013) Original Android Development] Clamor:
[MENTION=3615070]katsooba[/MENTION] you didn't. Check step 7 in installation guide.
[Nexus 7 (2013) Original Android Development] katsooba:
Thank you!

had to use wugfresh in order to install stock rom and continued from there
[Nexus 7 (2013) Original Android Development] julla0:
Can you help me,

i can't install opengapps, insufficient space.

Thx

I think this is the problem: "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)."

When should i do that?
[Nexus 7 (2013) Original Android Development] Clamor:
3.3.1-1 UA TWRP is already build, but I can't upload them in this thread.

[MENTION=8771596]julla0[/MENTION] before Gapps
[Nexus 7 (2013) Original Android Development] julla0:
Is the Lineage os 16 rom compatible with the resize.zip?
[Nexus 7 (2013) Original Android Development] scontin:
Why?

Where we can download?

Best regards.
[Nexus 7 (2013) Original Android Development] mr_rubbish:
Woohoo! I'm famous!
[Nexus 7 (2013) Original Android Development] RafaBronX®:
Link is broken, can someone tell me where can I download it by now?
[Nexus 7 (2013) Original Android Development] fluther:
Many thanks to [MENTION=5424240]Clamor[/MENTION] for all this great work.

I'm having trouble with 3.3.1-1 UA TWRP and Pie encryption however (with [MENTION=6005084]ripee[/MENTION]'s unofficial LOS 16 build). Does the custom TWRP not support Pie encryption?

Many thanks.

---------- Post added at 21:20 ---------- Previous post was at 21:19 ----------

Many thanks to [MENTION=5424240]Clamor[/MENTION] for all this great work.

I'm having trouble with 3.3.1-1 UA TWRP and Pie encryption however (with [MENTION=6005084]ripee[/MENTION]'s unofficial LOS 16 build). Does the custom TWRP not support Pie encryption?

Many thanks.
[Nexus 7 (2013) Original Android Development] Clamor:
[MENTION=5776992]fluther[/MENTION] custom TWRP is build from exactly the same sources as an official one.
[Nexus 7 (2013) Original Android Development] AdriK:
But isn't it too big?

The recovery partition on my Nexus 7 is only 10 Mb, but the custom TWP is bigger.

Both fastboot and original TWRP give an error, firmware is too big.
[Nexus 7 (2013) Original Android Development] Clamor:
[MENTION=562996]AdriK[/MENTION] of course it is, custom TWRP can be installed only after repartition, since repartition increases size of recovery partition along with system.
[Nexus 7 (2013) Original Android Development] Alfordr:
I have this problem it says is too large, is there any other TWRP that will allow me to use the repartition zip?
[Nexus 7 (2013) Original Android Development] fluther:
Thanks [MENTION=5424240]Clamor[/MENTION], so I suppose all TWRPs have issues with Pie encryption right now?

Also, I was fiddling with my Flo the other day and partitined it back to stock. However, it was formatted as 16GB, rather than 32GB. Is there anything I can send you to help you track down the problem?

I ran the script to revert all repartitioning, it succeeded, and then I tried to flash the stock Google Marshmallow ROM. It would hang at flashing userdata, so I flashed userdata and cache manually, and ended up with a tablet with an identity crisis, thinking it had only half the storage. I'm back to Ripee's LOS 16 now using your repartitioning, and all is well.
[Nexus 7 (2013) Original Android Development] Clamor:
[MENTION=10027559]Alfordr[/MENTION] official from TeamWin site.

[MENTION=5776992]fluther[/MENTION] there is a logging tool in download section.
[Nexus 7 (2013) Original Android Development] RafaBronX®:
Guys, please, help me out... Let me get this straight:

I have an untouched Nexus 7 32gb. My device is still exactly like it came out from its factory.

Should I firstly flash an ordinary TWRP, and then, using this one, proceed just like told in the OP?
[Nexus 7 (2013) Original Android Development] flohwie:
If it is still untouched, you start by unlocking the bootloader (you'll need a adb/fastboot for this) before installing TWRP.

A nice guide can be found here: https://wiki.lineageos.org/devices/flo/install
[Nexus 7 (2013) Original Android Development] RafaBronX®:
Thanks, man, but that's not the point of my question.

I surely unlocked my device and did everything necessary to flash TWRP and everything else.

My question is about what TWRP I should use first, you know? If an ordinary one, then, that UA version...
[Nexus 7 (2013) Original Android Development] flohwie:
I used offcial TWRP 3.3.0 and everything was fine.
[Nexus 7 (2013) Original Android Development] adstraylight:
I found that the UA modded TWRP makes the Vendor partition visible in the format list, and this made it possible to eliminate all the mount errors after repartitioning. So when I then used Clamor's zip for the N4, I did the whole thing in the UA version, rather than having to switch in the middle of the procedure.

I was curious when I saw people saying that the official TWRP gave no issues, as I thought that the formatting was needed to allow the ROM to be installed properly...
[Nexus 7 (2013) Original Android Development] lyushiK:
You are a happy person. Where did you get it?
[Nexus 7 (2013) Original Android Development] RafaBronX®:
Yeah, lucky me, I know!

I bought it over a second-hand sales website named MercadoLivre ("Free Market" freely translated) here in Brazil and paid something like US$100. Almost got a LTE version for this same price but lost it for another buyer faster than me.
[Nexus 7 (2013) Original Android Development] Udonitron:
After flashing it rebooted into TWRP but it is now just sitting frozen on the Teamwin splash screen, not advancing to the options.

---------- Post added at 11:42 PM ---------- Previous post was at 10:54 PM ----------

A few restarts and all good.
[Nexus 7 (2013) Original Android Development] Somnia:
I don't know the reason but I don't see the partition of the sd in my nexus 7 2013 LTE (DEB)

how can i solve?
[Nexus 7 (2013) Original Android Development] Clamor:
Describe your problem a bit more clear. What do you mean under sd, what errors do you have etc. And take partition log. If you don't have access to internal memory, use repartition guide to take log, or at least take a shot of log on TWRP screen after flashing loging zip from this thread.
[Nexus 7 (2013) Original Android Development] Somnia:
I installed the rr and the gapps but I could not install the applications I tried to download in the play store, so I decided to remove everything. I started the tablet in recovery mode, without having installed any roms, I wanted to restore the backup I made earlier but it does not find the partition of the internal archive.
[Nexus 7 (2013) Original Android Development] techski886:
I'd suggest this to be put into How to guide.

As it really solved my issue as well.

Maybe it will save someone else' time so this is procedure I've gone through:

1. Using NRT (toolkit) restored stock rom.

2. Reboot to bootloader, fastboot boot TWRP.img (regular one not UA).

3. From TWRP install partition pack zip and follow instructions.

4. Since my TWRP stuck on loading screen, again: Reboot to bootloader, fastboot boot TWRP.img (regular not UA).

5. Followed chrisg instructions (5-8)

6. Format data

7. Wipe out boxes one by one

8. Advanced wipe - just system - Repair or change file system -> Change file system -> Resize file system

9. Power off, reboot to bootloader and fastboot boot TWRP-UA.img.

10. From TWRP-UA, ADB sideload, and command adb sideload yourRom.zip

11. Additionally you can sideload addonsu, magisk and more.

12. Reboot to system, wait.

Hope that might help
[Nexus 7 (2013) Original Android Development] Dtox88:
Bricked

Flashed the flo-deb_clamor_repartition.zip and device will no longer boot to recovery. I'm not sure much can be done at this point but I thought I'd give it a try.
[Nexus 7 (2013) Original Android Development] jhford:
Twrp 3.3.1-1 ua

I just finished repartitioning my deb, again, following the advice in the last 2 threads. The subject version of TWRP remains installed and is bootable. Will it ever be updated as all standard downloadable versions of TWRP often are? If not, shouldn't I flash the current standard version image on top of the UA version now?

Thanks
[Nexus 7 (2013) Original Android Development] jhford:
TWRP error message

"Failed to mount '/vendor' (invalid argument)."

How do I fix this?

Thanks
[Nexus 7 (2013) Original Android Development] PLAYTOPMEN:
not remote system (((

Hello, help, the systems section is not mounted, how to redistribute return the standard there is a solution?

https://cloud.mail.ru/public/2sDW/LNhe3zf9v[/IMG]
[Nexus 7 (2013) Original Android Development] Agent5150:
Hi, I Flashed the flo-deb_clamor_repartition.zip successfully and got lineage OS 16 rom on my FLO. But I would like to revert to stock rom. Got the stock rom from Google's website, used the flash-all.bat file to install.. but it fails on writing userdata with : FAILED (remote: 'Bogus size sparse and chunk header') error. I am assuming this is because repartitioning changed the user partition and it does not match what stock rom is needing. If so, how do I revert to stock partitioning scheme? is there a flashable partition revert available? if not, what is the manual way.

Thank you.
[Nexus 7 (2013) Original Android Development] matt4321:
Had to go back and forth a little to get it to work, also had to repair the file system in TWRP but got there eventually and have a 1.5G /system. Thanks!

Flash the exact same zip and it will detect you are modified then return you to the stock partitions.
[Nexus 7 (2013) Original Android Development] Agent5150:
Thank you. That worked :)
[Nexus 7 (2013) Original Android Development] Fifen:
nevermind I got it working
[Nexus 7 (2013) Original Android Development] Greeeeeeeeeeen:
Hey guys, I've got my hand on a 32gb deb and wanted to repartition it to install oreo or pie. Unfortunately things didn't go as smoothly as I suspected.

This Isn't my first nexus device, I'm unlocked, flashed the official twrp, then I booted the modified one through fastboot. When I flash the .zip I get "failed to mount '/vendor' (Invalid argument)" and when I go to the terminal and type "word" I get "sh: word: not found"

Can anyone point me in the right direction please? I don't know what I'm doing wrong?
[Nexus 7 (2013) Original Android Development] Gandalfos:
Unable to open recovery mode after repartition

Every time I tried to flash a ROM i got: ERROR 7. I Then tried to repartition and I am not sure if something went wrong there. Afterward I wanted to reboot into recovery, but it seems like I cant get back into recovery mode. While I am able to reach fastboot mode, when I try to go into recovery, after a few seconds it jumps back to fastboot mode. Any idea how I can get my nexus back to the recovery mode?
[Nexus 7 (2013) Original Android Development] :
I'm already on TWRP 2.8.5.0 so I need to upgrade. Of course I get the size error when trying a newer version.

So I install flo-deb_clamor_repartition.zip and get no error. But the instructions tell me to go to terminal, but terminal button under "advanced" only allows me to select a file.

Am I missing a step?

screenshot link
[Nexus 7 (2013) Original Android Development] :
Solved it by flasing the img form here: https://dl.twrp.me/flo/

For some reason I didn't get LineageOS 16 working but only LineageOS 14.

And at this stage after so many attempts and 3 evenings pretty much only trying to upgrade a 6 year old tablet I'm sticking to this.
[Nexus 7 (2013) Original Android Development] dealpapa1:
twrp-3.3.1-1_UA-flo.img

Size:10.25MB

twrp-3.3.1-0-flo.img

Size：8.8M

why twrp is so bigger than the official one?
[Nexus 7 (2013) Original Android Development] Clamor:
[MENTION=1078059]dealpapa1[/MENTION] official TWRP is more compressed to fit small recovery partition, while UA TWRP must be flashed on new partition layout that has extended recovery partition.
[Nexus 7 (2013) Original Android Development] dealpapa1:
i see. it should be something support 10 soon.
[Nexus 7 (2013) Original Android Development] audi.rs4:
[MENTION=5424240]Clamor[/MENTION] I am trying to follow the guide but I am getting an error:

This is not a Nexus 7 (2013)

Updater process ended with ERROR: 1

Now, I've seen many other report this. I flashed my Nexus 7 (deb) back to stock, then went into the bootloader, loaded up your provided TWRP (UA), moved over your repartition zip and in TWRP (UA) hit Install and selected the zip file.

Am I missing a step in there? I've read over your steps/instructions and I just don't see what I am missing.

Thanks!
[Nexus 7 (2013) Original Android Development] Clamor:
[MENTION=3961547]audi.rs4[/MENTION] your partition table was modified before, or you have tablet with replaced emmc. Take partition log and send it to me.
[Nexus 7 (2013) Original Android Development] palyons:
I'm also having a problem, recently I got my hands on a Nexus 7 2013 (deb) model. When I first got it it had 4.3.1 Stock installed on it. Ever since I ran the repartition script, I absolutely cannot revert back to Stock using the factory images, they all flash without errors, but as far as I can tell, the only thing keeping me from getting into Stock is a missing or messed up Stock Recovery error.

I have also re-ran the script and went back to the Stock partitions. I can run custom roms just fine, but stock is a no-go.
[Nexus 7 (2013) Original Android Development] crypticc:
Hi [MENTION=5424240]Clamor[/MENTION]

I'm using this script to bring my otherwise stock N7 2013 kicking and screaming up to date.

I'm getting similar issues to the below. Long story short I think I've borked my tablet.

I've found what I think is the more appropriate thread so rather than spamming this thread have posted there.

https://xdaforums.com/showpost.php?p=80864545&postcount=361

But if that's uncool please redirect.

Fingers crossed !

regards

chris
[Nexus 7 (2013) Original Android Development] crypticc:
deleted - see above redirect
[Nexus 7 (2013) Original Android Development] vagelis199:
Hi, I want to flash back the stock ROM, how do I restore it now?
[Nexus 7 (2013) Original Android Development] drinkypoo:
Did not work on my factory updated flo 32GB. Used restore tool https://xdaforums.com/showthread.php?t=2381582 and then resize tool worked. But TWRP app does not install from this recovery as non-system app, and east the LineageOS 16 unofficial https://xdaforums.com/nexus-7-2013/development/rom-lineageos-16-0-t3903286 install if installed as system app (tries to boot for a long time, then fails and boots to recovery.)
[Nexus 7 (2013) Original Android Development] xuanyue_j:
Got stuck on TWRP logo after flash in TWRP

Hi, thank you for the great work. I'm using FLO 16GB wifi, I follow all the stages but got stucked on stage 7. It just hanging there with the TWRP logo. Can anyone suggest what I should do next?
[Nexus 7 (2013) Original Android Development] adstraylight:
I think this might have happened to me, iirc I rebooted to bootloader, selected power off, then booted back to bootloader and selected recovery, then TWRP started normally.

I think the key combination for the reboots is power+volume down BTW.

if it doesn't work the first time, try again.

Edit: I just remembered to add that I left it at least 30 seconds when it was powered down to make sure the RAM was cleared completely..
[Nexus 7 (2013) Original Android Development] someguykenadams:
I will definitely do this tonight to my Nexus 7 2013 tablet. Would it be alright if I use a USB flash drive to put the .img files onto it, or would that be impossible? I have an Apple keyboard that has 2 USB ports that'll allow me to connect a mouse and USB flash drive using the USB OTG adapter.
[Nexus 7 (2013) Original Android Development] ghatothkach:
The repartition script link is broken

https://xdaforums.com/devdb/project/dl/?id=30499

https://xdaforums.com/devdb/project/dl/?id=30499&task=get

I get a 410-Gone on a NginX page

G
[Nexus 7 (2013) Original Android Development] Galbotorix:
So I flashed the partitioned and the twrp but my internal storage shows 0mb and It doesn't show up on my computer
[Nexus 7 (2013) Original Android Development] Clamor:
For everybody, if you want a help, you need to enclose a partition log.
[Nexus 7 (2013) Original Android Development] mountainsea:
i had exactly same problem

it looks like the partition info is damaged and twrp couldn't mount any partition.

i downloaded the factory image from google then flash-all.bat to restore it.
[Nexus 7 (2013) Original Android Development] String0011:
I solved it by flashing the repartition zip file again (followed the instruction to type "stock" in terminal). After this step, only /vendor could not be mounted.

Then I flashed new layout again. After this only /system could not be mounted. I fixed it by

Wipe -> Advanced Wipe -> select /system in Repair or Change File System -> Change File System -> ext4

Eventually, the partition was correctly mounted and showed 14xxMB size. And I can successfully install Android 10 image.
[Nexus 7 (2013) Original Android Development] moleculezz:
Hi,

I ran the script and all seems fine. I was able to install Gapps. But my system won't boot.

I did notice that some of the partitions didn't have the exact same size as specified in the FAQ.

Would this cause the boot problem?