yashsingh1/xdaforums huggingface dataset:
[Nexus 7 (2013) Original Android Development] retiredtab:
Removing the assert works. I just loaded 17.1 flox onto my Nexus 7 2013. Nice to see it getting official support again. I had 18.0 loaded on this tablet a few days ago just to test. So I had my tablet repartitioned already to run 18.0.

To remove assert, open zip file with your favourite utility, then go to

META-INF, com, android, google, android, updater-script

remove line 1 completely

that is

assert(getprop("ro.product.device") == "flox" || getprop("ro.build.product") == "flox" || abort("E3004: This package is for device: flox; this device is " + getprop("ro.product.device") + "."););

so that

ui_print("Target: google/razor/flo:6.0.1/MOB30X/3036618:user/release-keys");

is now the first line.

I'm going to try the lineageos recovery image later.
[Nexus 7 (2013) Original Android Development] GekkePrutser:
I think I totally messed it up now :(

Installing the modified file didn't work, so I thought hey why not revert to factory and start over.. So I tried Google's 6.0.1 factory image but that failed to install due to the partition table being different.

I didn't find a way how to revert the partitions (It was said here earlier in the thread that it would have to be done by hand) so I just wrote over the first 4k from a flo device I had lying around that is on 6.0.1, I assumed the partition tables would be the same (they're both 32GB). The broken one is a deb. But now it won't start at all anymore. The screen stays black completely.. I assumed there is a recovery loader in ROM but there doesn't seem to be one. I tried all key combos.

Is there any way I can still recover this tablet? Or is it time to chuck it? :cry: Too bad, it was great hardware, I just wanted to use it for a wallpanel for home assistant.

Edit: To make matters worse, I just found out it's the flo I bricked, with the 4G :cry: :cry: I must have mixed them up during the process and of course they look the exact same. This is really tough as it was in mint condition. That was really stupid. Is there really no way to recover if the flash is completely scrambled?
[Nexus 7 (2013) Original Android Development] retiredtab:
If you use lineageos recovery image instead of twrp, there is no message saying "package is for device: flox; this device is flo".

What I don't know for sure is if the lineageos recovery image does the repartitioning automatically or not. You will have to wait for the flox wiki.
[Nexus 7 (2013) Original Android Development] retiredtab:
If you can boot into bootloader mode, there's always hope. That is, power + volume down.
[Nexus 7 (2013) Original Android Development] GekkePrutser:
No, that's all dead :( I will try this though:https://xdaforums.com/t/fix-emmc-ne...frozen-or-stuck.3310608/page-10#post-75360854. Just found it.

Edit: Oof... That worked! At least I got the bootloader back on the deb. The rest isn't working yet but I will manage. So there is in fact a built-in bootloader but it's not fastboot, it's a qualcomm serial thingy.

Edit2: I tried doing the same with the other one with my other Nexus (flo). Because I couldn't overwrite the gpt through the bootloader. But that seems to be totally bricked now :( It just won't even register the qualcomm usb thing :( So this is not a magic bullet either.
[Nexus 7 (2013) Original Android Development] retiredtab:
Before you toss it prematurely, let's see if anyone else can make a recommendation. I'm not familiar with the recovery process for the 2013 model. I did go through a low level flash for a bricked Nexus 7 2012 model, but the procedures and tools are not the same.

BTW, I have two Nexus 7 2013 and both are now running the lineageos flox 17.1 code now.
[Nexus 7 (2013) Original Android Development] ipdev:
[IIIII] CROSS - Custom ROM Scripted Setup xda thread - Link

You may find help in that thread or one of k23m's other threads.

He has links in the CROSS thread for his other threads.

Good luck.

Cheers. :cowboy:
[Nexus 7 (2013) Original Android Development] GekkePrutser:
Yes I got it to work, with the help of k23m indeed. Thanks for your help also!

I'm glad these Nexuses have such great recovery available. Makes them really good for experimentation. The availability of Android 10 also really helps to make them relevant again.
[Nexus 7 (2013) Original Android Development] ipdev:
Glad to see you got it working.

Android 11 actually. ;)

The thread with the ever changing name. xda thread - Link

Both flo (WiFi) and deb (LTE) are booting and running very good for early Lineage 18.1 builds by the way.

Cheers. :cowboy:
[Nexus 7 (2013) Original Android Development] xan.scale:
first post download link doesn't works. is normal ? where i can find file?

found link in page 18 thz
[Nexus 7 (2013) Original Android Development] Aprate:
Someone on reddit posted links:

https://www.reddit.com/r/LineageOS/comments/kd2ec0
EDIT: Just tested the script, seems fine.

And lineageos also has a great guide on how to do this:

Install LineageOS on flox | LineageOS Wiki

wiki.lineageos.org

EDIT 2: Dont use Lineageos recovery, it does not support the new partition table. With twrp ua opengapps will flash after lineageos.
[Nexus 7 (2013) Original Android Development] ZLRider:
If anyone is still having trouble with the links in the original post, I searched Google for the file names and found them on Android File Host. Here is the link to the main file page

Downloads for : Google Nexus 7 (2013) Developed By : aclegg2011dl -

Here are the individual links to the files:

Repartitioning package: flo-deb_clamor_repartition.zip

Recovery flo: twrp-3.3.1-1_UA-flo.img

Recovery deb: twrp-3.3.1-1_UA-deb.img

I have worked on none of this mod and am getting ready to try it myself so a BIG thanks to all those who worked on this to help keep the Nexus 7 viable into the future.
[Nexus 7 (2013) Original Android Development] anandcu3:
Thanks for the updated links! But note that the deb and flo twrp links have been swapped!
[Nexus 7 (2013) Original Android Development] anandcu3:
I tried to repartition and the partition script worked correctly (I think), but now I can boot only to fastboot and not into twrp. When I try to go into recovery mode from fastboot, it just reloads the fastboot bootloader. I tried to flash twrp again from fastboot but unfortunately get the error

Sending 'recovery' (10500 KB) OKAY [ 0.363s]
Writing 'recovery' FAILED (remote: 'partition table doesn't exist')
Finished. Total time: 0.446s

Any ideas to solve this? Thanks
[Nexus 7 (2013) Original Android Development] ZLRider:
Thanks for the heads up! Should be fixed now!
[Nexus 7 (2013) Original Android Development] ZLRider:
I can't help you as I'm pretty new to this myself. I would get in touch OP @Clamor or one of the other senior members.
[Nexus 7 (2013) Original Android Development] k23m:
While this [UA TWRP] partitioning scheme does work OK if applied precisely as instructed, judging by the number of complaints here and on the LOS17.1 OFFICIAL thread, it is a hit-or-miss proposition...

--- Therefore I have created an alternative single-click re-partition script which safely and easily generates the "UA" partitions...

--- Go to to the CROSS thread and download

sysrepart-flox.zip

then just install it from TWRP. Better yet, simply run

lineage-install-2-flox.bat

CROSS2 script to install everything automatically.
[Nexus 7 (2013) Original Android Development] Dee-Dee:
After a lot of time, i tried again on my poor dusty Nexus 7.

I booted it on system, and as last time, my pc didn't see it and MTP was not available. So I rebooted it in recovery, tried to mount it, but still not visible.

Rebooted again on system, and it started a looooong loading screen, that eventually turned on black screen and started TWRP.

Did a Data, Cache and Dalvik wipe, but again long loading screen that lead to TWRP.

So, no system, and device can't be seen by adb.

Any suggestion?
[Nexus 7 (2013) Original Android Development] pedritopl:
In my case, I lost several hours with adb partially working, MTP sometimes working, sometimes not. Adb sometimes said the device was unauthorized, sometimes offline. I tried with different USB ports, USB hubs, different cables...I thought I have a broken USB port on the Nexus.

After a few hours I found another (third) microUSB cable, and everything started working as it should. Adb works, MTP works...

Anyway, I just wanted to say it's always a good idea to try with many different cables and sometimes different USB ports on the PC.

Good luck!
[Nexus 7 (2013) Original Android Development] fstbusa:
you can delete. I figured it out.
[Nexus 7 (2013) Original Android Development] happy4ya:
I'm preparing to try this in order to upgrade my N7. On the first page, they tell you to download and use the recovery on the page. It is version twrp-3.3.1-1_UA-flo, and I have a newer version (3.5.0_9-0) on the tablet which was recently updated using the TWRP app from the Play Store. Should I flash back to the older one in the directions, or should I be ok with the newer one I already have?

Also, my tablet is ready to go. I have nothing that needs to be backed up so do I just do this re-partition first, and then just go right to the instructions to install Lineage OS?
[Nexus 7 (2013) Original Android Development] Clamor:
I have uploaded all needed binaries into my GH account. Links are updated. Sorry for delay.
[Nexus 7 (2013) Original Android Development] Troops42:
Hi,

I think I bricked my beloved Nexus 7 2013 :(. I followed the install, I got to the point where lineage 17.1 was trying to boot up but just kept looping into the first line it draws on the screen, then it timed out.

Now I can reboot into the tablet and of course I get the little android with his belly empty..

On the screen it says:

Fastboot Mode

Product name: flo

HW version Rev _e

Bootloader version - FLO-04.08

Serial 071e4c05

Signing- yes

Secure boot- enabled

LOCK STATE-unlocked

when I click the buttons to recovery mode and hit the power button it goes right back into the google frame as if it was trying to do something but it just stays there, I have to force hold the power button, to shut it off

Before it was trying to boot up into lineage 17.1 I was able to get to the lineage recovery which is how I was was able to do the adb sideload of lineage 17.1 & gapps.

My present state is what ever I choose in recovery ie., Start, Recovery mode, restart bootloader it just goes to the google screen.

If I power it up, my linux terminal still sees it in fastboot.

I blame no one but myself, but any help would be greatly appreciated.

BTW before I went down this path, I did have an unofficial lineage installed and working, but it wasn't getting any updates anymore and was a few years old. So when I seen the official version I was delighted I though I would get security up dates again, which is why I tried this.
[Nexus 7 (2013) Original Android Development] rlw6534:
Successful install on 32GB Flo with Kingston MMC (slightly smaller size than Hynix version) after a few PMs. Need to remember to format the changed partitions in TWRP after installation and reboot recovery. Installed UA Oreo and GAPPS stock just for fun... Just had to resize system with TWRP after ROM install to recover space... Waiting for Pie now that I have room for it... ;)

Thanks Clamor!
[Nexus 7 (2013) Original Android Development] lollyjay:
I keep getting

dd: /dev/block/mmcblk0p2: Permission denied

after typing the first adb command
[Nexus 7 (2013) Original Android Development] rlw6534:
I had to to be root (SU) after entering the shell on USB debug to perform the backups. I was booted to System with Magisk at the time.
[Nexus 7 (2013) Original Android Development] lollyjay:
Thanks I finally did it from TWRP MTP
[Nexus 7 (2013) Original Android Development] abhifx:
Finally! Havent done it yet but what i understand is we do not need adb in anyway as my usb is borked.

this i assume also means we are getting ready for trebalised unlegacy pie.

my concern, is 1.5GB enough for Rom + Full Gapps if we want that full nexus (or pixel) level customization?
[Nexus 7 (2013) Original Android Development] Clamor:
[MENTION=3692487]abhifx[/MENTION] if your usb is broken, you shouldn't use repartition pack. 1.5 GB system isn't for bigger GAPPs it is for bigger SYSTEM.
[Nexus 7 (2013) Original Android Development] abhifx:
uh oh... so does that mean unlegacy's future roms will not work with my flo as i wont be able to get vendor partition.
[Nexus 7 (2013) Original Android Development] Clamor:
[MENTION=3692487]abhifx[/MENTION] I didn't say that. This mod isn't supported officially by UA ROMs at least by now (except Asus Transformers on Tegra 3). UA uses standard partition layout same as all other flo/deb ROMs. But if this mod becomes popular enough with UA users or if system partition becomes extremely small even for clean system, than we may switch to new layout.
[Nexus 7 (2013) Original Android Development] lollyjay:
[MENTION=5424240]Clamor[/MENTION] here is what I see in twrp now. I am unable to mount system or vendor or to flash any ROM
[Nexus 7 (2013) Original Android Development] lollyjay:
Try again

Don't know why it won't upload
[Nexus 7 (2013) Original Android Development] Clamor:
[MENTION=4762414]lollyjay[/MENTION] format both /system and /vendor in Advanced Wipe
[Nexus 7 (2013) Original Android Development] Clamor:
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.
[Nexus 7 (2013) Original Android Development] lollyjay:
I tried, but get error cannot mount system
[Nexus 7 (2013) Original Android Development] MikiGry:
How do I resize in TWRP-UA ? Should I open TWRP and type "resize" ?

Is it mandatory or I can just live with a little bit too much of space taken by system partition ?

Can't install open gapps micro :/ Insufficient amount of storage available :/
[Nexus 7 (2013) Original Android Development] MikiGry:
I've managed to install UA 8.1 after repartition process. I wasn't able to mount /system and /vendor after reparations process, but rewiping both of them fixed /system. Unfortunetely during UA installation I saw red lines "unable to mount /vendor". Wiped /system ,/cache ,/dalvik ,/data and installed UA again (this time without any errors). I I said I want able to install micro gapps (pico installed fine). Flo booted fine. After setting everything up I went to play store and installed disc info. And that's the output:

It it the app failing to calculate true capacity or repartitioning process go well ?
[Nexus 7 (2013) Original Android Development] rlw6534:
You have to resize the system partition (Wipe, Advanced Wipe, select System, Resize) to get back the space after flashing the ROM. I had to do it once (got errors), restart recovery and do it again for it to work. This is because the ROM is built for stock system size. Then you can install larger GAPPS from recovery.
[Nexus 7 (2013) Original Android Development] L.F.B.:
Hey clamor its a nice work but some user posted a flashble repartition script without any issues so far...

https://xdaforums.com/showpost.php?p=76278047&postcount=19

Ive flashed with no erase system and just boot again and voilá...

Should nice to implement this reparition script to nexus 5 too.

?
[Nexus 7 (2013) Original Android Development] lollyjay:
[MENTION=6563096]L.F.[/MENTION]B you gotta be kidding me this has been around since April?

Edit: And you just flashed it in TWRP? What about twrp being able to read the partitions?
[Nexus 7 (2013) Original Android Development] Clamor:
[MENTION=4522247]L.F.B.[/MENTION] 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.

[MENTION=4762414]lollyjay[/MENTION] 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.
[Nexus 7 (2013) Original Android Development] rlw6534:
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...
[Nexus 7 (2013) Original Android Development] Troops42:
Not sure if this helps but while researching bricked N7'13 devices, I found a thread and in fastboot I was able to gather somemore info:

johnb@EP45-UD3P:~$ fastboot getvar all

(bootloader) version-bootloader: FLO-04.08

(bootloader) version-baseband: none

(bootloader) version-hardware: rev_e

(bootloader) version-cdma: N/A

(bootloader) variant: flo 16G

(bootloader) serialno: 071e4c05

(bootloader) product: flo

(bootloader) secure_boot: enabled

(bootloader) lock_state: unlocked

(bootloader) project: flo

(bootloader) off-mode-charge: yes

(bootloader) uart-on: no

(bootloader) partition-type:bootloader: emmc

(bootloader) partition-size:bootloader: 0x0000000000aee000

(bootloader) partition-type:recovery: emmc

(bootloader) partition-size:recovery: 0x0000000001000000

(bootloader) partition-type:boot: emmc

(bootloader) partition-size:boot: 0x0000000001000000

(bootloader) partition-type:system: ext4

(bootloader) partition-size:system: 0x000000005dc00000

(bootloader) partition-type:cache: ext4

(bootloader) partition-size:cache: 0x0000000004908c00

(bootloader) partition-type:userdata: ext4

(bootloader) partition-size:userdata: 0x00000002fe5f3e00

all:

finished. total time: 0.858s
[Nexus 7 (2013) Original Android Development] Aiden2765:
hey look its been awhile on this thread but i was just wondering if anything had chamged because i download the proper file then it says on my nexus that its ready to go back to stock
[Nexus 7 (2013) Original Android Development] Troops42:
What is the proper file maybe ill try it
[Nexus 7 (2013) Original Android Development] Aiden2765:
Hey man I talked to the creator of this tool and helped me through it, basically I used another partitioning kit and the Clamor kit thought it was it so I was unable to reparation, but I had to reflash the normal rom using the flash all tool built into the rom file for the nexus 7 because it rebuilds the partitions from scratch.
[Nexus 7 (2013) Original Android Development] zosX:
I'm getting an error: 1 and its saying this isn't a Nexus 7. I started with the repartition script for Lineage OS 18.1 and it gave me an error 1. So I thought since I had repartitioned years ago that I needed to maybe go back to stock sizes for it to work. But this script isn't working either. So now I have a device that's just wiped. I can still get into fastboot at least. I have no way of really logging anything since my partitions are now wiped. All I'm seeing is the TWRP folder in windows. What the hell do I do now? :(
[Nexus 7 (2013) Original Android Development] k23m:
You could install everything (including repartition) automatically in one go with CROSS.
[Nexus 7 (2013) Original Android Development] zosX:
Nothing to lose at this point LOL. I'll give it a shot. I tried the old repart back to stock script someone wrote yesterday and while it looks like my partitions are more in line with stock now (900mb system for instance) it is still saying its not a nexus 7. I'll try Cross and report back.
[Nexus 7 (2013) Original Android Development] zosX:
I ran restock to be on the safe side and then Cross. You're my hero. You win the award for easiest rom installation ever. Gapps came up corrupt so I just sideloaded one over ADB. No big. just getting the rom going was good. It was funny seeing the old stock boot up animation. That sure brought back some memories.
[Nexus 7 (2013) Original Android Development] OhioYJ:
So I started trying to convert a couple of my old flo tablets to LOS 18.1 (they were on 14.1). I ran the script on the first one, and I thought it had stopped, as it was doing nothing for a while. Ctrl+C'd, which apprently may have been a mistake (dumb I know, but I thought it had been long enough). Then before I found this thread, I restored the factory image. Booted it. Could not run the script again. Re-installed LOS 14.1, could not run the script again.

It always says this, when I type "modify":

/system/bin/sh: modify: inaccessible or not found
[Nexus 7 (2013) Original Android Development] captaintrav:
I successfully re-partioned and installed TWRP downloaded in this thread, wiped the data, but my device is still "flo" and not "flox". What am I missing here?
[Nexus 7 (2013) Original Android Development] OhioYJ:
Ok, so I got it working.

- I booted up a Windows machine and tried the CROSS script above. This did not work. In fact it said my memory was bad (well one possibility). However it would still boot the stock ROM, and LOS 14.1, so that didn't quite seem right.

- The other ZIPs, in the CROSS thread and TWRP there did end up fixing my issue. Between going back to stock partition, and using the ultimate zip I was able to flash LOS 18.

Pretty sure something got borked in the partitions during this process originally, I'm just not sure what.
[Nexus 7 (2013) Original Android Development] pingaan:
Hey!

Can anyone answer which one of the .img files at https://github.com/clamor95/android_device_unlegacy_recovery/releases/tag/1.0 I am supposed to flash? I have a WiFi (flo) edition.

Regards.

edit: forgot to mention what I wanted to accomplish. I am talking about which files to flash in order to create a bigger system partition.
[Nexus 7 (2013) Original Android Development] jhford:
I'm a user of your repartition tool, and I hope this is not the wrong forum in which to ask the following question. The partitions of one of my 2 Nexus 7 2013 mobile (4G/LTE) tablets are totally screwed up. What's the best method to restore all of the partitions back to stock so I can flash your partition tool on a pristine system? Thank you.
[Nexus 7 (2013) Original Android Development] k23m:
"To recover from other repartition attempts, simply install sysrepart-ultimate if you intend to use LOS17+ or sysrepart-stock if you have other plans. If direct sysrepart installation is impossible due to TWRP or GPT issues, run the

repartition.bat

script."

CROSS - Custom ROM Scripted Setup
[Nexus 7 (2013) Original Android Development] ZoltanG:
I tried to download the loging.zip but I got a 404 Not Found error. Is there any other place where I could get it from? Thanks.
[Nexus 7 (2013) Original Android Development] tatoosh11:
I got "permisson denied" - what can u do to backup my files?

flo:/ $ dd if=/dev/block/mmcblk0p2 of=/sdcard/modemst1.img

dd: /dev/block/mmcblk0p2: Permission denied

here is my partition list, no sdcard listet ... is that right?
[Nexus 7 (2013) Original Android Development] killeriq:
guys please could someone explain the difference ?

"flo-deb_clamor_repartition" vs "flox-deb_clamor_repartition_20201203"

the "newer" one is suggested from LineAge 17.1 - 18.1 , but havent find the difference...

Or if i have already the older one do i need to put the newer one? Thanks