yashsingh1/xdaforums huggingface dataset:
[Nexus 4 Original Android Development] _raydroid:
You can find clamor's repartition script here - https://drive.google.com/drive/folders/1sYrE8PtMy3L6ptWK-j0tHfjU8KTeyo1U

Filename is mako_clamor_repartition.zip. Links are by voron00.

===

Anyway, the main reason why I wanted to post here is I used this script with voron00's latest TWRP and had a problem with clamor's instructions.

I wanted to upgrade from LineageOS 15.1 to the latest version.

Before you attempt this, make sure you know how to use adb sideload from your PC to transfer your rom to the phone after wiping the data. If you don't have adb.exe on your PC, you'll need to install it from here: https://xdaforums.com/t/tool-minimal-adb-and-fastboot-2-9-18.2317790/

Here's what worked for me:

1. Download mako_clamor_repartition.zip to your phone.

2. Flash voron00's latest TWRP recovery from here - https://drive.google.com/drive/folders/1uVfsBAtJC3GZ0Jo0TSy2EWU_CTUTSQwa. You can flash over the existing recovery with the official TWRP app and flashing with this file.

3. Boot into recovery

4. If you want to make a backup of your data, do so now and transfer the backup to your PC before proceeding!

5. Next, in TWRP, tap on "Install" and select mako_clamor_repartition.zip, which you downloaded to your phone in step 1, and flash it.

6. This is the part that was missing for me. In TWRP, go back to the main menu and tap "Advanced" and then "Terminal". Now, type modify and hit enter.

7. After the script is finished, the phone will reboot into recovery again.

8. Now, 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.

9. Time to install our rom. Make sure you connect your phone to the PC. Then, in TWRP, go to "Advanced" and "ADB Sideload". Now, from your PC, you'll need to open the command prompt. In the command prompt, go to the directory where adb.exe is installed. Also make sure you move your rom that you want to install to the same directory. Now type, adb sideload YOUR-ROM.zip and hit enter (replace YOUR-ROM.zip with the rom you want to install). If you need some help with ADB sideload, here's a guide - https://twrp.me/faq/ADBSideload.html.

9. After your rom is installed, in TWRP, reboot to system and your rom should be loaded.

Hopefully, I'm not missing anything.

Thanks to clamor for the script. Just upgraded from LineageOS 15.1 to 18.1 thanks to the hard work of voron00.

Can't believe this Nexus 4 can still run Android 11! Runs quite smoothly.
[Nexus 4 Original Android Development] alfa53:
Hello,

I have read everything carefully.

Unfortunately there is no working link for the ROM 18.1.

The last tutorial is great, and also thanks to all the preworkers who made it possible.

Currently I have only the 17.1 on it, but would also like to get the link for the 18.1 to have this preference.

Is there also an 18.1 for the nexus 5 and 7?

My englich is miserable, so the text was translated.

mfg
[Nexus 4 Original Android Development] Clamor:
I have uploaded all needed binaries into my GH account. Links are updated. Sorry for delay.
[Nexus 4 Original Android Development] alfa53:
ps: not noticed that the image was zipped twice. so everything is running.

nexus 5 and 7 link also found.

thanks to all
[Nexus 4 Original Android Development] _raydroid:
LOS 18.1 for Nexus 4: https://drive.google.com/open?id=1e-mO4qaEP1y0wrBbbPwsISdJuW_TeLQo

XDA thread: https://xdaforums.com/t/rom-unofficial-lineageos-18-1-mako.3758779/post-84295997
[Nexus 4 Original Android Development] GolDRoger1:
Hello I found a way to solve this in a very simple and easy way, just connect the device to the PC with TWRP, go to advanced and look for sideload select the boxes of caches. then open a terminal where is the zip clamor repartition and do the following command:

adb devices (the terminal on the PC must recognize the device).

adb sideload (name of the clamor zip).zip and press enter.

it will install the repartition zip, when it does so go to the TWRP terminal and type stock and enter it will repartition to stock again, then just go to farmat data(yes), wipe advanced select all boxes and clear, partition solved.
[Nexus 4 Original Android Development] minnuss:
@aospray

Thank you for the flashing tutorial, that was great, I managed to flash the ROM in first try.

I would just like to add, When people flash the ROM and successfully reboot for the first time, then they need to download opengapps, for our Nexus 4, it is arm, then select the android version of the ROM they flashed, and I suggest pico version of gapps, because its smallest.

Do the sideload of gapps, reboot again, and let the gapps do their thing…log in to google.
[Nexus 4 Original Android Development] _raydroid:
Glad my post helped!

I don't use Gapps on the Nexus 4 because of the low ram and because 90% of the apps I use come from Fdroid.
[Nexus 4 Original Android Development] jc155:
works like a dream! just did my 8gb unit
[Nexus 4 Original Android Development] Hahayes7:
Very useful, thank you!
[Nexus 4 Original Android Development] comatoseEnigma:
Hi, i have been trying this but i am persistently getting invalid zip file format when trying to flash the zip file., i downloaded from github. any help would be highly appreciated
[Nexus 4 Original Android Development] XPUser99:
I used the script to repartition for voron00's LineageOS 18.1. It worked like a charm, and LineageOS 18.1 did fit, but sadly I couldn't flash even OpenGapps pico for ARM & Android 11 - system partition is too small :(

Can the repartition script be rewritten for an even bigger system partition? Or is the problem somewhere else?

I need Google Play Services and nothing else.
[Nexus 4 Original Android Development] voron00:
Resize file system from TWRP

While the installation of Android Treble GSI images, GAPPS installation fails due to insufficient storage space. Here is the screenshot of ...

linuxhalwa.blogspot.com
[Nexus 4 Original Android Development] muratturatci:
Hello, pleae help me, i read all of the instructions.

I've freshly installed latest stock rom.

But i cant make the efs backup and repartitioning steps.

Is there any clearer instructions or video guides.

Thanks in advance.
[Nexus 4 Original Android Development] V0latyle:
@muratturatci You originally posted this in the LineageOS 18 thread, but your question is about the stock ROM.

I have moved your post to this thread as it is a more appropriate place to ask.

In the future please keep your questions relevant to the topic at hand, and post in a thread whose topic most closely relates to your question.

Thank you.
[Nexus 4 Original Android Development] muratturatci:
No, i want to install LineageOS 18 but i cant make the first step (repartition). Thats why i ask on that thread. Thanks.
[Nexus 4 Original Android Development] V0latyle:
This thread covers repartitioning. You only mentioned stock rom, not LOS so it wasn't clear what you were asking. Make sure your message clearly indicates what you're trying to do and what you've done so far
[Nexus 4 Original Android Development] ze7zez:
It will be hard to help you when you don't write in full sentences, just a general "i cant make the first step".

TWRP creates a recovery.log, so if you have a problem at this stage, submit that file here.
[Nexus 4 Original Android Development] muratturatci:
Thanks for your helps.
[Xiaomi Redmi Note 5 / 5 Plus Questions & Answers] nkb88:
Dear XDA'ers

Since the 9.6.5.0 update of MIUI, I am no longer able to see and connect to 5 ghz WIFI networks anymore. They do not show up, when searching for local WIFI networks, neither does it connect manually. "Normal" 2.4 ghz networks whatsoever work normally up to now. I have read on MIUI forums that some users are experiencing the same issue. Does anyone know more about this issue?

This is really annoying, as I am using the 5 ghz band at home as well as at work.

Thanks for your inputs!

Cheers from Switzerland!
[Xiaomi Redmi Note 5 / 5 Plus Questions & Answers] adrianmich:
Installed new Global Stable MIUI 10 Update and 5 GHz working good.
[Xiaomi Redmi Note 5 / 5 Plus Questions & Answers] dev.payasam:
I have updated just now to MIUI 10.1.2.0 Stable but still am not able to detect 5GHz on Wifi. This is really annoying. I have tried resetting network settings, replacing SIM and finally also factory reset. Nothing seems to work. Please suggest a way out guys....
[Nexus 7 (2013) Original Android Development] Clamor:
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

22 671088640B 1551892479B 880803840B system
23 1551892480B 2139095039B 587202560B cache

FLO/DEB MODIFIED

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.

"Can not extract updater-script. Do you have it in package?
Updating partition details...
...done"
[Nexus 7 (2013) Original Android Development] rlw6534:
Link not working for the repartitioning package... ;)
[Nexus 7 (2013) Original Android Development] Clamor:
[MENTION=4758417]rlw6534[/MENTION] should be fine now
[Nexus 7 (2013) Original Android Development] rlw6534:
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...
[Nexus 7 (2013) Original Android Development] Clamor:
[MENTION=4758417]rlw6534[/MENTION] You actually should't brake anything. Added an instruction how to backup EFS and persist.
[Nexus 7 (2013) Original Android Development] rlw6534:
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
[Nexus 7 (2013) Original Android Development] MikiGry:
How to restore files, that we copied from our tablet using dd command ? (I haven't done anything yet. Just asking)
[Nexus 7 (2013) Original Android Development] Clamor:
[MENTION=4758417]rlw6534[/MENTION] your partition table was modified.

[MENTION=5468078]MikiGry[/MENTION] same commands, just switch paths.
[Nexus 7 (2013) Original Android Development] lollyjay:
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?
[Nexus 7 (2013) Original Android Development] Clamor:
[MENTION=4762414]lollyjay[/MENTION] 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.
[Nexus 7 (2013) Original Android Development] lollyjay:
Thanks

So do I NOT flash the modded twrp first?

Your instructions said to flash it after reboot to recovery
[Nexus 7 (2013) Original Android Development] Clamor:
[MENTION=4762414]lollyjay[/MENTION] actually it shouldn't metter, but after would be better
[Nexus 7 (2013) Original Android Development] lollyjay:
I'm going to do this when I get home. This might mean that flo/deb will get Android 9 Pie
[Nexus 7 (2013) Original Android Development] Clamor:
[MENTION=4762414]lollyjay[/MENTION] look through UA ROM thread I wrote there about P on flo/deb
[Nexus 7 (2013) Original Android Development] lollyjay:
Sorry but can you give me a link?
[Nexus 7 (2013) Original Android Development] rlw6534:
I have previously used sysrepart.zip and sysrepartundo.zip from this thread, although not recently:

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

I returned it to stock a while back (827MB). Perhaps I need to sgdisk a stock partition table?
[Nexus 7 (2013) Original Android Development] Clamor:
[MENTION=4758417]rlw6534[/MENTION] Every manual repartition or repartition made not by my pack needs an individual look and partition table restore.

[MENTION=4762414]lollyjay[/MENTION] here
[Nexus 7 (2013) Original Android Development] rlw6534:
OK. Here is my partition layout. My userdata appears to be smaller than stock, but there isn't enough room on mmcblk0 to increase it to the size that your script is looking for. I have no idea how that could have been changed without bricking the tab. Everything else looks normal. Ideas?

Model: MMC MMC32G (sd/mmc)
Disk /dev/block/mmcblk0: 30937186304B
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 671088640B 1551892479B 880803840B ext4 system
23 1551892480B 2139095039B 587202560B ext4 cache
24 2147483648B 2148532223B 1048576B misc
25 2214592512B 2225078271B 10485760B recovery
26 2281701376B 2281709567B 8192B DDR
27 2281709568B 2281717759B 8192B ssd
28 2281717760B 2281718783B 1024B m9kefsc
29 2348810240B 2348843007B 32768B metadata
30 2415919104B 30937169407B 28521250304B ext4 userdata
[Nexus 7 (2013) Original Android Development] Clamor:
[MENTION=4758417]rlw6534[/MENTION] Thanks!
[Nexus 7 (2013) Original Android Development] shuvam.gayen:
problem solved by usb otg.

i took the rom in this usb otg and flashed from there. it worked for me. and i am saved :D

thanks for the script.

also i want to know if i need to flash new roms from now on should i do anything aftre flashing the ROMs or just liker earlier flash and enjoy? asking bcoz of new partition sizes
[Nexus 7 (2013) Original Android Development] flohwie:
THANK YOU, It perfectly worked for me (using TWRP 3.3.0). :)

Great work!
[Nexus 7 (2013) Original Android Development] lucasbda1:
Hello dear DEV

I followed all the instructions, but did not get the repartition to work properly, i flashed it with TWRP 3.2.2-0

here is the log

https://pastebin.com/aVtk4S3C

Maybe updating the TWRP would make it work?

My device is a DEB

edit - updated my TWRP to the latest version, wiped everything and the formatted data

tried to run the reformat tool again, but it only gives the option to revert to stock by typing stock in the TWRP terminal (which i did NOT do)

ran the log .zip again and it stays the same as before
[Nexus 7 (2013) Original Android Development] Clamor:
[MENTION=4864869]lucasbda1[/MENTION] what do you mean by "did not get the repartition to work properly"? Your deb was successfully repartitioned.
[Nexus 7 (2013) Original Android Development] lucasbda1:
Well, i flashed the latest lineage os just fine, but got the error 70 when flashing open gapps

Check out the images i just took, after flashing lineage os and trying to flash Gapps

https://imgur.com/a/GLNkkY9

Also, the gapps log mentioned on the images is here: https://pastebin.com/yysQNX7L

Final edit: I tried to install the Gapps mini instead of the stock and it worked just fine!! LineageOS is running fine with Gapps mini installed. Thanks for your help! :)
[Nexus 7 (2013) Original Android Development] sparkplugDev:
Hey [MENTION=5424240]Clamor[/MENTION] - I appreciate the work you've put into this and bringing the little Nexus 7 into 2019.

Unfortunately I've run into a soft brick, here. I've seen one other person in this thread with the same issue but I haven't seen anyone with an answer. After I ran the script it told me to go into terminal and run "modify;" I complied, everything seemed to go well and the device restarted. I got back into TWRP but now I'm getting errors mounting any of the partitions when I try to wipe and obviously I can't see anything on internal storage to try to flash:

Could not mount /data and unable to find crypto footer.
Failed to mount '/data' (Invalid Argument)
Unable to recreate /data/media folder.
Updating partition details...
Failed to mount '/system' (Invalid argument)
Failed to mount '/vendor' (Invalid argument)
Failed to mount '/data' (Invalid argument)
...done
Unable to mount storage
Failed to mount '/data' (Invalid argument)
Full SELinux support is present
Unable to mount /data/media/TWRP/.twrps
Formatting Cache using make_ext4fs...

It's not the end of the world but if you have any insight into what I can do to repair this, I would appreciate it!
[Nexus 7 (2013) Original Android Development] Clamor:
[MENTION=4582386]sparkplugDev[/MENTION] first of all try to format data (TWRP -> Wipe -> format data button -> type yes), than post here or in PM what was the output. If format is successful that reboot TWRP -> TWRP and check if data is present.

P. S. Did you use whole zip? You didn't flash sh files from inside, did you?
[Nexus 7 (2013) Original Android Development] sparkplugDev:
Thanks for the quick response! I didn't even think to try wiping data since it said it couldn't mount it. That seems to have cleared some of the more serious-looking errors and then I went into advanced and wiped /system and /vendor and that seemed to fix those too. If I would have just read the instructions more carefully that would have probably gotten me in the right place ;)

To answer your question, I didn't flash the sh files I flashed the zip as a whole. Still got an error 70 when trying to install 'stock' gapps, but that's not a big deal. Switched to mini and that went through fine. Thanks again!
[Nexus 7 (2013) Original Android Development] JT1510365:
You need to resize system in twrp
[Nexus 7 (2013) Original Android Development] MaxPowerOne:
Hey [MENTION=5424240]Clamor[/MENTION] thank you for the tool, I'm experiencing that the tool itself works (/system is 1.5) but only the stock size is avaiable for install and I get error /system is full when flashing gapps after the rom. Did I miss something?

[MENTION=5653319]JT1510365[/MENTION] how can I resize the partition?

---------- Post added at 06:08 PM ---------- Previous post was at 06:05 PM ----------

How can I resize? I'm having the same issue with only stock avaible size even if /system is 1.5gb
[Nexus 7 (2013) Original Android Development] JT1510365:
Then your system isn't big enough I manually resized both of my nexus 7 2013s to 2.9 gigabytes using the guide in the general section if you have a computer I can guide you through that process:) Just send me a pm and I will help you:) We need to make your system bigger
[Nexus 7 (2013) Original Android Development] sobokuone:
just a little clarification

I have just a few question before I try this. When it says "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.” What zip are you talking about, the repartition zip? And how do you do the resizing in TWRP? there is no resize button in TWRP that I every seen so I am sure you are talking about a command in Term.

In step 4 it says to (go to Terminal in ordinary recovery and input word that pack will tell you. What is Ordinary recovery? I am assuming its not TWRP recovery and what terminal? Is it TWRP’s Terminal or a pc one?

Last do I need to install Googles adb on my computer? I have used adb on Mac before but I just wanted to make sure I am understanding all steps before I start this. Since it says that a pc is mandatory.

for some of us who are a tab bit challenged lol it would be nice to have a youtube video walk thru. I learn better by being shown. I would even buy you coffee for that. Thanks for all the hard work all of you have and are doing. forgive me if I sound as a baby in this but I have never did this before. I have rooted and flashed roms and even used adb on my mac but this I have not done before.
[Nexus 7 (2013) Original Android Development] Clamor:
ROM zip

No, native TWRP feature. (Button in TWRP)

Ordinary recovery is TWRP of course. Most common custom recovery. Terminal is as well native TWRP feature.

No, ADB isn't mandatory. TWRP uses MTP for more user friendly connection way.