[SCRIPT] Fix partition table for Android 4.4


@ M1cha: I got an error while system partitioning my Mi2S.
Can you pls help me ?
This is the error !!!
Code:
C:\adb>adb devices
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
List of devices attached
5981413 recovery


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

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_08-01-2014-FE12FBA2BD
073BE5E1065C2D89F2280C: nonexistent directory
Failed dumping table

C:\adb>
 
@ M1cha: I got an error while system partitioning my Mi2S.
Can you pls help me ?
This is the error !!!
Code:
C:\adb>adb devices
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
List of devices attached
5981413 recovery


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

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_08-01-2014-FE12FBA2BD
073BE5E1065C2D89F2280C: nonexistent directory
Failed dumping table

C:\adb>

Mount /sdcard
 
Mount /sdcard
Thanks, now it worked i guess....
Here is the log file.
Code:
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\Users\Manu>cd\

C:\>cd adb

C:\adb>adb devices
List of devices attached
5981413 recovery


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

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!
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
change partition table
parted: delete
parted: create
parted: name
format partitions
format: /dev/block/mmcblk0p23
tune2fs 1.41.14 (22-Dec-2010)
tune2fs: No such file or directory while trying to open /dev/block/mmcblk0p23
Couldn't find valid filesystem superblock.
e2fsck 1.41.14 (22-Dec-2010)
e2fsck: No such file or directory while trying to open /dev/block/mmcblk0p23
Possibly non-existent device?
tune2fs 1.41.14 (22-Dec-2010)
tune2fs: No such file or directory while trying to open /dev/block/mmcblk0p23
Couldn't find valid filesystem superblock.
e2fsck 1.41.14 (22-Dec-2010)
e2fsck: No such file or directory while trying to open /dev/block/mmcblk0p23
Possibly non-existent device?
format: /dev/block/mmcblk0p24
tune2fs 1.41.14 (22-Dec-2010)
tune2fs: No such file or directory while trying to open /dev/block/mmcblk0p24
Couldn't find valid filesystem superblock.
e2fsck 1.41.14 (22-Dec-2010)
e2fsck: No such file or directory while trying to open /dev/block/mmcblk0p24
Possibly non-existent device?
tune2fs 1.41.14 (22-Dec-2010)
tune2fs: No such file or directory while trying to open /dev/block/mmcblk0p24
Couldn't find valid filesystem superblock.
e2fsck 1.41.14 (22-Dec-2010)
e2fsck: No such file or directory while trying to open /dev/block/mmcblk0p24
Possibly non-existent device?
format: /dev/block/mmcblk0p25
tune2fs 1.41.14 (22-Dec-2010)
tune2fs: No such file or directory while trying to open /dev/block/mmcblk0p25
Couldn't find valid filesystem superblock.
e2fsck 1.41.14 (22-Dec-2010)
e2fsck: No such file or directory while trying to open /dev/block/mmcblk0p25
Possibly non-existent device?
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/4896 files (0.0% non-contiguous), 634/9766 blocks
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/526944 files (0.0% non-contiguous), 49363/1053231 bloc
ks
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/526944 files (0.0% non-contiguous), 49363/1053231 bloc
ks
Done.

C:\adb>adb reboot recovery

C:\adb>

Now should i have to push recovery in CWM ? and then install ROM ?
 
Hi bro, but after flashing the Kernel, i am struck at MI logo.... i dont know what to do.
Why is this Bootloop there ?
Any help ?
 
I see, now all is well. It is working really smooth. Thanks for your work.
I have noticed that GPS locking time is prolonged in your ROM compared to Mokee/ CM. Any idea ?
Other than that everything is working perfectly.

Can you suggest me a best I/O & Governor for Battery Life ? Thanks in advance.
 
i got these errors trying to repartition my mi2s, any suggest?
 

Attachments

  • adb error.JPG
    adb error.JPG
    92.5 KB · Views: 725
Hi,

i tried to modify the m1cha's script to get just one system to use like xperians but without oversize the system0 partition so i modified the partitions like this

Code:
ui_print "parted: create"
    parted -s /dev/block/mmcblk0 mkpartfs primary ext2 336MB 886MB || return 1
    parted -s /dev/block/mmcblk0 mkpartfs primary ext2 886MB 896MB || return 1
    parted -s /dev/block/mmcblk0 mkpartfs primary ext2 896MB 1171MB || return 1
    parted -s /dev/block/mmcblk0 mkpartfs primary ext2 1171MB 5570MB || return 1

first time was ok... but i cant write on internal sdcard so i tried to redo the sripts and no i have this:

Code:
_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/mi2.sh: line 115: can't create /sdcard/parted_09-15-2014-49E9F62CE88E913508CB981FE91E4AE1: nonexistent directory


so i cant make the script work and i have a weird phone :(


any help would be great!

edit: original m1chas bash script works, i dont know what i am doing wrong :(
edit2: It works, but i cant still write on sdcard, its says that i need superuser grants to write there
 
Last edited:
Sorry if i'm writing here, but on XDA I can't because I haven't 10 posts yet.

Anyway, if u can help me, this is my problem. Mounted SDcard, followed your instructions, but got some errors:

Code:
francesco@Aspire5755G:~$ 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!
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
change partition table
parted: delete
parted: create
parted: name
format partitions
format: /dev/block/mmcblk0p23
tune2fs 1.41.14 (22-Dec-2010)
tune2fs: No such file or directory while trying to open /dev/block/mmcblk0p23
Couldn't find valid filesystem superblock.
e2fsck 1.41.14 (22-Dec-2010)
e2fsck: No such file or directory while trying to open /dev/block/mmcblk0p23
Possibly non-existent device?
tune2fs 1.41.14 (22-Dec-2010)
tune2fs: No such file or directory while trying to open /dev/block/mmcblk0p23
Couldn't find valid filesystem superblock.
e2fsck 1.41.14 (22-Dec-2010)
e2fsck: No such file or directory while trying to open /dev/block/mmcblk0p23
Possibly non-existent device?
format: /dev/block/mmcblk0p24
tune2fs 1.41.14 (22-Dec-2010)
tune2fs: No such file or directory while trying to open /dev/block/mmcblk0p24
Couldn't find valid filesystem superblock.
e2fsck 1.41.14 (22-Dec-2010)
e2fsck: No such file or directory while trying to open /dev/block/mmcblk0p24
Possibly non-existent device?
tune2fs 1.41.14 (22-Dec-2010)
tune2fs: No such file or directory while trying to open /dev/block/mmcblk0p24
Couldn't find valid filesystem superblock.
e2fsck 1.41.14 (22-Dec-2010)
e2fsck: No such file or directory while trying to open /dev/block/mmcblk0p24
Possibly non-existent device?
format: /dev/block/mmcblk0p25
tune2fs 1.41.14 (22-Dec-2010)
tune2fs: No such file or directory while trying to open /dev/block/mmcblk0p25
Couldn't find valid filesystem superblock.
e2fsck 1.41.14 (22-Dec-2010)
e2fsck: No such file or directory while trying to open /dev/block/mmcblk0p25
Possibly non-existent device?
tune2fs 1.41.14 (22-Dec-2010)
tune2fs: No such file or directory while trying to open /dev/block/mmcblk0p25
Couldn't find valid filesystem superblock.
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), 24710/393217 blocks
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/769287 blocks
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/769287 blocks
Done.
francesco@Aspire5755G:~$


Maybe because i resized userdata and storage partitions? Or what? thanks

Code:
print
Model: MMC 032G94 (sd/mmc)
Disk /dev/block/mmcblk0: 31269MB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number  Start  End      Size    File system  Name      Flags
1      0.02MB  89.1MB  89.1MB  fat16        modem
2      89.1MB  178MB    89.1MB  fat16        modem1
3      178MB  179MB    0.52MB                sbl1
4      179MB  179MB    0.52MB                sbl2
5      179MB  180MB    1.05MB                sbl3
6      180MB  181MB    1.05MB                rpm
7      181MB  182MB    1.05MB                tz
8      182MB  183MB    0.52MB                DDR
9      183MB  187MB    4.19MB                aboot
10      187MB  188MB    1.05MB                misc
11      188MB  191MB    2.99MB                logo
12      191MB  192MB    0.80MB                m9kefs1
13      192MB  193MB    0.80MB                m9kefs2
14      193MB  193MB    0.00MB                m9kefsc
15      193MB  201MB    8.50MB                bk1
16      201MB  202MB    0.80MB                m9kefs3
17      202MB  268MB    66.3MB                bk2
18      268MB  284MB    15.7MB                boot
19      284MB  300MB    15.7MB                boot1
20      300MB  316MB    15.7MB                recovery
21      316MB  327MB    11.5MB                bk3
22      327MB  336MB    8.39MB  ext4        persist
23      336MB  1176MB  840MB    ext2        system
24      1176MB  2016MB  840MB    ext2        system1
25      2016MB  2419MB  403MB    ext2        cache
26      2419MB  5570MB  3151MB  ext4        userdata
27      8812MB  31269MB  22457MB  ext4        storage

(parted)

Now system1 and system2 are ext2, seems
 
Last edited:
Hi, I nave a problemi: when I reflash the images rom (4.10.17) on my mi3 with miflash, the message "partition table doesn't exist" ... I try to fix siti the script but nothing .... The same error when flash with miflash.... Help me... How I do?
 
Hi, I nave a problemi: when I reflash the images rom (4.10.17) on my mi3 with miflash, the message "partition table doesn't exist" ... I try to fix siti the script but nothing .... The same error when flash with miflash.... Help me... How I do?

Hem... This is not for mi3, it's for mi2.. That's why u have this problem.
Put it into download mode and then flash with miflash the stock rom
 
Hi, I nave a problemi: when I reflash the images rom (4.10.17) on my mi3 with miflash, the message "partition table doesn't exist" ... I try to fix siti the script but nothing .... The same error when flash with miflash.... Help me... How I do?
Why would you ever do that?
Mi3 already has 4.4 and doesn't need any changes in partitions. Not mentioning that this thread is not even related to Mi3.

Wysłane z MI4
 
Help,I accidentaly flashed boot image on aboot partition,how do I repair this?
U need to force dload mode by connecting sim pins with battery one. Then with miflash u'll be able to restore everything

Sent from my mi²s