yashsingh1/xdaforums huggingface dataset:
[Nexus 4 Original Android Development] Clamor:
[MENTION=7125933]Sam Nakamura[/MENTION] partition log is clean, as it should be anyway. Problems you are facing aren't connected with your current partition layout. You should use UA TWRP, try to redownload gapps, reboot recovery -> recovery before resize etc.
[Nexus 4 Original Android Development] Sam Nakamura:
Yeah, all fine here and no issues...

I just made the stupid mistake that I copied an open GApps folder to the empty device after formatting internal storage, so the GApps folder interfered with the installation without me noticing it, well I did notice it only after posting here - sorry for the trouble, was pure user error!
[Nexus 4 Original Android Development] alexandruvlad:
Can you please describe what you mean by "resize" before flashing GApps?

I'm getting this error

Thanks in advance
[Nexus 4 Original Android Development] Clamor:
[MENTION=2419891]alexandruvlad[/MENTION] before flashing gapps you have to resize /system 2 times in row, first will face error, second will be successful. Resize is available in Wipe -> Advanced wipe -> check System -> change or repair filesystem -> resize filesystem
[Nexus 4 Original Android Development] AndyYan:
Wait, does this mean Treble support? If yes that would be incredible.
[Nexus 4 Original Android Development] Akhilesh S V:
I don't think Mako will get treble support
[Nexus 4 Original Android Development] Clamor:
[MENTION=4467696]AndyYan[/MENTION] no, /vendor ≠ treble support, BUT /vendor = additional flexible storage + actual multipurpose use.
[Nexus 4 Original Android Development] bgoel4132:
[MENTION=5424240]Clamor[/MENTION] i noticed something that while flashing the repartition zip the modified twrp shows an error mounting /vendor that is why it is unable to use the repartition with modified twrp, but the repartition worked fine with normal twrp, i digged xda and found that vendor partition is meant for treble supported roms, and may be i was trying to flash it on stock rom that is why it was showing wrror but earlier when i used it with custom rom it worked fine does that mean those custom roms are intended to have treble support. earlier the twrp did ahow the error mounting vendor but it didn't refused to flash the package.

[MENTION=5424240]Clamor[/MENTION] i also had a issue going back to stock partition when i flashed the repartition again and format everything the only error i got is mounting vendor and afterwards my phone sucks i flahsed stock rom and it gave me a bootloop finally i had to go through the LGNPST method to get it back to life, but after that also with custom twrp it shows error mounting vendor and not flashing the repartition , so can you please explain what basically we had to do get back the stock rom back after repartition
[Nexus 4 Original Android Development] Clamor:
[MENTION=8251477]bgoel4132[/MENTION] first about /vendor partition handle. It is possible to use standard TWRP with my repartition scheme in this case /vendor will be just hidden and there would be no opportunity to interact with it through TWRP interface. If UA TWRP is installed + repartition is made and you get error with mounting it, then just format it via Advanced wipe menu. On stock partition layout UA TWRP will give continuous error with unable to mount /vendor.

About stock. NO ONE MUST NOT FLASH PURE STOCK it is super bad idea. Never do that. Instead there are 3 solutions of stock flashing problem:

1. Backup your stock rom with TWRP (boot+system) and then restore it after repartition.

2. Unpack pure stock image and flash ONLY system image through fastboot mode.

3. Flash stock rom repacked for flash via TWRP (I'm Nexus 5 owner so I don't know if there are such roms for mako).

P.S. And remember don't do anything if you aren't certain in your actions. Check thread or ask, it is better than have more problems in future.
[Nexus 4 Original Android Development] dnize:
My system storage is now increased to 1,5 GB. BUT ,now, while trying to flash gapps I still get error message 70 because of insufficient storage space. Any idea what could be missed? Thanks in advance!
[Nexus 4 Original Android Development] Clamor:
[MENTION=4445165]dnize[/MENTION] you did not read OP carefully
[Nexus 4 Original Android Development] dnize:
I realized the resize issue later. Now it works. Thanks a lot :)
[Nexus 4 Original Android Development] jludt:
Any chance on some insight as to what my options might be for repartitioning a 16GB nexus 4 that I was trying to flash with pie. Trying to flash the mako_clamor zip and it's giving me "Failed to mount" errors which is pretty much what i'm getting when i try to do anything within TWRP.
[Nexus 4 Original Android Development] TundraLK520:
I'm getting unable to mount vendor errors. I went into mount section from twrp but can't select the vendor option, it allows me to select every other option just not vendor. Also part about missing updater script.

Update:

I downloaded the official twrp and tried again this time no vendor errors but it says missing updater script.

Final Update:

I can just say to read instructions carefully. I did the mistake of trying to repartition on UA twrp instead of official twrp which was giving me vendor errors. As for the updater script error, I re downloaded the repartition zip and it flashed successfully (make sure to tick system in mount options). Then it gave me directions to type modify in twrp terminal. Upon which it started the repartition and rebooted to recovery and the I flashed UA twrp and followed the procedure mentioned, don't worry about the mounting errors when wiping and then advanced wipe everything. Then flash ROM and after that resize through wipe section ticking the system option. Which results in error the first time and then do it again. This time no error. Now you can successfully flash gapps.
[Nexus 4 Original Android Development] pietls:
I had a Nexus 4 in the drawer and managed to put NitrogenOS on it that runs like a charm! But Gapps would not install. So i tried this method to resize System but after I tried resizing, I now have a Vendor partition of 0 Mb that stops all further actions and no resized system partition. Any suggestions?

Last update: Problem solved! I restored to an other ROM and started the procedure again. This time it worked and I installed Pie and GAPPS succesfully!
[Nexus 4 Original Android Development] gd6noob:
I was trying to install the CarbonRom and its saying my system partition is too small.. Will this fix the issue?
[Nexus 4 Original Android Development] nitin.chobhe:
yes, it'll fix the "issue".

Nitin
[Nexus 4 Original Android Development] Burner2000:
Hi,

Got a noob question. I hope this thread is the correct one.

Is 1.5G enough space to install Carbon 9.0 ROM along with Opengapps Micro Package (210MB zip file size)?

My previous experience with installing custom ROMs is limited to just flashing using TWRP. First time I am even thinking about required partition size for different packages etc.

Any help and/or responses would be appreciated greatly.

Regards,

- B
[Nexus 4 Original Android Development] nitin.chobhe:
I guess that should be enough.

Nitin
[Nexus 4 Original Android Development] Burner2000:
Nitin,

Thanks for the reply man.

Yeah, I went ahead and used the script to repartition & installed latest Carbon ROM with Opengapps Arm Micro package. Seemed to work fine.

Thanks to OP for the script & also to Nitin for continuing to maintain newer ROMs for N4.
[Nexus 4 Original Android Development] track21:
Hi, I've tried to download the partitioning zip many times, but the link doesn't work to me, is there any other link? thank you

---------- Post added at 10:20 AM ---------- Previous post was at 09:36 AM ----------

ok, done, thank you
[Nexus 4 Original Android Development] MacacoVei:
Worked! Just installed Carbon-CR 7.0 + gapps 9 + magisk.

I confessed I didin't read correctly. My fault. I'm used to just flash and install and had to read and search.

These are important:

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).

-> I think for me it was "open" (i dont remember well. just one word)

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).

-> I forgot how to install img. Go to fastboot (volume up/down pressed while turn on) -> fastboot devices (check if your phone is synced) -> fastboot flash recover <your img file.img>

Thanks a lot OP :)
[Nexus 4 Original Android Development] mauriciognr:
Will you update the UA recovery to lastes TWRP?
[Nexus 4 Original Android Development] saeedgh08:
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).

Sorry bur What does this mean?

What should I do?
[Nexus 4 Original Android Development] TundraLK520:
Flash the repartition zip (make sure to tick system in mount options). It gives directions to type something (modify in my case) in twrp terminal. Terminal can be found under advanced tab in twrp.

I wrote my experience about flashing this zip in this thread some time back , if u have some patience, u can check that too.
[Nexus 4 Original Android Development] saeedgh08:
error failed to mount /vendor ( invalid argument)

What should i do ? Help

(Device is root & bootloader is unlock)
[Nexus 4 Original Android Development] pxrave:
no update planend?
[Nexus 4 Original Android Development] saeedgh08:
Ha ha now system & data mount error
[Nexus 4 Original Android Development] TundraLK520:
Just copy n pasting my previous post:

I'm getting unable to mount vendor errors. I went into mount section from twrp but can't select the vendor option, it allows me to select every other option just not vendor. Also part about missing updater script.

Update:

I downloaded the official twrp and tried again this time no vendor errors but it says missing updater script.

Final Update:

I can just say to read instructions carefully. I did the mistake of trying to repartition on UA twrp instead of official twrp which was giving me vendor errors. As for the updater script error, I re downloaded the repartition zip and it flashed successfully (make sure to tick system in mount options). Then it gave me directions to type modify in twrp terminal. Upon which it started the repartition and rebooted to recovery and the I flashed UA twrp and followed the procedure mentioned, don't worry about the mounting errors when wiping and then advanced wipe everything. Then flash ROM and after that resize through wipe section ticking the system option. Which results in error the first time and then do it again. This time no error. Now you can successfully flash gapps.
[Nexus 4 Original Android Development] saeedgh08:
Hi I read your pre post but my problem is: system and data not mount and " invalid argument error error16" and system & data do not repair or resize and change type

i Tried to unbrick method on first page it is not work for me

Pls guide me to i can repair my device [MENTION=5424240]Clamor[/MENTION]
[Nexus 4 Original Android Development] Clamor:
[MENTION=7341652]saeedgh08[/MENTION] format system and data in advanced wipe
[Nexus 4 Original Android Development] saeedgh08:
Hi i can't i type "yes" but this error is shown (pic attached)
[Nexus 4 Original Android Development] saeedgh08:
[MENTION=5424240]Clamor[/MENTION] and this pic
[Nexus 4 Original Android Development] Clamor:
[MENTION=7341652]saeedgh08[/MENTION] take a partition log
[Nexus 4 Original Android Development] saeedgh08:
[MENTION=5424240]Clamor[/MENTION] thx for your method

I read the instructions carefully and stepped in and the phone came in. But now, the memory capacity of 8 GB and Bluetooth do not have a MAC address. How to fix the problems?
[Nexus 4 Original Android Development] Clamor:
[MENTION=7341652]saeedgh08[/MENTION] primary take a partition log, then we will fix else
[Nexus 4 Original Android Development] Clamor:
3.3.1-1 UA TWRP is already available in download section.
[Nexus 4 Original Android Development] down33:
in fact easiest way TO Repartition android system

Thank you ..
[Nexus 4 Original Android Development] p3terr:
[MENTION=5424240]Clamor[/MENTION] Noob question here, I don't know where to find this part of the instructions in TWRP

1. Boot into recovery (You need to allow system partition modification to be able resize /system in recovery).

I'm also currently running TWRP 3.2.1.0, will that work to do the first steps before flashing the new TWRP mention in OP?

help.
[Nexus 4 Original Android Development] Clamor:
[MENTION=3178097]p3terr[/MENTION] if you are making repartition for the first time than you can use TWRP from TeamWin any version 3+. If you are updating from UA TWRP you need just to flash it.
[Nexus 4 Original Android Development] MACAR¥O D£ T€XA$:
Need little help please

Hello, I have a doubt I read a comment about the repartition, which says that if it is the first time I can use the official team win twrp I have the latest version installed, my doubt is and to be sure I do the steps for repartition with the team win and then install the one provided in the post or can I continue with the team win nothing else? the question is about the risk of losing mac address of wifi / imei or bluetooth, it is the first time I do repartition in my mako

PD: 3.3.1-0 is my twrp version
[Nexus 4 Original Android Development] finaluser:
Thank you very much to all the work for this incredible ROM, it is installed and working much better than expected on my Nexus 4 8GB, now it is even faster than other firmwares. I'm so excited. Thank you!!
[Nexus 4 Original Android Development] ze7zez:
custom theme

[MENTION=5424240]Clamor[/MENTION]

Due to the damaged area of the touch screen, I would like to change the appearance and position of the twrp keys.

However, after making changes, for example in /twres/ui.xml and restarting, the file is still original, i.e. without my changes.

How could I modify the TWRP appearance?
[Nexus 4 Original Android Development] Clamor:
[MENTION=4810659]ze7zez[/MENTION] I need few days to investigate this and then I'll provide answer in this post.

Theme is loaded from ui.zip that lies in TWRP/theme folder
[Nexus 4 Original Android Development] PsK2010:
Thank you very much Clamor! I just repartitionned my old Nexus 4 (on official Lollipop Stock Rom) to try LineageOS 16 GO Rom and everything works super smooth! :D
[Nexus 4 Original Android Development] ALEXIS_0071:
it would be great if someone made a video explaining how to do it, so that new ones like me, be guided
[Nexus 4 Original Android Development] Vegeta IV:
Hi guys and thank u for this work all working good but for now i need to install official google rom so is it safe? Or i need repack it somehow?
[Nexus 4 Original Android Development] sellless:
Hi there,

I have an old Nexus 4 where the screen doesn't work along the right side of it so I can't press enter after I type modify.

I am trying to install a battery friendly rom before handing this off to an friend of mine but I can't becuase of the system partition size.

I tried "adb shell" but it wasn't working, though I can see my device.

I realize that this thread is quite old but I would really appreciate some help as the last offical stock build of Android for mako is the only one I can seem to get to work and we all know that isn't good enough.

Thanks to anyone that can help.
[Nexus 4 Original Android Development] ze7zez:
Here we write about the repartition.

Just a hint, because I see that you do not have much interest in reading the forum

and you would like to have work done without any effort.

Trick with changing the TWRP graphical interface
[Nexus 4 Original Android Development] Luis_Viera:
Modify the system partition Nexus 4 Mako 16 GB with Mako_clamor_repartition_zip

I want to thank you for the publication of this tutorial, I applied your instructions and followed them to the letter and finally, after several attempts, I managed to modify the system partition and updated my old but useful LG Google Nexus 4 E960 Mako 16 GB with OS Android 10 Lineage 17, the only problem I had was that the Terminal did not work for me and I could not execute the "modify" instruction but I connected the phone to my PC and using ADB and Fastboot I introduced the command "adb shell modify" and it automatically modified the system partition and I was able to flash the ROM and its GAPPS, thanks.
[Nexus 4 Original Android Development] dj_s_021:
please help please help me

I was the installation when I unfortunately encountered the following error:

Failed to mount '/vendor; ( invalid argument )

What should I do ??

Of course Despite this error I'm ROM and installed! Is it okay for the phone to crash over time?

How do I know if the REPARTITION is working properly?
[Nexus 4 Original Android Development] coffee-coffee:
Decryption on Android 10 (CarbonRom)

Hey there,

thank you for the guide, all worked well. However, after encrypting my mako on Android 10 (CarbonRom), TWRP is not able to decrypt the data any more. Any thoughts on this? :confused:

Kind regards

coffee
[Nexus 4 Original Android Development] llazcanoster:
Hello!!

I Have the same problem, I wanted to check if anyone has trouble decrypting the storage in TWRP, and if so, is it caused by the rom or by the recovery?

Thanks for the great work!
[Nexus 4 Original Android Development] ze7zez:
Did you use twrp 3.4 for this?

Note! This version has an annoying restart error so you have to do it manually in the terminal, e.g.

twrp reboot recovery
[Nexus 4 Original Android Development] llazcanoster:
Yes, I have tried 3.4.0.0, 3.3.1.0 and 3.3.1-1_UA, with the same result
[Nexus 4 Original Android Development] basturd22:
Oh my gosh! oh my gosh! you fixed my freaking fone!
[Nexus 4 Original Android Development] thangcuoi:
My Nexus 4 was running ASOP 6.0.1. In order to flash a more current rom, I needed to resize its partitions.

After flashing mako_clamor_repartition.zip in official TWRP 3.4, my Nexus 4 seems to have lost all partitions.

I managed to flash twrp-3.3.1-1_UA-mako.img after, but it's unable to mount any partition apart from Cache which it reports as zero byte. Trying to wipe/erase partitions does not work as it could not mount them.

When I try reflashing the stock rom, it reported that it can write to Boot and Recovery but not System partition.

I have also tried plugging in a micro usb drive, but TWRP won't mount it either.

Does anyone have any advice on how to rescue my Nexus 4?

Also, I managed to get back into TWRP one time. The rest of the time, it get stuck on the Google logo screen. Holding down Volumes + Power just restart the phone instead of going to the bootloader screen. Alternatively, it would shows the battery charging logo and my Windows computer would play the sound that it has detected a device.

https://photos.app.goo.gl/uaesEAVVwQ6RApaL9
[Nexus 4 Original Android Development] ze7zez:
Links to your pictures can only be seen after trying to answer the post. What TWRP did you use to make the pictures?

What happens after using mako_clamor_repartition.zip in twrp-3.3.1-1_UA-mako?
[Nexus 4 Original Android Development] thangcuoi:
https://photos.app.goo.gl/uaesEAVVwQ6RApaL9

I flashed the clamor repartition zip file with the official TWRP 3.4. At this point all partitions (except Cache) could not be mount or wipe. I managed to flash twrp-3.3.1-1_UA-mako to replace the 3.4 version from the computer but that did not help with being able to mount or wipe the partition.
[Nexus 4 Original Android Development] LunkHead:
EDIT: And I'm an idiot and missed the format all partitions step. Leaving the rest of this post as a testament to my shame =)

I'm in the same boat with my 16GB Nexus. Ran the mako_clamor_partition, then went to the terminal and specified 'modify', and now the partitions on the device are in a wonky state.

When inspecting the partitions in twrp in the 'Advanced Wipe' menu, checking a partition, and hitting 'Repair or Change File System' these are the results:

/system is 1476MB

/vendor is 0MB

/data is 0MB

"internal storage" says "Invalid partition selected"

/cache is 98MB

"Dalvik/ART Cache" says "Invalid partition selected"

Because internal storage and data are 0/invalid copying files to the device isn't possible. There is no storage available/detected when connecting via USB to a PC.

I tried the method of unbricking the N4 from this thread:

https://xdaforums.com/nexus-4/general/tutorial-how-to-unbrick-n4-t2347060

However the LGNPST program does not detect the phone when connected in download mode.

Is there any way to restore the partition table from inside TWRP with no access to the internal device storage? It looks like fdisk is installed in /sbin (though running 'sbin/fdisk -ul' reutrns nothing?), does anyone have the proper commands to issue to get the partition table back to stock?

Also, if I attempt to copy the logs, this error is in the output:

'Failed to mount '/data' (Invalid argument)'

Any ideas how to get out of this state?

Thanks!
[Nexus 4 Original Android Development] ze7zez:
The easiest thing to do is to go back to stock rom and start all over again, but this time in the right way.

.
[Nexus 4 Original Android Development] LunkHead:
Oh nice! I somehow missed that guide, thanks for linking it!

I did managed to un-bork the phone because I had missed the step to re-format all the partitions so all is well. And I'm leaving my post with all that in it as a permanent shrine to my shame and poor reading comprehension skills. =) And also, in case anyone else makes the same blunder I did.
[Nexus 4 Original Android Development] matata86:
I have same problem. I try back to stoch, but if I flast system img, so returt error: partition table doesn't exist

Any idea?
[Nexus 4 Original Android Development] ze7zez:
Try to fix or refresh the partition.

TWRP -> Wipe -> Advanced Wipe -> Check system -> Repair or Change File System -> Repair File System -> Swipe to Repair

If it doesn't help, then

TWRP -> Wipe -> Advanced Wipe -> Check system -> Repair or Change File System -> Change File System -> ( choose something different than you see in the description under "Mount Point /system") -> Swipe to Change

and then repeat this action by selecting EXT4:

TWRP -> Wipe -> Advanced Wipe -> Check system -> Repair or Change File System -> Change File System => EXT4 -> Swipe to Change

.
[Nexus 4 Original Android Development] matata86:
Thank you, but no success I Try all choses.

Updating parititon details...

Failed to mount '/system' (invalid argument)
[Nexus 4 Original Android Development] ze7zez:
Use the [GUIDE] Increase your Nexus 4's system partition for more space!
[Nexus 4 Original Android Development] iniyanc1:
I used the latest TWRP 3.4.0 and after following the directions, I seemed to be stuck in a TWRP recovery bootloop after sideloading my ROM. TWRP said I had no OS installed and I couldn't even Power Off, it would just go back to TWRP.

However, I was able to press and hold the power button and volume down buttons in TWRP which rebooted my Nexus 4 and was able to boot into my system ROM normally.
[Nexus 4 Original Android Development] dukie1993:
Links in the first message don't work. Please share the files. Thanks!
[Nexus 4 Original Android Development] PhilRoll:
download links don't work! plz FIX it
[Nexus 4 Original Android Development] Jack love:
[QUOTE =“ ALEXIS_0071，帖子：81116275，成员：4358472”]

最好有人录制视频解释如何做，以便像我这样的新朋友得到指导

[/引用]

是！i need a movie to help！
[Nexus 4 Original Android Development] bo0gietrain:
Hi, i found the file here:

mako_clamor_repartition.zip | by Bender for Nexus 4

Download GApps, Roms, Kernels, Themes, Firmware, and more. Free file hosting for all Android developers.

androidfilehost.com
[Nexus 4 Original Android Development] Polo4413:
Can you please reupload files? Links are down