[SCRIPT] Fix partition table for Android 4.4


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?
How did u run the script and did u edit it???

Inviato dal mio MI 2 utilizzando Tapatalk
 
How did u run the script and did u edit it???

I didn't touch the script for the first time I run it.
It seems it failed at creating the second partition (mmcblk0p24)

I just managed manually creating partition from ADB by different size,
left a few MBs empty space but I got it done... FINALLY
Then I commented out "parted: delete" and "parted: create" parts,
and run the script again. Finally reboot recovery then enable TDB & flashed ROM.

Now I'm already using CM11(by m1cha) with TDB enabled on my Mi2S(16G), cheers :D

I guess there's something wrong with my Phone's emmc... maybe bad blocks :eek: ?
It DO takes very very long time for me to flash a ROM in CWM recovery (like 30 minutes+)
But if I flash MIUI in fastboot using MiFlash, it would only take a few minutes.
Other than that, I have absolutely no problem using my phone. That's just so weird.

Anyone ever met a similar situation and/or get a solution to this?
 
I didn't touch the script for the first time I run it.
It seems it failed at creating the second partition (mmcblk0p24)

I just managed manually creating partition from ADB by different size,
left a few MBs empty space but I got it done... FINALLY
Then I commented out "parted: delete" and "parted: create" parts,
and run the script again. Finally reboot recovery then enable TDB & flashed ROM.

Now I'm already using CM11(by m1cha) with TDB enabled on my Mi2S(16G), cheers :D

I guess there's something wrong with my Phone's emmc... maybe bad blocks :eek: ?
It DO takes very very long time for me to flash a ROM in CWM recovery (like 30 minutes+)
But if I flash MIUI in fastboot using MiFlash, it would only take a few minutes.
Other than that, I have absolutely no problem using my phone. That's just so weird.

Anyone ever met a similar situation and/or get a solution to this?
Emmc is sdcard ..
Flash stock image via miflash and then use ariestoolkit to run this

Inviato dal mio Nexus 7 utilizzando Tapatalk
 
Help

Code:
[00001EC8]CreateManagedObject(1261): Unspecified error(0x80131604)
[00001EC8]GetFactoryObject(1305): Unspecified error(0x80131604)
[00001EC8]CreateManagedObject(1261): Unspecified error(0x80131604)
[00001EC8]GetFactoryObject(1305): Unspecified error(0x80131604)
[00001EC8]GetFactoryObject(1326): The specified service does not exist.(0x800704db)
[00001EC8]GetSearchPath(1381): The specified service does not exist.(0x800704db)
[00000C60]d0056f7a    0.00    execute C:\Program Files\Xiaomi\MiPhone\miui_MiTwo_QDT14_fastboot_4.1\flash_all_except_storage.bat
[00000C60]CScriptReport::DoWork(397): The system cannot find the file specified.(0x80070002)
[00000C60]GetFactoryObject(1326): The specified service does not exist.(0x800704db)
[00000C60]SaveFlashResult(1347): The specified service does not exist.(0x800704db)
[00001EC8]GetFactoryObject(1326): The specified service does not exist.(0x800704db)
[00001EC8]GetSearchPath(1381): The specified service does not exist.(0x800704db)
[00000A90]d0056f7a    0.00    execute C:\Users\PNL_NVM\Downloads\Programs\miui_MI2_4.1.17_fastboot_4.1\flash_all_except_storage.bat
[00000A90]d0056f7a    0.33   
[00000A90]d0056f7a    0.33    $fastboot -s d0056f7a getvar soc-id  2>&1  | findstr /r /c:"^soc-id: *109"  || echo Missmatching image and device
[00000A90]d0056f7a    0.47    soc-id: 109
[00000A90]d0056f7a    0.47   
[00000A90]d0056f7a    0.47    $fastboot -s d0056f7a getvar soc-id  2>&1  | findstr /r /c:"^soc-id: *109"  || exit /B 1
[00000A90]d0056f7a    0.48    soc-id: 109
[00000A90]d0056f7a    0.50   
[00000A90]d0056f7a    0.50    $fastboot -s d0056f7a flash tz "C:\Users\PNL_NVM\Downloads\Programs\miui_MI2_4.1.17_fastboot_4.1\images\tz.mbn"  ||
[00000A90]d0056f7a    0.56    sending 'tz' (196 KB)...
[00000A90]d0056f7a    0.56    OKAY [  0.016s]
[00000A90]d0056f7a    0.56    writing 'tz'...
[00000A90]d0056f7a    0.56    OKAY [  0.013s]
[00000A90]d0056f7a    0.56    finished. total time: 0.029s
[00000A90]d0056f7a    0.56   
[00000A90]d0056f7a    0.56    $fastboot -s d0056f7a flash sbl1 "C:\Users\PNL_NVM\Downloads\Programs\miui_MI2_4.1.17_fastboot_4.1\images\sbl1.mbn"  ||
[00000A90]d0056f7a    0.61    sending 'sbl1' (82 KB)...
[00000A90]d0056f7a    0.61    OKAY [  0.008s]
[00000A90]d0056f7a    0.61    writing 'sbl1'...
[00000A90]d0056f7a    0.61    OKAY [  0.013s]
[00000A90]d0056f7a    0.61    finished. total time: 0.021s
[00000A90]d0056f7a    0.61   
[00000A90]d0056f7a    0.61    $fastboot -s d0056f7a flash sbl2 "C:\Users\PNL_NVM\Downloads\Programs\miui_MI2_4.1.17_fastboot_4.1\images\sbl2.mbn"  ||
[00000A90]d0056f7a    0.69    sending 'sbl2' (128 KB)...
[00000A90]d0056f7a    0.69    OKAY [  0.012s]
[00000A90]d0056f7a    0.69    writing 'sbl2'...
[00000A90]d0056f7a    0.69    OKAY [  0.010s]
[00000A90]d0056f7a    0.69    finished. total time: 0.022s
[00000A90]d0056f7a    0.69   
[00000A90]d0056f7a    0.69    $fastboot -s d0056f7a flash sbl3 "C:\Users\PNL_NVM\Downloads\Programs\miui_MI2_4.1.17_fastboot_4.1\images\sbl3.mbn"  ||
[00000A90]d0056f7a    0.77    sending 'sbl3' (296 KB)...
[00000A90]d0056f7a    0.77    OKAY [  0.024s]
[00000A90]d0056f7a    0.77    writing 'sbl3'...
[00000A90]d0056f7a    0.77    OKAY [  0.017s]
[00000A90]d0056f7a    0.77    finished. total time: 0.041s
[00000A90]d0056f7a    0.77   
[00000A90]d0056f7a    0.77    $fastboot -s d0056f7a flash rpm "C:\Users\PNL_NVM\Downloads\Programs\miui_MI2_4.1.17_fastboot_4.1\images\rpm.mbn"  ||
[00000A90]d0056f7a    0.84    sending 'rpm' (136 KB)...
[00000A90]d0056f7a    0.84    OKAY [  0.012s]
[00000A90]d0056f7a    0.84    writing 'rpm'...
[00000A90]d0056f7a    0.84    OKAY [  0.010s]
[00000A90]d0056f7a    0.84    finished. total time: 0.022s
[00000A90]d0056f7a    0.86   
[00000A90]d0056f7a    0.86    $fastboot -s d0056f7a flash aboot "C:\Users\PNL_NVM\Downloads\Programs\miui_MI2_4.1.17_fastboot_4.1\images\emmc_appsboot.mbn"  ||
[00000A90]d0056f7a    1.06    sending 'aboot' (1033 KB)...
[00000A90]d0056f7a    1.06    OKAY [  0.078s]
[00000A90]d0056f7a    1.06    writing 'aboot'...
[00000A90]d0056f7a    1.06    OKAY [  0.058s]
[00000A90]d0056f7a    1.06    finished. total time: 0.136s
[00000A90]d0056f7a    1.06   
[00000A90]d0056f7a    1.06    $fastboot -s d0056f7a erase boot  ||
[00000A90]d0056f7a    1.11    erasing 'boot'...
[00000A90]d0056f7a    1.11    OKAY [  0.011s]
[00000A90]d0056f7a    1.11    finished. total time: 0.011s
[00000A90]d0056f7a    1.11   
[00000A90]d0056f7a    1.11    $fastboot -s d0056f7a flash misc "C:\Users\PNL_NVM\Downloads\Programs\miui_MI2_4.1.17_fastboot_4.1\images\misc.img"  ||
[00000A90]d0056f7a    1.16    sending 'misc' (8 KB)...
[00000A90]d0056f7a    1.16    OKAY [  0.002s]
[00000A90]d0056f7a    1.16    writing 'misc'...
[00000A90]d0056f7a    1.16    OKAY [  0.003s]
[00000A90]d0056f7a    1.16    finished. total time: 0.005s
[00000A90]d0056f7a    1.16   
[00000A90]d0056f7a    1.16    $fastboot -s d0056f7a flash modem+modem1 "C:\Users\PNL_NVM\Downloads\Programs\miui_MI2_4.1.17_fastboot_4.1\images\NON-HLOS.bin"  ||
[00000A90]d0056f7a    10.38    sending 'modem+modem1' (51910 KB)...
[00000A90]d0056f7a    10.38    OKAY [  3.810s]
[00000A90]d0056f7a    10.38    writing 'modem+modem1'...
[00000A90]d0056f7a    10.38    OKAY [  4.579s]
[00000A90]d0056f7a    10.38    finished. total time: 8.389s
[00000A90]d0056f7a    10.39   
[00000A90]d0056f7a    10.39    $fastboot -s d0056f7a flash system+system1 "C:\Users\PNL_NVM\Downloads\Programs\miui_MI2_4.1.17_fastboot_4.1\images\system.img"  ||
[00000A90]d0056f7a    63.78    sending 'system+system1' (524288 KB)...
[00000A90]d0056f7a    63.78    OKAY [ 39.149s]
[00000A90]d0056f7a    63.78    writing 'system+system1'...
[00000A90]d0056f7a    63.78    FAILED (remote: partition table doesn't exist)
[00000A90]CScriptReport::DoWork(413): Unspecified error(0x80004005)
[00000A90]GetFactoryObject(1326): The specified service does not exist.(0x800704db)
[00000A90]SaveFlashResult(1347): The specified service does not exist.(0x800704db)
[00001EC8]GetFactoryObject(1326): The specified service does not exist.(0x800704db)
[00001EC8]GetSearchPath(1381): The specified service does not exist.(0x800704db)
[000010BC]d0056f7a    0.05    execute C:\Users\PNL_NVM\Downloads\Programs\miui_MI2_4.1.17_fastboot_4.1\flash_all_except_storage.bat
[000010BC]d0056f7a    0.31   
[000010BC]d0056f7a    0.31    $fastboot -s d0056f7a getvar soc-id  2>&1  | findstr /r /c:"^soc-id: *109"  || echo Missmatching image and device
[000010BC]d0056f7a    0.47    soc-id: 109
[000010BC]d0056f7a    0.47   
[000010BC]d0056f7a    0.47    $fastboot -s d0056f7a getvar soc-id  2>&1  | findstr /r /c:"^soc-id: *109"  || exit /B 1
[000010BC]d0056f7a    0.52    soc-id: 109
[000010BC]d0056f7a    0.52   
[000010BC]d0056f7a    0.52    $fastboot -s d0056f7a flash tz "C:\Users\PNL_NVM\Downloads\Programs\miui_MI2_4.1.17_fastboot_4.1\images\tz.mbn"  ||
[000010BC]d0056f7a    0.58    sending 'tz' (196 KB)...
[000010BC]d0056f7a    0.58    OKAY [  0.016s]
[000010BC]d0056f7a    0.58    writing 'tz'...
[000010BC]d0056f7a    0.58    OKAY [  0.013s]
[000010BC]d0056f7a    0.58    finished. total time: 0.029s
[000010BC]d0056f7a    0.59   
[000010BC]d0056f7a    0.59    $fastboot -s d0056f7a flash sbl1 "C:\Users\PNL_NVM\Downloads\Programs\miui_MI2_4.1.17_fastboot_4.1\images\sbl1.mbn"  ||
[000010BC]d0056f7a    0.64    sending 'sbl1' (82 KB)...
[000010BC]d0056f7a    0.64    OKAY [  0.009s]
[000010BC]d0056f7a    0.64    writing 'sbl1'...
[000010BC]d0056f7a    0.64    OKAY [  0.007s]
[000010BC]d0056f7a    0.64    finished. total time: 0.016s
[000010BC]d0056f7a    0.64   
[000010BC]d0056f7a    0.64    $fastboot -s d0056f7a flash sbl2 "C:\Users\PNL_NVM\Downloads\Programs\miui_MI2_4.1.17_fastboot_4.1\images\sbl2.mbn"  ||
[000010BC]d0056f7a    0.70    sending 'sbl2' (128 KB)...
[000010BC]d0056f7a    0.70    OKAY [  0.011s]
[000010BC]d0056f7a    0.70    writing 'sbl2'...
[000010BC]d0056f7a    0.70    OKAY [  0.010s]
[000010BC]d0056f7a    0.70    finished. total time: 0.021s
[000010BC]d0056f7a    0.70   
[000010BC]d0056f7a    0.70    $fastboot -s d0056f7a flash sbl3 "C:\Users\PNL_NVM\Downloads\Programs\miui_MI2_4.1.17_fastboot_4.1\images\sbl3.mbn"  ||
[000010BC]d0056f7a    0.78    sending 'sbl3' (296 KB)...
[000010BC]d0056f7a    0.78    OKAY [  0.023s]
[000010BC]d0056f7a    0.78    writing 'sbl3'...
[000010BC]d0056f7a    0.78    OKAY [  0.021s]
[000010BC]d0056f7a    0.78    finished. total time: 0.044s
[000010BC]d0056f7a    0.78   
[000010BC]d0056f7a    0.78    $fastboot -s d0056f7a flash rpm "C:\Users\PNL_NVM\Downloads\Programs\miui_MI2_4.1.17_fastboot_4.1\images\rpm.mbn"  ||
[000010BC]d0056f7a    0.86    sending 'rpm' (136 KB)...
[000010BC]d0056f7a    0.86    OKAY [  0.012s]
[000010BC]d0056f7a    0.86    writing 'rpm'...
[000010BC]d0056f7a    0.86    OKAY [  0.010s]
[000010BC]d0056f7a    0.86    finished. total time: 0.022s
[000010BC]d0056f7a    0.88   
[000010BC]d0056f7a    0.88    $fastboot -s d0056f7a flash aboot "C:\Users\PNL_NVM\Downloads\Programs\miui_MI2_4.1.17_fastboot_4.1\images\emmc_appsboot.mbn"  ||
[000010BC]d0056f7a    1.08    sending 'aboot' (1033 KB)...
[000010BC]d0056f7a    1.08    OKAY [  0.077s]
[000010BC]d0056f7a    1.08    writing 'aboot'...
[000010BC]d0056f7a    1.08    OKAY [  0.054s]
[000010BC]d0056f7a    1.08    finished. total time: 0.132s
[000010BC]d0056f7a    1.08   
[000010BC]d0056f7a    1.08    $fastboot -s d0056f7a erase boot  ||
[000010BC]d0056f7a    1.13    erasing 'boot'...
[000010BC]d0056f7a    1.13    OKAY [  0.012s]
[000010BC]d0056f7a    1.13    finished. total time: 0.012s
[000010BC]d0056f7a    1.13   
[000010BC]d0056f7a    1.13    $fastboot -s d0056f7a flash misc "C:\Users\PNL_NVM\Downloads\Programs\miui_MI2_4.1.17_fastboot_4.1\images\misc.img"  ||
[000010BC]d0056f7a    1.17    sending 'misc' (8 KB)...
[000010BC]d0056f7a    1.17    OKAY [  0.002s]
[000010BC]d0056f7a    1.17    writing 'misc'...
[000010BC]d0056f7a    1.17    OKAY [  0.004s]
[000010BC]d0056f7a    1.17    finished. total time: 0.006s
[000010BC]d0056f7a    1.17   
[000010BC]d0056f7a    1.17    $fastboot -s d0056f7a flash modem+modem1 "C:\Users\PNL_NVM\Downloads\Programs\miui_MI2_4.1.17_fastboot_4.1\images\NON-HLOS.bin"  ||
[000010BC]d0056f7a    10.52    sending 'modem+modem1' (51910 KB)...
[000010BC]d0056f7a    10.52    OKAY [  3.805s]
[000010BC]d0056f7a    10.52    writing 'modem+modem1'...
[000010BC]d0056f7a    10.52    OKAY [  4.699s]
[000010BC]d0056f7a    10.52    finished. total time: 8.503s
[000010BC]d0056f7a    10.55   
[000010BC]d0056f7a    10.55    $fastboot -s d0056f7a flash system+system1 "C:\Users\PNL_NVM\Downloads\Programs\miui_MI2_4.1.17_fastboot_4.1\images\system.img"  ||
[000010BC]d0056f7a    58.92    sending 'system+system1' (524288 KB)...
[000010BC]d0056f7a    58.92    OKAY [ 38.455s]
[000010BC]d0056f7a    58.92    writing 'system+system1'...
[000010BC]d0056f7a    58.92    FAILED (remote: partition table doesn't exist)
[000010BC]CScriptReport::DoWork(413): Unspecified error(0x80004005)
[000010BC]GetFactoryObject(1326): The specified service does not exist.(0x800704db)
[000010BC]SaveFlashResult(1347): The specified service does not exist.(0x800704db)
 
I think I misread your problem. Still you could do the trick with ADB, but maybe linuxx knows a simpler solution. Anyway, knowing ADB is big advantage.
 
  • Like
Reactions: HeoHeo
Thank you very much. I'm trying to MIUIFLASH. If your case can not be done to help stop it? I used 32G Xiaomi MI2S should not understand much about it. Before that I used Pantech SKY.
Partition is gone... What did u do?? U broke partition table.... OK u should be able to boot into recovery mode, so from it use the script to extend system partition , it will recreate system0 and system1

Inviato dal mio MI 2 utilizzando Tapatalk
 
  • Like
Reactions: HeoHeo
Partition is gone... What did u do?? U broke partition table.... OK u should be able to boot into recovery mode, so from it use the script to extend system partition , it will recreate system0 and system1

Inviato dal mio MI 2 utilizzando Tapatalk
Thank you all. I have overcome it. Thanks to your crip @linuxx that I had to manually add the new partition system and system1.
 
When TDB is enabled DATA partition is too small. How remove 2Gb free space from UserData (SD) to DATA?
 
When TDB is enabled DATA partition is too small. How remove 2Gb free space from UserData (SD) to DATA?
Search! Then RTFM. I posted the answer just 5 posts before yours :S
http://xiaomi.eu/community/threads/mi2s-extending-size-of-storage-partition.21391/

Maybe you shouldnt try at all because you will probably brick your phone if you're not willing to read lol. (So make sure you read the whole thread before starting, there is some useful information in that thread! )
 
Last edited:
  • Like
Reactions: leomaks
I just tried to install this script. But my phone doesn't show up in adb devices list while in recovery mode. While turned on, adb works fine. Any idea?

I tried modifying android_winusb.inf file in driver folder to no avail. I have MiPhoneManagerSetup_1.0.4.3222.exe installed.
 
I just tried to install this script. But my phone doesn't show up in adb devices list while in recovery mode. While turned on, adb works fine. Any idea?

I tried modifying android_winusb.inf file in driver folder to no avail. I have MiPhoneManagerSetup_1.0.4.3222.exe installed.
:facepalm
Goto ariestoolkit therad, look for tutorial on setup forma windows (wiki github page)... Don't follow useless tutorial u find in internet android_winusb.inf editing is only for xperia devices

Sent from my nexus 7
 
Thank you, it works like a charm.
what is the possibility of having more than one choice depends on the user preferring? some users (like me) need the space to be utilized in apps more than data storage for example: 10GB for apps ... so is it doable ?

Thanks again :)
 
I need help please. It gives me this error.

Code:
C:\adb>adb devices
List of devices attached
4e3f727 recovery


C:\adb>adb shell /tmp/repartition.sh
/sbin/sh: /tmp/repartition.sh: not found

C:\adb> adb push repartition.sh /tmp
739 KB/s (3031 bytes in 0.004s)

C:\adb> adb shell chmod 0777 /tmp/repartition.sh

C:\adb>adb shell /tmp/repartition.sh
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!
/tmp/repartition.sh: line 115: can't create /sdcard/parted_04-07-2014-B678725235
05AD164B0B3D2D0CB382CF: nonexistent directory
Failed dumping table

C:\adb>
 
I need help please. It gives me this error.

Code:
C:\adb>adb devices
List of devices attached
4e3f727 recovery


C:\adb>adb shell /tmp/repartition.sh
/sbin/sh: /tmp/repartition.sh: not found

C:\adb> adb push repartition.sh /tmp
739 KB/s (3031 bytes in 0.004s)

C:\adb> adb shell chmod 0777 /tmp/repartition.sh

C:\adb>adb shell /tmp/repartition.sh
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!
/tmp/repartition.sh: line 115: can't create /sdcard/parted_04-07-2014-B678725235
05AD164B0B3D2D0CB382CF: nonexistent directory
Failed dumping table

C:\adb>

C:\adb>adb devices
List of devices attached
4e3f727 recovery

C:\adb> adb push repartition.sh /tmp
739 KB/s (3031 bytes in 0.004s)

C:\adb> adb shell chmod 0777 /tmp/repartition.sh

C:\adb>adb shell sh /tmp/repartition.sh

Sent from my nexus 7