[SCRIPT] Fix partition table for Android 4.4


I've tried it again, but I doubt it worked.
1) Booted into CWM
2) Ariestool -> advanced -> extend partition -> followed instructions
3) Phone automatically rebooted intro CWM
4) I'm still able to boot builds that were installed before, I thought they should be gone?

So how can I check if it worked or not?
Hello guys,
Can I ask if there is any problem with this?
Code:
check environment
/sbin/mount
/sbin/umount
/sbin/parted
/sbin/tune2fs
/sbin/e2fsck
dump old table
__bionic_open_tzdata: couldn't find any tzdata when looking for localtime!
__bionic_open_tzdata: couldn't find any tzdata when looking for GMT!
__bionic_open_tzdata: couldn't find any tzdata when looking for posixrules!
unmount partitions
umount: can't umount /system: Invalid argument
umount: can't umount /system1: No such file or directory
umount: can't umount /data: Invalid argument
change partition table
parted: delete
parted: create
parted: name
format partitions
format: /dev/block/mmcblk0p23
tune2fs 1.41.14 (22-Dec-2010)
Creating journal inode: done
This filesystem will be automatically checked every 30 mounts or
0 days, whichever comes first.  Use tune2fs -c or -i to override.
e2fsck 1.41.14 (22-Dec-2010)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 3A: Optimizing directories
Pass 4: Checking reference counts
Pass 5: Checking group summary information

/dev/block/mmcblk0p23: ***** FILE SYSTEM WAS MODIFIED *****
/dev/block/mmcblk0p23: 11/410464 files (0.0% non-contiguous), 68023/820758 block
s
tune2fs 1.41.14 (22-Dec-2010)
e2fsck 1.41.14 (22-Dec-2010)
Adding dirhash hint to filesystem.

Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 3A: Optimizing directories
Pass 4: Checking reference counts
Pass 5: Checking group summary information

/dev/block/mmcblk0p23: ***** FILE SYSTEM WAS MODIFIED *****
/dev/block/mmcblk0p23: 11/410464 files (0.0% non-contiguous), 68023/820758 block
s
format: /dev/block/mmcblk0p24
tune2fs 1.41.14 (22-Dec-2010)
Creating journal inode: done
This filesystem will be automatically checked every 30 mounts or
0 days, whichever comes first.  Use tune2fs -c or -i to override.
e2fsck 1.41.14 (22-Dec-2010)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 3A: Optimizing directories
Pass 4: Checking reference counts
Pass 5: Checking group summary information

/dev/block/mmcblk0p24: ***** FILE SYSTEM WAS MODIFIED *****
/dev/block/mmcblk0p24: 11/410464 files (0.0% non-contiguous), 68023/820312 block
s
tune2fs 1.41.14 (22-Dec-2010)
e2fsck 1.41.14 (22-Dec-2010)
Adding dirhash hint to filesystem.

Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 3A: Optimizing directories
Pass 4: Checking reference counts
Pass 5: Checking group summary information

/dev/block/mmcblk0p24: ***** FILE SYSTEM WAS MODIFIED *****
/dev/block/mmcblk0p24: 11/410464 files (0.0% non-contiguous), 68023/820312 block
s
format: /dev/block/mmcblk0p25
tune2fs 1.41.14 (22-Dec-2010)
Creating journal inode: done
This filesystem will be automatically checked every 30 mounts or
0 days, whichever comes first.  Use tune2fs -c or -i to override.
e2fsck 1.41.14 (22-Dec-2010)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 3A: Optimizing directories
Pass 4: Checking reference counts
Pass 5: Checking group summary information

/dev/block/mmcblk0p25: ***** FILE SYSTEM WAS MODIFIED *****
/dev/block/mmcblk0p25: 11/196608 files (0.0% non-contiguous), 32935/393217 block
s
tune2fs 1.41.14 (22-Dec-2010)
e2fsck 1.41.14 (22-Dec-2010)
Adding dirhash hint to filesystem.

Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 3A: Optimizing directories
Pass 4: Checking reference counts
Pass 5: Checking group summary information

/dev/block/mmcblk0p25: ***** FILE SYSTEM WAS MODIFIED *****
/dev/block/mmcblk0p25: 11/196608 files (0.0% non-contiguous), 32935/393217 block
s
format: /dev/block/mmcblk0p26
tune2fs 1.41.14 (22-Dec-2010)
Creating journal inode: done
This filesystem will be automatically checked every 30 mounts or
0 days, whichever comes first.  Use tune2fs -c or -i to override.
e2fsck 1.41.14 (22-Dec-2010)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 3A: Optimizing directories
Pass 4: Checking reference counts
Pass 5: Checking group summary information

/dev/block/mmcblk0p26: ***** FILE SYSTEM WAS MODIFIED *****
/dev/block/mmcblk0p26: 11/384768 files (9.1% non-contiguous), 28498/769295 block
s
tune2fs 1.41.14 (22-Dec-2010)
e2fsck 1.41.14 (22-Dec-2010)
Adding dirhash hint to filesystem.

Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 3A: Optimizing directories
Pass 4: Checking reference counts
Pass 5: Checking group summary information

/dev/block/mmcblk0p26: ***** FILE SYSTEM WAS MODIFIED *****
/dev/block/mmcblk0p26: 11/384768 files (9.1% non-contiguous), 28498/769295 block
s
Done.

After I have rebooted the recovery, I chose reboot system.
Then it asked for grant root. At first I chose back, but it still asked for grant root.
Then I selected yes, but now I cannot boot to my rom.
I am stuck at the white MI logo.

Edit:
Before I attempted to repartition, I have installed the latest CWM(for 4.4).
Update:
The white MI logo has not moved for about 10minutes, then I have plugged out the battery and boot straight to CWM.
I cleared cache partition and dalvik.
I enabled True Dual Boot and reboot to ROM.
Then it asked to grant root 2 times. This time I accept both requests.
But I am still stuck at white MI logo.


You must flash roms, because as you see, there is not any ROM on your device, cuz this need to erase system partitions to enlarge them. Use ROM installer to flash any, you need only to enable tdb, no wipe

Inviato dal mio MI 2s utilizzando Tapatalk
 
Wow this is great news. So now it's possible to resize system 1 to just 1mb, this then means there is 4GB of userdata available. Would it then also be possible to resize the storage partition, I would love to have 3GB more off storage as I barely use apps but do have lot of music on my phone, could this function be build into the toolkit too? It would probably destroy ALL date on the device but it would be completely awesome!
 
booted into CWM I get a device not found error? Somehow the phone is only connected to the pc when booted into miui it seems. What am I doing wrong?
 
Yes, they have been installed:
adb_zps1853c381.png
 
Last edited:
Oke, I re-installed the aries toolkit, and I get this:

and this when testing:


I downloaded all files as far as I can tell, and put them in the same folder
 
You must flash roms, because as you see, there is not any ROM on your device, cuz this need to erase system partitions to enlarge them. Use ROM installer to flash any, you need only to enable tdb, no wipe

Inviato dal mio MI 2s utilizzando Tapatalk
The problem isn't that I'm not able to boot anymore, the problem is that I'm still able to boot. So I don't think making the partitions bigger worked...
 
Oke, I re-installed the aries toolkit, and I get this:

and this when testing:


I downloaded all files as far as I can tell, and put them in the same folder
As it say Aries toolkit isn't installed well, don't know how you download it, but reply on its thread don't be ot on this

Sent from my nexus 7
 
Hey,

Would it be possible for you to include this option in AriesTool too?
http://xiaomi.eu/community/threads/mi2s-extending-size-of-storage-partition.21391/
Yes, I'll see if that's possible but I think so
I can do it manually but it seems like it would be a great addition to your toolkit :)
The problem isn't that I'm not able to boot anymore, the problem is that I'm still able to boot. So I don't think making the partitions bigger worked...
So, flash a ROM using the cm installer, when the phone is on recovery mode, and enable tdb before install it

Sent from my nexus 7
 
I've being reading this whole thread once again, but still one thing is not clear to me: running this script will delete also the contents of the "data" or not?
I mean: will I have to backup also the photos and all the other stuff?
 
I've being reading this whole thread once again, but still one thing is not clear to me: running this script will delete also the contents of the "data" or not?
I mean: will I have to backup also the photos and all the other stuff?
/data partition will be wiped, but your sdcard will be untouched

Inviato dal mio MI 2(s) utilizzando Tapatalk
 
  • Like
Reactions: Giangiva
Linuxx, as Frederik was saying, that wasn't the problem because nothing was wiped. Maybe Ivan's kernel was the thing to blame?
Anyway, i installed the m1cha's recovery and ran the commands and it worked for me. So thanks anyway ;)
 
After repartitioning, can I just reinstall my Miui backup in system 1 and than install KitKat in system 2?
I'd like to try out Kitkat but don't want to lose my current installation.
 
yes, but u need to backup all your data.
But you could use ivan's minimal gapps, too

They just don't contain some google-features(dunno which exactly)
 
I should have made myself more clear, I meant I would make a nandroid backup of system1.
And restore it in system 1 after repartitioning. Then install KitKat in system2, that should work right?

And you mean to not repartition but just use ivan's minimal gapps?
 
I know what u meant. And yes if u use ivans minimal gapps u don't need to repartition ur phone.
 
I know what u meant. And yes if u use ivans minimal gapps u don't need to repartition ur phone.

Thanks it's all clear now! Just wanted to be sure.

Edit: where can I find this: ivans minimal gapps? Been searching the forums without luck.
 
Last edited:
Could someone please make a flashable zip with this? And maybe a revert script?

Sent with my Xiaomi MI2 with Tapatalk Pro
 
Last edited:
I tired this on my Mi2S(16GB) got the following error:
Code:
check environment
/sbin/mount
/sbin/umount
/sbin/parted
/sbin/tune2fs
/sbin/e2fsck
dump old table
__bionic_open_tzdata: couldn't find any tzdata when looking for localtime!
__bionic_open_tzdata: couldn't find any tzdata when looking for GMT!
__bionic_open_tzdata: couldn't find any tzdata when looking for posixrules!
unmount partitions
umount: can't umount /system: Invalid argument
umount: can't umount /system1: No such file or directory
umount: can't umount /data: Invalid argument
umount: can't umount /data_root: Invalid argument
umount: can't umount /sdcard: Invalid argument
change partition table
parted: delete
parted: create
Error: Input/output error during write on /dev/block/mmcblk0
Failed changing table

QvQ HELP. What can I do now?