Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,811,404 Members 48,195 Now Online
XDA Developers Android and Mobile Development Forum

[GUIDE][Xiaomi Mi-One] Changing size of /system partitions

Tip us?
 
SetazeR
Old
(Last edited by SetazeR; 28th July 2013 at 09:23 AM.) Reason: Attaches
#1  
SetazeR's Avatar
Member - OP
Thanks Meter 9
Posts: 57
Join Date: Aug 2011
Location: Belovo
Default [GUIDE][Xiaomi Mi-One] Changing size of /system partitions

Disclaimer: I am not responsible for bricked devices, dead SD cards, thermonuclear war, or anything else. YOU doing this at your own risk.

This guide is taken from 4pda.ru forums and tested on my own device.

I strongly recommend you to make Nandroid backup with CWM Recovery v6.0.3.0 so after repartitioning ALL DATA (/system, /system1, /data, /cache) WILL BE ERASED.
1. Connect you phone to PC via USB. (USB debugging must be turned on)
2. Install MiFlash. Remember installation path. It will install drivers for "Android Composite ADB Device". If there's still one "Android" device without drivers - just ignore.
3. Run Command Prompt (cmd) and go to the %FOLDER_WHERE_YOU_INSTALLED_MIFLASH%\Google\Androi d (For me it was C:\Program Files (x86)\Xiaomi\MiPhone\Google\Android)
4. Type adb devices and press enter. It should start adb daemon and show your device with status offline. Check phone for dialog and allow USB debug from your computer.
5. Type adb devices again. Now it should show your phone with status device. Close Command Prompt.
6. Download and unpack to any folder attached archive tadb.zip
7. Run tadb shell.bat. If everything fine it will show something like "shell@android:/ $"
9. Type su and press enter. If requested allow root access on phone.
10. Now enter busybox fdisk /dev/block/mmcblk0 to start repartiotioning program (All changes are virtual until written)
11. Delete all partitions from 20 to 15 inclusive. For this enter d, enter 20, enter d, enter 19 till 15th partition.
After this enter p. Your partition table must be like this
Code:
              Device Boot      Start         End      Blocks  Id System
/dev/block/mmcblk0p1               1       12801      102400   c Win95 FAT32 (LBA)
Partition 1 does not end on cylinder boundary
/dev/block/mmcblk0p2   *       12801       12863         500  4d Unknown
Partition 2 does not end on cylinder boundary
/dev/block/mmcblk0p3           12863       13051        1500  51 Unknown
Partition 3 does not end on cylinder boundary
/dev/block/mmcblk0p4           13051      488448     3803183+  5 Extended
Partition 4 does not end on cylinder boundary
/dev/block/mmcblk0p5           13052       13114         500  47 Unknown
/dev/block/mmcblk0p6           13114       13370        2048  45 Unknown
/dev/block/mmcblk0p7           13370       13683        2500  4c Unknown
/dev/block/mmcblk0p8           13683       14963       10240  48 Unknown
/dev/block/mmcblk0p9           14963       16243       10240  64 Unknown
/dev/block/mmcblk0p10          16243       16305         500  46 Unknown
/dev/block/mmcblk0p11          16305       16368         500  65 Unknown
/dev/block/mmcblk0p12          16385       16768        3072  4a Unknown
/dev/block/mmcblk0p13          16769       17152        3072  4b Unknown
/dev/block/mmcblk0p14          20481       20864        3072  58 Unknown
12. Recreate needed partitions table. Press n, enter start block, end block. You can use attached partitions.xls to calculate needed values. Also You can change size of system partitions in this file as you wish (Make them 384Mb for example). Values will be recalculated.
13. Now we must return System type for 17th block (recovery). Enter t, enter 17, enter 60. After this operation your partiotion table will be like this (If you left 256Mb):
Code:
              Device Boot      Start         End      Blocks  Id System
/dev/block/mmcblk0p1               1       12801      102400   c Win95 FAT32 (LBA)
Partition 1 does not end on cylinder boundary
/dev/block/mmcblk0p2   *       12801       12863         500  4d Unknown
Partition 2 does not end on cylinder boundary
/dev/block/mmcblk0p3           12863       13051        1500  51 Unknown
Partition 3 does not end on cylinder boundary
/dev/block/mmcblk0p4           13051      488448     3803183+  5 Extended
Partition 4 does not end on cylinder boundary
/dev/block/mmcblk0p5           13052       13114         500  47 Unknown
/dev/block/mmcblk0p6           13114       13370        2048  45 Unknown
/dev/block/mmcblk0p7           13370       13683        2500  4c Unknown
/dev/block/mmcblk0p8           13683       14963       10240  48 Unknown
/dev/block/mmcblk0p9           14963       16243       10240  64 Unknown
/dev/block/mmcblk0p10          16243       16305         500  46 Unknown
/dev/block/mmcblk0p11          16305       16368         500  65 Unknown
/dev/block/mmcblk0p12          16385       16768        3072  4a Unknown
/dev/block/mmcblk0p13          16769       17152        3072  4b Unknown
/dev/block/mmcblk0p14          20481       20864        3072  58 Unknown
/dev/block/mmcblk0p15          20866       53633      262144  83 Linux
/dev/block/mmcblk0p16          53635       86402      262144  83 Linux
/dev/block/mmcblk0p17          86404       87683       10240  60 Unknown
/dev/block/mmcblk0p18          87685       88708        8192  83 Linux
/dev/block/mmcblk0p19          88710      111749      184320  83 Linux
/dev/block/mmcblk0p20         111751      488448     3013584  83 Linux
14. Time to save changes. If you not sure, you can just enter q to leave without saving changes. Enter w to write new partition table. Program will show error about using old partition table - that's normal. After you reboot phone - changes will be applied, so it will not load anything except fastboot.
15. Load phone in fastboot mode (Power + Volume Down + Mi-Button), go to folder with tadb and run flash_recovery.bat. It will flash CWM 6.0.3.0 to your device.
16. Go to mounts & storage menu and format /cache, /system, /system1 and /data
17. Now you can restore your nandroid backup.

NOTE: All operations been made on Windows 7 32-bit and Xiaomi Mi-One Plus with MIUIv5 3.7.19
Attached Files
File Type: zip tadb.zip - [Click for QR Code] (6.34 MB, 150 views)
File Type: xls Partitions.xls - [Click for QR Code] (39.0 KB, 134 views)
The Following 3 Users Say Thank You to SetazeR For This Useful Post: [ Click to Expand ]
 
SetazeR
Old
(Last edited by SetazeR; 28th July 2013 at 09:38 AM.)
#2  
SetazeR's Avatar
Member - OP
Thanks Meter 9
Posts: 57
Join Date: Aug 2011
Location: Belovo
Waiting for move to right forum section. Report sent.
 
dancer_69
Old
#3  
Senior Member
Thanks Meter 227
Posts: 1,873
Join Date: Jan 2007
What is the point to do all these? Are some benefits from this change?
 
SetazeR
Old
#4  
SetazeR's Avatar
Member - OP
Thanks Meter 9
Posts: 57
Join Date: Aug 2011
Location: Belovo
Quote:
Originally Posted by dancer_69 View Post
What is the point to do all these? Are some benefits from this change?
Some custom ROMS (MoKee OS for example) have very few free space in /system after installation. Not enough even to flash GApps.
 
dancer_69
Old
#5  
Senior Member
Thanks Meter 227
Posts: 1,873
Join Date: Jan 2007
Yes, I know about that but there is already a tool for repartition. I thought that this was more than that. It' s nice that you can customise the size though. But isn't dangerous? I'm saying this because I've hard break my device twice using gparted. I had a full linux backup of device though so I recovered it but was the only way to do it. I succeed once though.
 
ball9077
Old
#6  
ball9077's Avatar
Junior Member
Thanks Meter 0
Posts: 5
Join Date: Jun 2013
What's the name of the repartition tool? I'm caught in a wicked cloning loop that duplicates my partitions periodically and I haven't tracked down the cause. Ota JB Feb. 1st is the day it started. Thanks

A Charge of $17.99 Was Applied To Your Mobile Account For Browbeating The Author's Questions. Albeit, Most Likely a Foolish, Ignorant, Uneducated Compilation of Useless Quibble. But He Is Less Than 1 Year With Me and Is Bashing Adb, Scripting, Rooting, Romming Like a Red Headed Stepchild With No Thumbs, Herpes Type 4.2.2. Flashaholicism! Give My Poor TTS Owner A Hand Would ya? Sent From His Overclocked Porn Providing ClapaTalk Razr Maxx Xt-912.
 
dancer_69
Old
#7  
Senior Member
Thanks Meter 227
Posts: 1,873
Join Date: Jan 2007
I mean Genocolar' s and Forumber' s update zips for repartition.
 
SetazeR
Old
#8  
SetazeR's Avatar
Member - OP
Thanks Meter 9
Posts: 57
Join Date: Aug 2011
Location: Belovo
Quote:
Originally Posted by dancer_69 View Post
I mean Genocolar' s and Forumber' s update zips for repartition.
Can you give links to them?
 
dancer_69
Old
#9  
Senior Member
Thanks Meter 227
Posts: 1,873
Join Date: Jan 2007
Here is the topic:
http://forum.xda-developers.com/show...ight=partition

As for Forumber' s modified way to larger /system, search on U8800 developing section, it' s in a lot roms threads.
 
ehrans
Old
#10  
Member
Thanks Meter 19
Posts: 60
Join Date: Nov 2011
just a note:

On M1S phones the last END block is 477184 and not 488448 like M1+ and M1 C1

all is equal except that

So M1S users take in mind when repartitioning your phones.

The Following User Says Thank You to ehrans For This Useful Post: [ Click to Expand ]
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes