Disclaimer: I am not responsible for bricked devices, obviously
Unlike most people here, I do not find the "dual-boot" feature particularly useful due to its buggyness and quirky configuration plus it made the available space for the /system partition divided, leaving only 600++ MB for each system1 and system2. This guide is using CWM v6.0.5.1 (R11) by furniel and donbo.
Prerequisites:
Not necessary, but do back up system1 if you wish to conserve your current ROM and config.
As parted cannot resize partitions, /system (system1) and /system1 (system2) partitions will have to be removed and re-created with the desired size, this is why backing up system1 is favourable.
Do comment/reply if you are having difficulties or otherwise
Unlike most people here, I do not find the "dual-boot" feature particularly useful due to its buggyness and quirky configuration plus it made the available space for the /system partition divided, leaving only 600++ MB for each system1 and system2. This guide is using CWM v6.0.5.1 (R11) by furniel and donbo.
Prerequisites:
- CWM Recovery V6.0.5.1
- a Mi 3w (probably doable for the Mi 4 too)
- ADB drivers installed
Not necessary, but do back up system1 if you wish to conserve your current ROM and config.
As parted cannot resize partitions, /system (system1) and /system1 (system2) partitions will have to be removed and re-created with the desired size, this is why backing up system1 is favourable.
- Reboot to recovery and connect your phone
- Open a cmd window (or terminal, if you're using linux), and connect through adb by typing;
Code:adb devices adb shell - If everything is fine and you get a shell input (#), start parted by typing;
Code:parted /dev/block/mmcblk0 unit MB #to set storage unit as MB print #shows partition table. do remember to screenshot this - Output of "print" should be something like this
Code: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 - Remove partition "system" (system1) and "system1" (system2);
Code:rm 25 rm 26 - Create new partitions after deleting them, partition size is up to you;
Code:mkpartfs primary ext2 403 1645 # 403MB is the start of the partition ending at 1645 MB, this will be for system1 mkpartfs primary ext2 1645 1745 # Do the same for system2 print # show the partition table to confirm that the partitions are created name 25 system # name the partition as "system" for system1 name 26 system1 # again for system2 print # check again quit - Convert newly created partitions to ext4 from ext2;
Code:#for system1; tune2fs -j /dev/block/mmcblk0p25 e2fsck -fDp /dev/block/mmcblk0p25 tune2fs -O extents,uninit_bg,dir_index /dev/block/mmcblk0p25 e2fsck -fDp /dev/block/mmcblk0p25 # for system2; tune2fs -j /dev/block/mmcblk0p26 e2fsck -fDp /dev/block/mmcblk0p26 tune2fs -O extents,uninit_bg,dir_index /dev/block/mmcblk0p26 e2fsck -fDp /dev/block/mmcblk0p26 - Go back to parted to check whether it's applied;
Code:parted /dev/block/mmcblk0 unit MB print - It should be like this (if you followed my partition sizes)
Code:Model: MMC SEM16G (sd/mmc) Disk /dev/block/mmcblk0: 15758MB Sector size (logical/physical): 512B/512B Partition Table: gpt 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 1645MB 1242MB ext4 system 26 1645MB 1745MB 99.8MB ext4 system1 27 1745MB 2147MB 403MB ext4 cache 28 2147MB 15758MB 13610MB ext4 userdata - You can quit adb now, process is finished. Reboot and restore your back up (if you have made one earlier) or flash a rom through CWM
Do comment/reply if you are having difficulties or otherwise
Last edited:


