yashsingh1/xdaforums huggingface dataset:
[Mi 3 General] vish0815:
Hi I'm having trouble doing this. Cmd replies that userdata is mounted and I need to unmount it. Any idea on how to overcome this?
[Mi 3 General] vish0815:
Hi! Hey can you share how did you manage to extend userdata partition?

Or if not anything, could you help me out with unmounting the userdata partition?

I am trying to edit partition tables everything else works great but when I try to edit/remove mmcblk0p28 i.e. the userdata partition, the command prompt replies that it is mounted
[Mi 3 General] purval6300:
yes pls someone tell me how to convert system2 to user data
[Mi 3 General] love.thakur3:
Is here any easy method to chng partition size via zip file..?
[Mi 3 General] i snort flour:
A simple thread search would have given you your answer immediately.

It's definitely not in post #29 on the 3rd page which was ported from another device to ours by a great developer.
[Mi 3 General] love.thakur3:
m facing this error
[Mi 3 General] :
Don't wanna try until OP make a proper video tutorial for this or Someone else try got succeeded with this application.. Btw great effort if this is working. :)
[Mi 3 General] Silac_8:
Try to run Command Line as an administrator
[Mi 3 General] Amruth Pillai:
I can confirm that this works perfectly! :) Got 1.2 GB on my primary system partition... flashed TWRP cause for now, it supports only 1 system... working like a piece of cake! :D Thank you so much for this amazing tutorial! :)
[Mi 3 General] sumit.roy:
as a request, can anyone make a video of this tutorial?

cz previously there was a tutorial about partition rearrangement for Mi3 . Many including me tried it, and got the device unusable. Had to go to service center and got the whole motherboard replaced.
[Mi 3 General] srvoleti:
Yes. I agree with you 100%. May I ask the dev to make a video tutorial so that many people can try this without any fear.
[Mi 3 General] sumit.roy:
did it, but same result
[Mi 3 General] vasishath:
Can one directly format the partition to ext4 by using the format system 1 option in cwm ? Or is it neccesary to use those commands in the adb shell ?
[Mi 3 General] Amruth Pillai:
Now that you say it, yes... it is possible to format using CWM as well, it is essentially the same command that is being performed, but manual is always the best option! :)
[Mi 3 General] audahadi:
This Procedure May Will Brick Your Device!!!!!​

Only for users who comfort with single partition layout only !!!

This is a script to partiton your system partition as like stated in OP. Tested with Clockworkmod recovery.

How to use? Just flash through recovery on either partition. Remember, this will wipe your system partition, do backup for safe or no if you like to live dangerously.

Repartition_MI3W_1_2GB.zip

Credit :

http://xdaforums.com/showthread.php?t=2765846

http://xdaforums.com/galaxy-s3/development/guide-extra-1-5-gb-user-data-t2762594
[Mi 3 General] HoiFung:
Much obliged! Is in need of this.
[Mi 3 General] Amruth Pillai:
Could someone provide the method or script to revert back to the old system partition layout as well?
[Mi 3 General] i snort flour:
Just unzip it and open Repartition_mi3w_1_2gb\meta-inf\com\google\android\update-binary and edit these 2 lines:

parted /dev/block/mmcblk0 mkpart primary 403MB 1740MB

parted /dev/block/mmcblk0 mkpart primary 1740MB 1745MB

To this:

parted /dev/block/mmcblk0 mkpart primary 403MB 1074MB

parted /dev/block/mmcblk0 mkpart primary 1074MB 1745MB

Then save the file, then re-zip all the files with a different zip folder name and poof you will have a zip file to partition almost everything to system1 and a zip to partition your systems back to factory

Thanks audahadi for sharing this with us

---------- Post added at 10:08 PM ---------- Previous post was at 09:41 PM ----------

PS if you brick your phone you can take me for everything I own which is $1.83 USD in change and my phone [emoji90]
[Mi 3 General] (M)iPhone:
Used space more than 1 GB

I tried the method given in OP, and successfully resized the partitions. But when I tried to flash GApps(about 200MB) over CyanogenMod 12 (about 250 MB) it showed "Insufficient storage" error... Then I flashed another gapps package which was smaller,(about 120MB), it flashed successfully...

Then I opened DiskInfo to check and it showed that System has 1.1GB of 1.2GB used! I don't know what went wrong... I followed all the instructions carefully...
[Mi 3 General] ancola66:
-This means that after flash this zip file on the device only a single system partition?

-It will not lose data in the internal storage ( example rom.zip, rom backup, music, picture....) ?

-And this also perform on Mi4 device ?

Very thanks and expect an answer soon :o
[Mi 3 General] ashdwoers:
1- yes

2- no. but jut make a backup , incase bad thing happens

3- dunno :p
[Mi 3 General] :
I confirm that this method works on mi4
[Mi 3 General] audahadi:
Still both system1 and system2 exist. Only reduce size for system2.
[Mi 3 General] ancola66:
Thanks for the quick reply,

That's what I want on my device mi4:good: But if the latter on someday I want to go back as initially ( two system partitions )., so there is method to this?:o
[Mi 3 General] (M)iPhone:
Has anyone else encountered this?
[Mi 3 General] i snort flour:
Yes just wipe your system, cache, boot and data. Then perform a restore or clean install and it should solve your problem. For some reason say your system was at 95% full before the repartition it will think it is 95% full after the repartition until you wipe the system.
[Mi 3 General] spideman3:
Error Messages failed remote partition table doesn't exist

Upon return from 5.12.24 to 5.12.4 came the message failed remote partition table doesn't exist. Prosthesis with Miflash ahn rom fastboot (12 rom), Mipc, nothing. The mobile all you do is enter in recovery & fastboot. With some Roma and via minimal_adb_fastboot_v1.1.3_setup turns on but nothing else. Please can someone help?
[Mi 3 General] murattiy:
1- FİRST FASTBOOT ROM DOWNLOAD

http://bigota.d.miui.com/V7.0.5.0.K...ICI_20151016.0000.3_4.4_global_d918563f7e.tgz

2- SPECİAL VERSİON ALL.FLASH.BAT https://drive.google.com/file/d/0B2U...13VGNHTTg/view

AND put flash_all.bat - INSİDE Global Stable Version Fastboot ROM

CONNECT PC WİTH FASTBOOT MODE click flash_all.bat
[Mi 3 General] spideman3:
the link in the https://drive.google.com/file/d/0B2U...13VGNHTTg/view[/url] not working, thank you hapy new year
[Mi 3 General] Pi3rluigi:
I would like to install last Ivan's AOSP rom on my Mi3w,but as explained in the changelog, system one has to be bigger than 1,4Gb.

Here the question: can I resize system1, system2,cache and user data moving all of them forward of 1500Mb? Or cache has to start exactly from 1745Mb?

To be clear:

actually I had this

25 403MB 1740MB 1337MB ext4 system

26 1740MB 1745MB 4.83MB ext4 system1

27 1745MB 2147MB 403MB ext4 cache

28 2147MB 62537MB 60390MB ext4 userdata

I would like to set this

25 403MB 1903MB 1500MB system

26 1903MB 1910MB 7MB system1

27 1910MB 2313MB 403MB cache

28 2313MB 62537MB userdata

And if something goes wrong, can I simply restore nandroid backup or do I have to rebuild all the partitions before?
[Mi 3 General] danielzyy:
Guys I used this mod to change my phone but I need to install stock version back to claim warranty. How do I do that in the easiest way possible?

Last time I messed with it I almost brick the phone...

---------- Post added at 08:26 PM ---------- Previous post was at 08:18 PM ----------

Hey are you sure just going into CWM and flasing Repartition_Stock-Partition_MI3W.zip (on a Mi4, not 3) will let me install stock MIUI back?
[Mi 3 General] TofikLupus:
It's a bit old post now, but I'm pretty sure it worked, i used it to switch back to the stock layout so the Updater app in MIUI can work.

MI3W 64GB/Tapatalk
[Mi 3 General] edilioilre:
I will try as soon as possible :)
[Mi 3 General] IAmKifayat:
I accidentally removed some partitions like recovery, system, userdata. My phone is in fastboot now, can't go to recovery or use adb. Is there anyway to restore stock partitions now?

Please reply.
[Mi 3 General] IAmKifayat:
Removed partitions after 20 (recovery, system etc) accidentally, my phone is now in fastboot, can't flash recovery or fastboot rom because of absense of partitions. Please help.
[Mi 3 General] sidroid494:
Hi I flashed stock partition zip via CWM recovery on my mi4 and the internal storage is erased. System occupies the whole 13GB now. Could I change the commands (originally to create extended partition)to create back the partition "userdata"?
[Mi 3 General] TofikLupus:
Yes you can but don't forget there's one more partition before the userdata one, called cache.

MI3W 64GB/Tapatalk
[Mi 3 General] sidroid494:
Thanks TofikLupus. I didn't mess with the cache partition however boot and boot1 partition were removed and my phone could boot only into fastboot mode. Tried installing recovery but couldn't (tried cwm, twrp and even stock recovery). Is there any possibility of repartitioning from fastboot mode? I have been searching but found no solution as yet.
[Mi 3 General] Pi3rluigi:
You have to flash the whole rom using MiFlash, that will create all the partition!

And if you want try MM, check this out:

http://xdaforums.com/showthread.php?t=3280037

Inviato dal mio D6633 utilizzando Tapatalk
[Mi 3 General] sidroid494:
Thank you Pi3rluigi but I already tried it with MiFlash but the flashing stopped after 5s with error. The log file shows following error

"[000060AC]13eb4d27	0.45

[000060AC]13eb4d27	0.45	$fastboot -s 13eb4d27 erase boot

[000060AC]13eb4d27	0.48	erasing 'boot'...

[000060AC]13eb4d27	0.48	FAILED (remote: Partition table doesn't exist

[000060AC]CScriptReport::DoWork(413): Unspecified error(0x80004005)

[000060AC]GetFactoryObject(1338): The specified service does not exist.(0x800704db)"
[Mi 3 General] Pi3rluigi:
Give a look here
[Mi 3 General] sidroid494:
Thanks a ton Pi3rluigi. Flashed the whole rom with MiFlash but changed the Flash_all batch file to special batch file mentioned in the MM thread. My Mi4 is working now
[Mi 3 General] Prashanth Meesara::
i am on extended system partition and want to go back to complete stock partition and stock setup since i am beta tester for miui marshmallow and i need to be on stock setup, but after reading many threads i came to know that we cant use Miflash when using extended partition. So i didnt try, which method is safe? flash the zip via recovery? or use fastboot commands to flash? or will new Mi flash will restore my stock partition table? bcoz in my other thread i got reply that MiFlash will restore Partition table also.
[Mi 3 General] Pi3rluigi:
I was on Ivan's 6.0 with 1,2 Gb system 1 partition ;I flashed fastboot rom and than 6.1.1

My experience says that fastboot rom flashed with MiFlash, rebuild the whole partition table.

Inviato dal mio D6633 utilizzando Tapatalk
[Mi 3 General] akp.ajinkya:
Which of these partitions are safe to be removed and formatted again,if needed in case of a brick and creating new partition table.
[Mi 3 General] Pi3rluigi:
If you brick the phone, there's no way out, you have to flash fastboot rom with MiFlash.

Trying to rebuild via adb, seems it doesn't work!

Inviato dal mio D6633 utilizzando Tapatalk
[Mi 3 General] akp.ajinkya:
I'm asking if I mess up my partition table and can't get into either recovery or fastboot mode.
[Mi 3 General] Pi3rluigi:
The worst case is a black screen and your phone not reconised by pc, but you can restore it always from MiFlash and fastboot rom, there's a guide here in Mi3 section

Inviato dal mio D6633 utilizzando Tapatalk
[Mi 3 General] Vasoconstriction:
Can anybody help me in getting the system partition to 1.5gb? I only got it from 403 to 1740 so 1.337gb
[Mi 3 General] TofikLupus:
What kind of craziness do you need 1.5GB system partition for? I don't think that's possible unless you shrink userdata partition and move cache a bit higher. But I've already read somewhere here that adb doesn't give access to manipulation of any kind with userdata because it's mounted. And I don't know if there is some way to unmount it so it can be accessible.

MI3W 64GB/Tapatalk
[Mi 3 General] atomix18:
Can you make zip file for resizing partition, without going from MIUI MM update, so we can flash Ivan's AOSP MM which requires the bigger partition, not 1.2 gb.
[Mi 3 General] Vasoconstriction:
Yeah it's crazy. Ivan's AOSP 6.0 requires 1.4gb since the new update. I managed to get my system to 1.34gb, but it won't mount system. Same with 1.2gb

Edit: for anybody else that wants a system partition of 1.4gb for Ivan's AOSP. The problem isn't the size (since the system takes only 850mb) but it's that the partitions need to be merged. Expanding one partition and leaving the other to exist isn't enough. Ivan's instructions don't work when you have an expanded partition size of 1.2gb while the second system still exists, so follow these instructions to get it to work:

1. Download the cancro_merge_partition (2).zip to your computer (from http://en.miui.com/forum.php?mod=viewthread&tid=209941&highlight=ivan+aosp )

2. Extract it and open the "images" folder

3. Hold shift, click right mouse button and click "open command prompt here"

4. Boot your device into fastboot mode (Volume down + Power button), connect your device to the PC and type "fastboot devices" in the command prompt and see if some random numbers show up

5. Type the following commands and enter after each one (so you'll flash the files one by one:

fastboot flash partition gpt_both0.bin

fastboot flash tz tz.mbn

fastboot flash dbi sdi.mbn

fastboot flash sbl1 sbl1.mbn

fastboot flash rpm rpm.mbn

fastboot flash aboot emmc_appsboot.mbn

fastboot reboot-bootloader

fastboot erase DDR

fastboot flash misc misc.img

fastboot flash modem NON-HLOS.bin

fastboot flash recovery recovery.img

fastboot boot recovery.img

6. Now your phone boots into the recovery and you can flash the Ivan's AOSP 6.1.1 and the Benzo Gapps without error or endless Mi logo.

Sorry if it's a little off-topic and ROM specific.
[Mi 3 General] muraliaggithaya:
Just wanna ask this. If i follow this method, will i loose everything in my internal storage??
[Mi 3 General] TofikLupus:
No, because this method doesn't affect the userdata partitions, only the modems and other firmware stuff.

MI3W 64GB/Tapatalk

---------- Post added at 15:37 ---------- Previous post was at 15:33 ----------

I got a different question. Will KK based MIUI work on this merged partition table? I think it might have some flash issues because it expects 2 partitions and the partition table will only have one of each kind.

EDIT: Nevermind,

But MIUI site wants me to reply to be able to download the attachment. I hate how this thing works on their site.

MI3W 64GB/Tapatalk
[Mi 3 General] muraliaggithaya:
True dat .. The sickest idea one can imagine to get "activity" in the thread..

---------- Post added at 03:25 PM ---------- Previous post was at 03:24 PM ----------

True that.. The lamest idea to get some "activity" in a thread..
[Mi 3 General] sushd99:
I got some questions:

1) Will I be able to flash miui 7 mm and cm 12.1 on this 1.5gb partition?

2) In case I am not able to access recovery, can miui kk fastboot roms be flashed on this partition?

3) If some error occurs, is there a way to revert to stock partition table?

4) Oh yes....how is it 1.5gb? sys1 syst2 600mb each total 1.2gb.....where does extra 300mb come from?
[Mi 3 General] TofikLupus:
1) Yes, I merged the partitions yesterday and I'm running official CM13 now. And since this is the new layout for MM based MIUI, then yes it will work also on MIUI.(But instead of 1.5GB partition I still have only 1.2GB)

2)If you flash KK based fastboot MIUI, the partitions will revert back to the old layout, 2 partitions of each kind.

3) You do that by flashing KK based fastboot MIUI.

MI3W 64GB/Tapatalk
[Mi 3 General] sushd99:
Thanks....

But how didnt you get 1.5gb using this method? Users posted screenshots showing 1.5gb system partition

Did you use this method?

Edit: Ah I see you have used this method. Dont know why you have 1.2 gb.
[Mi 3 General] TofikLupus:
I was reading some comments on the miui thread and found that some people also have 1.2GB instead of 1.4GB(1.5GB is for Virgo, Mi Note, not Cancro). I dunno either, but still I think that I have a lot of space left, I doubt Android 6 is gonna take ALL 1.2 or 1.4GB of space, somebody said that Ivan's AOSP takes around 800MB.

MI3W 64GB/Tapatalk
[Mi 3 General] Pi3rluigi:
This is what it takes on my Mi3w

Inviato dal mio D6633 utilizzando Tapatalk
[Mi 3 General] TofikLupus:
MI3W 64GB/Tapatalk
[Mi 3 General] Vasoconstriction:
Yeah, the rom takes 800mb, so 1.4GB is not needed. Titanium backup shows 1.31GB of system ROM for me, while diskinfo says 1.2GB. Whichever is the case, you only need 800mb so it's all good.
[Mi 3 General] TofikLupus:
Here is the most accurate answer we can get - Parted command. And the partition size really isn't far from 1.4GB on size.

Basically there should be no gain in space for system or any other partition because the partitions literally only got merged together, so all the previously duplicate partitions are now one big partition with twice the original size.

The only way to get more space to system is to remove the merged partitions and make them all the original size and then add the extra free space to the system partition.

But I'm not sure if this method would work. Mainly because I'm not sure about the size of the new fastboot partition images, if they're larger than the original partition sizes, there won't be any way to flash all the required firmware into the new made partitions.

MI3W 64GB/Tapatalk
[Mi 3 General] atomix18:
Hi bro! Now i am with mokee rom and extended 1.2 gb. partition, but i want to have the new partition size for future maybe i will try Ivan's AOSP. I want to ask you will i lose my current rom doing the merge of the partitions and do i have to go back to stock partition before doing these comands in fastboot?
[Mi 3 General] TofikLupus:
Do it straight from the extended partition, I did it and everything was fine. And yes, you will lose your current ROM, but only what's in the system partition, all data will stay along with all appdata, so you can reflash your current ROM and all your settings and apps will stay.

MI3W 64GB/Tapatalk
[Mi 3 General] Vasoconstriction:
Ah nice I came from Mokee too with 1.2gb extended partition, so you don't need to go back to stock first. You will lose your system (so your ROM), but data and internal storage won't be touched. Data of Mokee isn't compatible with AOSP though, so you have to do a clean install.
[Mi 3 General] atomix18:
Thanks man! And one more question: Will i lose TWRP recovery after doing the merge? Cheers!
[Mi 3 General] Vasoconstriction:
If you follow the guide step-by-step you'll see that you flash Ivan's TWRP in the last step. I recommend installing the ROM through that. Then you can flash normal TWRP 2.8.7.0 again
[Mi 3 General] atomix18:
Are you using Ivan's Aosp? Can you tell me what is battery life, do you have battery drains, awakes? Thankss!
[Mi 3 General] Vasoconstriction:
I was using Ivan's AOSP for a while, but now switched to Mokee Marshmallow. Ivan's AOSP's performance is sublime and screen-off battery life is insane. There are barely any wakelocks when screen-off so only a 2% overnight battery drain while having wifi and mobile data on. (I was using greenify with shallow hibernation, which let's GCM push messages wake up the apps, but restricts sync and useless wakelocks etc.). The thing I liked most about Ivan's AOSP was the camera, especially the HDR. The only big downside was that you're only able to shoot one HDR pic, then you have to reopen the camera. Sound quality with headphones is also a lot worse than Mokee (I've got some pretty nice In-ear monitors so I need good audio since a DAC is not nice to have in your pocket while cycling somewhere). I honestly think that Mokee is the best marshmallow rom out there at the moment now that it fixed their gyro sensors. Ivan's is worth a try too though. If the camera bugs, Now-on-tap (not working in Ivan's) and the bad audio quality is fixed I will go back there.
[Mi 3 General] atomix18:
It gaves that error what is happening i can't proceed further :)

What flash_all.bat will do if i run it, will it delete my internal storage?
[Mi 3 General] atomix18:
Successfully merged i forgot to move the files from images folder! Thankss!
[Mi 3 General] Vasoconstriction:
I would try to flash the flash_all.bat just to try, it doesn't touch your internal storage.
[Mi 3 General] hrishikeshgramani:
Can i flash MIUI Marshmellow using this partition?
[Mi 3 General] sushd99:
Yes you can since the partition table created by this method is the same as created and required by miui m.
[Mi 3 General] 11prathmesh:
[Urgent (Help!)]

Hey I tried this method. All commands worked properly. Phone booted into recovery and I allowed twrp for modifications on first boot. But, I see my /data is 0Mb and hence twrp always shows the error Failed to Mount '/data' (Invalid Argument). Even the Internal Storage is 0 Mb. Don't know where it went wrong.

PS: I was on the stock partition format before merging the partitions.
[Mi 3 General] Vasoconstriction:
do this for me:

1. hook your phone up to the PC, go into your recovery (not fastboot) and open a command prompt

2. type in the following codes:

adb devices

adb shell

parted /dev/block/mmcblk0

unit MB

print

3. make a screenshot

you're supposed to get a table of something like this, i wanna see that:

Number Start End Size File system Name Flags

1 0.02MB 2.10MB 2.08MB sbl1

2 2.10MB 3.15MB 1.05MB rpm

3 3.15MB 4.19MB 1.05MB tz

4 4.19MB 5.24MB 1.05MB DDR

5 5.24MB 6.29MB 1.05MB ssd

6 6.29MB 7.34MB 1.05MB dbi

7 7.34MB 11.5MB 4.19MB aboot

8 11.5MB 16.8MB 5.24MB bk1

9 16.8MB 21.0MB 4.19MB misc

10 21.0MB 29.4MB 8.39MB logo

11 29.4MB 67.1MB 37.7MB bk2

12 67.1MB 68.7MB 1.57MB modemst1

13 68.7MB 70.3MB 1.57MB modemst2

14 70.3MB 70.3MB 0.00MB fsc

15 70.3MB 134MB 64.0MB bk3

16 134MB 136MB 1.57MB fsg

17 136MB 168MB 32.0MB bk4

18 168MB 201MB 33.6MB bk5

19 201MB 218MB 16.8MB boot

20 218MB 235MB 16.8MB boot1

21 235MB 252MB 16.8MB recovery

22 252MB 268MB 16.8MB ext4 persist

23 268MB 336MB 67.1MB fat16 modem

24 336MB 403MB 67.1MB fat16 modem1

25 403MB 1074MB 671MB ext4 system

26 1074MB 1745MB 671MB ext4 system1

27 1745MB 2147MB 403MB ext4 cache

28 2147MB 15758MB 13610MB ext4 userdata
[Mi 3 General] engket7:
Appreciate ! Now looking for a smooth, battery backup good, slim based custom rom to flash on my Mi3W.

Thanks once again !
[Mi 3 General] Incudukun:
(Q)

I have same issue when failed follow repartition, so what can i do next?
[Mi 3 General] imgblur:
Hey I tried doing this since I have a 1.2gb partition. I tried the flash partition command multiple times but I still have 1.2gb as system and not 1.5. Would you please help?
[Mi 3 General] diongdyh:
[MENTION=7051678]imgblur[/MENTION], i have the same issue with you. [MENTION=7008275]Vasoconstriction[/MENTION], i think you're the guy whose post got pinned at #3 in the Ivan's guide. I followed your instructions but no luck for me. I have a Mi4W, which other Mi4W users seem to get it to work by using the Mi3 zip.