Log: [email protected]:~$ ls /dev/sd*
/dev/sda /dev/sdb12 /dev/sdb2 /dev/sdb27 /dev/sdb34 /dev/sdb6
/dev/sda1 /dev/sdb13 /dev/sdb20 /dev/sdb28 /dev/sdb35 /dev/sdb7
/dev/sda2 /dev/sdb14 /dev/sdb21 /dev/sdb29 /dev/sdb36 /dev/sdb8
/dev/sda5 /dev/sdb15 /dev/sdb22 /dev/sdb3 /dev/sdb37 /dev/sdb9
/dev/sdb /dev/sdb16 /dev/sdb23 /dev/sdb30 /dev/sdb38
/dev/sdb1 /dev/sdb17 /dev/sdb24 /dev/sdb31 /dev/sdb39
/dev/sdb10 /dev/sdb18 /dev/sdb25 /dev/sdb32 /dev/sdb4
/dev/sdb11 /dev/sdb19 /dev/sdb26 /dev/sdb33 /dev/sdb5
[email protected]:~$ /gdisk -l /dev/sdb/39
bash: /gdisk: No such file or directory
[email protected]:~$ gdisk -l /dev/sdb/39
GPT fdisk (gdisk) version 0.8.1
Problem opening /dev/sdb/39 for reading! Error is 20.
[email protected]:~$ sudo -i
[sudo] password for zub74:
Sorry, try again.
[sudo] password for zub74:
[email protected]:~# gdisk -l /dev/sdb39
GPT fdisk (gdisk) version 0.8.1
Partition table scan:
MBR: not present
BSD: not present
APM: not present
GPT: not present
Creating new GPT entries.
Disk /dev/sdb39: 24543 sectors, 12.0 MiB
Logical sector size: 512 bytes
Disk identifier (GUID): C9BED902-47DD-4837-8F49-1DCEF2BB5281
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 24509
Partitions will be aligned on 2048-sector boundaries
Total free space is 24476 sectors (12.0 MiB)
Number Start (sector) End (sector) Size Code Name
[email protected]:~#
For some reason, the table there won't show up! Does anyone either have a link to the d800 table or know how to fix this error?
Related
So I did a wipe on my phone and installed Hero. Whenever I try to install an app it says "insufficient storage". I only have 9Mb available in my internal memory.. why is it so little?
I just formatted my 4Gb sdcard to Fat32 and ran sdsplit and got the following::
Code:
$ su
# lucid -s
/data/app is not linked
/data/app-private is not linked
/data/data is not linked
/data/dalvik-cache is not linked
/system/media is not linked
-------------------------
-------------------------
2.0K /system/sd
# du -s /sdcard
16 /sdcard
# df /data
/data: 91904K total, 82108K used, 9796K available (block size 4096)
# /data/sdsplit -fs 3600M
--------------------------------------
+You have chosen to perform the following actions:
.BACKUP /sdcard contents to /data
.CONFIGURE system to mount EXT2 partition
!WARNING! Do NOT do this on JF1.5 builds!
.REPARTITION sdcard: 3600M FAT / EXT2
!WARNING! Will DELETE data on sdcard!
.MAKE FAT32 and EXT2 filesystems
.RESTORE /data to sdcard
ARE YOU SURE YOU WANT TO PROCEED? y/N
y
--------------------------------------
+Checking validity of mkdosfs
1+0 records in
1+0 records out
1 bytes transferred in 0.001 secs (1000 bytes/sec)
--------------------------------------
+Checking validity of mke2fs
--------------------------------------
+Backing up /sdcard to /data
--------------------------------------
+Backing up and Updating /system/init.rc
--------------------------------------
+Backing up and Updating /system/etc/mountd.conf
WARNING: /system/etc/mountd.conf backup /system/etc/mountd.conf.orig already exists!
Do you want to overwrite it? y/N
y
--------------------------------------
+Partitioning sdcard
--------------------------------------
+ Blank out the 4 first blocks of the sdcard so that mountd does not try to remount it on fdisk write preventing a kernel partition table re-read.
4+0 records in
4+0 records out
2048 bytes transferred in 0.006 secs (341333 bytes/sec)
--------------------------------------
+ Wipe partition table and create FAT32 3600M/EXT2 partitions
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that the previous content
won't be recoverable.
The number of cylinders for this disk is set to 125632.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
Command (m for help): Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that the previous content
won't be recoverable.
The number of cylinders for this disk is set to 125632.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
Command (m for help): Command action
e extended
p primary partition (1-4)
Partition number (1-4): First cylinder (1-125632, default 1): Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-125632, default 125632):
Command (m for help): Selected partition 1
Hex code (type L to list codes): Changed system type of partition 1 to b (Win95 FAT32)
Command (m for help):
Disk /dev/block/mmcblk0: 4116 MB, 4116709376 bytes
4 heads, 16 sectors/track, 125632 cylinders
Units = cylinders of 64 * 512 = 32768 bytes
Device Boot Start End Blocks Id System
/dev/block/mmcblk0p1 1 109864 3515640 b Win95 FAT32
Command (m for help): Command action
e extended
p primary partition (1-4)
Partition number (1-4): First cylinder (109865-125632, default 109865): Using default value 109865
Last cylinder or +size or +sizeM or +sizeK (109865-125632, default 125632): Using default value 125632
Command (m for help): Partition number (1-4): Hex code (type L to list codes):
Command (m for help):
Disk /dev/block/mmcblk0: 4116 MB, 4116709376 bytes
4 heads, 16 sectors/track, 125632 cylinders
Units = cylinders of 64 * 512 = 32768 bytes
Device Boot Start End Blocks Id System
/dev/block/mmcblk0p1 1 109864 3515640 b Win95 FAT32
/dev/block/mmcblk0p2 109865 125632 504576 83 Linux
Command (m for help): The partition table has been altered!
Calling ioctl() to re-read partition table
--------------------------------------
+Creating FAT32 Filesystem
opening /dev/block/mmcblk0p1
/dev/block/mmcblk0p1: 7017536 sectors in 877192 FAT32 clusters (4096 bytes/cluster)
MBR type: 11
bps=512 spc=8 res=32 nft=2 mid=0xf0 spt=7031280 hds=0 hid=0 bsec=7031280 bspf=6854 rdcl=2 infs=1 bkbs=2
--------------------------------------
+Creating EXT2 Filesystem
mke2fs 1.41.3 (12-Oct-2008)
Filesystem label=
OS type: Linux
Block size=1024 (log=0)
Fragment size=1024 (log=0)
126480 inodes, 504576 blocks
25228 blocks (5.00%) reserved for the super user
First data block=1
Maximum filesystem blocks=67633152
62 block groups
8192 blocks per group, 8192 fragments per group
2040 inodes per group
Superblock backups stored on blocks:
8193, 24577, 40961, 57345, 73729, 204801, 221185, 401409
Writing inode tables: done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 37 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
--------------------------------------
+Mounting FAT Filesystem
Usage: mount [-r] [-w] [-o options] [-t type] device directory
--------------------------------------
+Mounting EXT2 Filesystem
Did not find ext2.ko, (normal on JF1.5)
Usage: mount [-r] [-w] [-o options] [-t type] device directory
--------------------------------------
+You should now have a FAT partition on /sdcard and an EXT2 partition on /system/sd. If things worked, you should see an entry for /sdcard and /system/sd below:
--------------------------------------
+Restoring /data/sdcard to /sdcard
cp: cannot create directory '/sdcard/.footprints': Read-only file system
Permission setting errors are normal on a FAT system
===ERROR: restore failed!
I'm somewhat in the same dilemma by messing up my partitions trying to dual-boot. Now I have a semi-bricked Nook Color that still can be booted up via a CWM SD card.
I was able to completely wipe it all through parted. Now I need help restoring the partitions and the required files to boot back into the stock firmware.
Here is what I have so by using CWM.
~ # fdisk -l /dev/block/mmcblk0
fdisk -l /dev/block/mmcblk0
Disk /dev/block/mmcblk0: 7944 MB, 7944011776 bytes
4 heads, 16 sectors/track, 242432 cylinders
Units = cylinders of 64 * 512 = 32768 bytes
Device Boot Start End Blocks Id System
~ #
Click to expand...
Click to collapse
It looks like the heads and cylinders are different. Why is that?
~ # parted /dev/block/mmcblk0
parted /dev/block/mmcblk0
GNU Parted 1.8.8.1.179-aef3
Using /dev/block/mmcblk0
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print
print
print
Model: MMC SEM08G (sd/mmc)
Disk /dev/block/mmcblk0: 7944MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
(parted)
Click to expand...
Click to collapse
I've been reading this thread http://forum.xda-developers.com/showthread.php?t=942324 and have all the partitions images except for mmcblk0p2 and mmcblk0p3.
I just don't have any idea on how to make the partitions then write the partition images to it.
~ # e2fsck -c /dev/block/mmcblk0p9
e2fsck 1.41.12 (17-May-2010)
/dev/block/mmcblk0p9: Updating bad block inode.
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Directory inode 46753, block #0, offset 0: directory corrupted
Salvage<y>?
Is this supposed to happen or do I indeed have a corrupted directory?
I went ahead anyway and this was my result
/dev/block/mmcblk0p9: ***** FILE SYSTEM WAS MODIFIED *****
/dev/block/mmcblk0p9: 1576/54544 files (0.2% non-contiguous), 71430/218112 blocks
Narada2XK said:
I went ahead anyway and this was my result
/dev/block/mmcblk0p9: ***** FILE SYSTEM WAS MODIFIED *****
/dev/block/mmcblk0p9: 1576/54544 files (0.2% non-contiguous), 71430/218112 blocks
Click to expand...
Click to collapse
hmmm what it shows? ;D it means that your emmc isnt fcked? or smt like that
EdgaBimbam said:
hmmm what it shows? ;D it means that your emmc isnt fcked? or smt like that
Click to expand...
Click to collapse
~ # umount /cache
~ # umount /system
~ # parted /dev/block/mmcblk0
GNU Parted 1.8.8.1.179-aef3
Using /dev/block/mmcblk0
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print
print
Model: MMC VYL00M (sd/mmc)
Disk /dev/block/mmcblk0: 15.8GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
1 4194kB 25.2MB 21.0MB ext4 EFS
2 25.2MB 26.5MB 1311kB SBL1
3 27.3MB 28.6MB 1311kB SBL2
4 29.4MB 37.7MB 8389kB PARAM
5 37.7MB 46.1MB 8389kB KERNEL
6 46.1MB 54.5MB 8389kB RECOVERY
7 54.5MB 264MB 210MB ext4 CACHE
8 264MB 281MB 16.8MB MODEM
9 281MB 1174MB 893MB ext4 FACTORYFS
10 1174MB 3322MB 2147MB ext4 DATAFS
11 3322MB 15.2GB 11.9GB fat32 UMS
12 15.2GB 15.8GB 537MB ext4 HIDDEN
(parted) quit
quit
~ # e2fsck -n -f -v /dev/block/mmcblk0p9
e2fsck 1.41.12 (17-May-2010)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
1568 inodes used (2.87%)
3 non-contiguous files (0.2%)
1 non-contiguous directory (0.1%)
# of inodes with ind/dind/tind blocks: 0/0/0
Extent depth histogram: 1293/1
70009 blocks used (32.10%)
0 bad blocks
0 large files
1190 regular files
103 directories
0 character device files
0 block device files
0 fifos
0 links
266 symbolic links (266 fast symbolic links)
0 sockets
--------
1559 files
~ #
I don't have any bad blocks and so far I don't see any problems, however, when I checked mmcblk0p10, that came back with errors, which I am not sure if I should have or not. I didn't bother to fix that though.
I suppose it's supposed to be that was because I re-install CM9, factory reset / wiped and...
~ # umount /cache
~ # umount /system
~ # e2fsck -n -f -v /dev/block/mmcblk0p9
e2fsck 1.41.12 (17-May-2010)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Directory inode 46753, block #0, offset 0: directory corrupted
Salvage? no
e2fsck: aborted
~ #
going to restore my nandroid now.
Hey all.
Tools I used for flashing and backup:
on PC linux box:
- heimdall - which does the flashing
- netcat - (nc, ncat or netcat) tool for writing to or reading from network.
- partx - assigns partitioned disk images as kernel's loop devices like: loop0p2...loop0p25
on s3 mini:
- busybox
- "Rooted SSH/SFTP Daemon"
Before rooting reboot the phone to the download mode and download
the pit file with:
Code:
heimdall download-pit --output goldenxx.pit --no--reboot
Root your phone and install busybox and ssh daemon on it.
Start sshd but close all other apps to keep filesystem activity so low as possible.
start netcat on your PC:
Code:
netcat -l 192.168.0.11 5050 > mmcblk0.gz
Now netcat is listening for input from your lan (Replace address to corresponding your PC's IP address)
Now try to connect to your phone with ssh. When you got an # prompt then:
Code:
sync
and send your whole internal storage from phone to your PC:
Code:
cat /dev/block/mmcblk0 | gzip | nc 192.168.0.11 5050
Do not start any apps on your phone before you got back the command prompts both on phone and PC.
when you got a command prompt again and no error messages was printed. you should have an
gzip compressed disk image of you phones mmc on your PC.
Check its integrity running
Code:
gzip -t mmcblk0.gz
If the package is ok, copy the goldenxx.pit and mmcblk0.gz to the sure location.
Now you can make an uncompressed copy of mmcblk0.gz for example:
Code:
zcat Backup/mmcblk0.gz > ~/mmcblk0
With partx you can use the image like any other partitioned disks running as root:
Code:
partx -v -a ~/mmcblk0
it should print something like this:
Code:
partition: none, disk: mmcblk0, lower: 0, upper: 0
Trying to use '/dev/loop0' for the loop device
/dev/loop0: partition table type 'gpt' detected
/dev/loop0: partition #2 added
/dev/loop0: partition #3 added
/dev/loop0: partition #4 added
...
/dev/loop0: partition #25 added
and print out the data of partitions associated within kernel:
Code:
partx -s ~/mmcblk0
Code:
3 1024 3071 2048 1M PIT 52444e41-494f-2044-5049-540000000000
4 6144 8191 2048 1M MD5HDR 52444e41-494f-2044-4d44-354844520000
5 8192 9215 1024 512K STEboot1 52444e41-494f-2044-5354-45626f6f7431
6 9216 10239 1024 512K STEboot2 52444e41-494f-2044-5354-45626f6f7432
7 10240 11263 1024 512K Dnt 52444e41-494f-2044-446e-740000000000
8 11264 12287 1024 512K reserved 52444e41-494f-2044-7265-736572766564
9 16384 18431 2048 1M CSPSAFS 52444e41-494f-2044-4353-505341465300
10 18432 20479 2048 1M CSPSAFS2 52444e41-494f-2044-4353-505341465332
11 20480 53247 32768 16M EFS 52444e41-494f-2044-4546-530000000000
12 53248 86015 32768 16M ModemFS 52444e41-494f-2044-4d6f-64656d465300
13 86016 118783 32768 16M ModemFS2 52444e41-494f-2044-4d6f-64656d465332
14 118784 221183 102400 50M Fota 52444e41-494f-2044-466f-746100000000
15 380928 381055 128 64K IPL Modem 52444e41-494f-2044-4950-4c204d6f6465
16 385024 413695 28672 14M Modem 52444e41-494f-2044-4d6f-64656d000000
17 417792 421887 4096 2M Loke4 52444e41-494f-2044-4c6f-6b6534000000
18 421888 425983 4096 2M 2ndLoke4 52444e41-494f-2044-326e-644c6f6b6534
19 425984 458751 32768 16M PARAM 52444e41-494f-2044-5041-52414d000000
20 458752 491519 32768 16M Kernel 52444e41-494f-2044-4b65-726e656c0000
21 491520 524287 32768 16M Kernel2 52444e41-494f-2044-4b65-726e656c3200
22 524288 2981887 2457600 1.2G SYSTEM 52444e41-494f-2044-5359-5354454d0000
23 2981888 4702207 1720320 840M CACHEFS 52444e41-494f-2044-4341-434845465300
24 4702208 5357567 655360 320M HIDDEN 52444e41-494f-2044-4849-4444454e0000
25 5357568 15249407 9891840 4.7G DATAFS 52444e41-494f-2044-4441-544146530000
now you can explore the partitions and make images of it. For example:
Code:
file -s /dev/loop0p11
/dev/loop0p11: Linux rev 1.0 ext4 filesystem data, UUID=1b70457a-e011-c65a-87c6-f346bd874821, volume name "efs" (extents) (large files)
Code:
cat /dev/loop0p11 > ~/efs.ext4
and...
Code:
file -s /dev/loop0p16
Code:
/dev/loop0p16: data
It is modem.bin so:
Code:
cat /dev/loop0p16 > ~/modem.bin
Note that ext4 images must be transformed to the right .img-file form with ext2simg tool before flashing.
Be careful before flash your phone with these files.
remember to unmount all /dev/loop0 -partitions and finally
Code:
partx -d /dev/loop0
losetup -d /dev/loop0
because the images was copied from running system,
all writeable filesystems are not clean. So you might want to e2fsck these partitions.
KrRain said:
Hey all.
Tools I used for flashing and backup:
on PC linux box:
- heimdall - which does the flashing
- netcat - (nc, ncat or netcat) tool for writing to or reading from network.
- partx - assigns partitioned disk images as kernel's loop devices like: loop0p2...loop0p25
on s3 mini:
- busybox
- "Rooted SSH/SFTP Daemon"
Before rooting reboot the phone to the download mode and download
the pit file with:
Code:
heimdall download-pit --output goldenxx.pit --no--reboot
Root your phone and install busybox and ssh daemon on it.
Start sshd but close all other apps to keep filesystem activity so low as possible.
start netcat on your PC:
Code:
netcat -l 192.168.0.11 5050 > mmcblk0.gz
Now netcat is listening for input from your lan (Replace address to corresponding your PC's IP address)
Now try to connect to your phone with ssh. When you got an # prompt then:
Code:
sync
and send your whole internal storage from phone to your PC:
Code:
cat /dev/block/mmcblk0 | gzip | nc 192.168.0.11 5050
Do not start any apps on your phone before you got back the command prompts both on phone and PC.
when you got a command prompt again and no error messages was printed. you should have an
gzip compressed disk image of you phones mmc on your PC.
Check its integrity running
Code:
gzip -t mmcblk0.gz
If the package is ok, copy the goldenxx.pit and mmcblk0.gz to the sure location.
Now you can make an uncompressed copy of mmcblk0.gz for example:
Code:
zcat Backup/mmcblk0.gz > ~/mmcblk0
With partx you can use the image like any other partitioned disks running as root:
Code:
partx -v -a ~/mmcblk0
it should print something like this:
Code:
partition: none, disk: mmcblk0, lower: 0, upper: 0
Trying to use '/dev/loop0' for the loop device
/dev/loop0: partition table type 'gpt' detected
/dev/loop0: partition #2 added
/dev/loop0: partition #3 added
/dev/loop0: partition #4 added
...
/dev/loop0: partition #25 added
and print out the data of partitions associated within kernel:
Code:
partx -s ~/mmcblk0
Code:
3 1024 3071 2048 1M PIT 52444e41-494f-2044-5049-540000000000
4 6144 8191 2048 1M MD5HDR 52444e41-494f-2044-4d44-354844520000
5 8192 9215 1024 512K STEboot1 52444e41-494f-2044-5354-45626f6f7431
6 9216 10239 1024 512K STEboot2 52444e41-494f-2044-5354-45626f6f7432
7 10240 11263 1024 512K Dnt 52444e41-494f-2044-446e-740000000000
8 11264 12287 1024 512K reserved 52444e41-494f-2044-7265-736572766564
9 16384 18431 2048 1M CSPSAFS 52444e41-494f-2044-4353-505341465300
10 18432 20479 2048 1M CSPSAFS2 52444e41-494f-2044-4353-505341465332
11 20480 53247 32768 16M EFS 52444e41-494f-2044-4546-530000000000
12 53248 86015 32768 16M ModemFS 52444e41-494f-2044-4d6f-64656d465300
13 86016 118783 32768 16M ModemFS2 52444e41-494f-2044-4d6f-64656d465332
14 118784 221183 102400 50M Fota 52444e41-494f-2044-466f-746100000000
15 380928 381055 128 64K IPL Modem 52444e41-494f-2044-4950-4c204d6f6465
16 385024 413695 28672 14M Modem 52444e41-494f-2044-4d6f-64656d000000
17 417792 421887 4096 2M Loke4 52444e41-494f-2044-4c6f-6b6534000000
18 421888 425983 4096 2M 2ndLoke4 52444e41-494f-2044-326e-644c6f6b6534
19 425984 458751 32768 16M PARAM 52444e41-494f-2044-5041-52414d000000
20 458752 491519 32768 16M Kernel 52444e41-494f-2044-4b65-726e656c0000
21 491520 524287 32768 16M Kernel2 52444e41-494f-2044-4b65-726e656c3200
22 524288 2981887 2457600 1.2G SYSTEM 52444e41-494f-2044-5359-5354454d0000
23 2981888 4702207 1720320 840M CACHEFS 52444e41-494f-2044-4341-434845465300
24 4702208 5357567 655360 320M HIDDEN 52444e41-494f-2044-4849-4444454e0000
25 5357568 15249407 9891840 4.7G DATAFS 52444e41-494f-2044-4441-544146530000
now you can explore the partitions and make images of it. For example:
Code:
file -s /dev/loop0p11
/dev/loop0p11: Linux rev 1.0 ext4 filesystem data, UUID=1b70457a-e011-c65a-87c6-f346bd874821, volume name "efs" (extents) (large files)
Code:
cat /dev/loop0p11 > ~/efs.ext4
and...
Code:
file -s /dev/loop0p16
Code:
/dev/loop0p16: data
It is modem.bin so:
Code:
cat /dev/loop0p16 > ~/modem.bin
Note that ext4 images must be transformed to the right .img-file form with ext2simg tool before flashing.
Be careful before flash your phone with these files.
remember to unmount all /dev/loop0 -partitions and finally
Code:
partx -d /dev/loop0
losetup -d /dev/loop0
because the images was copied from running system,
all writeable filesystems are not clean. So you might want to e2fsck these partitions.
Click to expand...
Click to collapse
Cool.... What for...?
S3miniFin said:
Cool.... What for...?
Click to expand...
Click to collapse
Because now I have a backup of all partitions of my S3 Mini.
Since the gapps for 4.4 need very much space wee need bigger system partitions.
I've created a script which automates this process and increases them both to 840MB.
the space is taken from the userdata partition.
You should backup your whole phone before doing this(storage will not be touched but you shouldn't take the risk)
I tested it with 32GB version only so if you want to know if it will work for 16gb, too give me the output of this command:
parted -s /dev/block/mmcblk0 print
Download:
http://d-h.st/FWz
Instructions:
1) boot into CWM
2) adb push repartition.sh /tmp
3) adb shell chmod 0777 /tmp/repartition.sh
4) adb shell /tmp/repartition.sh
5) adb reboot recovery
6) now you can do all the usual stuff like enabling TDB and installing ROM's
Sounds great but I cannot test it, since I dont have any parted binaries (at least in my 4.1.1 Wajk Wiui ROM) ? Can you please tell me where I can get them.
Second Question:
Im currently running TDB:
System 1 latest WIUI 4.1.1 v5 ROM
System 2 MIUI v6 1.9.19
Both system partitions are completely full (usage 98 %) and the same with the data partitions ( usage 97 % )!
Would it be possible to decrease /sdcard space and repartition it like the following with TDB enabled:
system 800 mb
system1 800 mb
data 1500 mb
data1 1500 mb
sdcard *the rest*
thanks in advance
sounds like you tried to repartition from Android
You need to boot to CWM - you have parted there.
Sorry I hate people who just ask stupid questions before reading the instructions carefully ...silly me sorry for that...
What about the second question, is it possible to either increase the data partitions for less space on /sdcard ?
there isn't sth. like a data1 partition. we have one data partition only that's why we need the TDB hack.
other than that it's possible but you should backup all your data and restore it afterwards.
m11kkaa said:
there isn't sth. like a data1 partition. we have one data partition only that's why we need the TDB hack.
other than that it's possible but you should backup all your data and restore it afterwards.
Click to expand...
Click to collapse
Ok got it.
So following your instructions and editing script like the following should work ?
Code:
change_table() {
ui_print "parted: delete"
parted -s /dev/block/mmcblk0 rm 23 || return 1 # system
parted -s /dev/block/mmcblk0 rm 24 || return 1 # system1
parted -s /dev/block/mmcblk0 rm 25 || return 1 # cache
parted -s /dev/block/mmcblk0 rm 26 || return 1 # userdata
parted -s /dev/block/mmcblk0 rm 27 || return 1 # storage
ui_print "parted: create"
parted -s /dev/block/mmcblk0 mkpartfs primary ext2 336MB 1176MB || return 1
parted -s /dev/block/mmcblk0 mkpartfs primary ext2 1176MB 2016MB || return 1
parted -s /dev/block/mmcblk0 mkpartfs primary ext2 2016MB 2419MB || return 1
parted -s /dev/block/mmcblk0 mkpartfs primary ext2 2419MB 6515MB || return 1
parted -s /dev/block/mmcblk0 mkpartfs primary ext2 6515MB 31.3GB || return 1
ui_print "parted: name"
parted -s /dev/block/mmcblk0 name 23 system || return 1
parted -s /dev/block/mmcblk0 name 24 system1 || return 1
parted -s /dev/block/mmcblk0 name 25 cache || return 1
parted -s /dev/block/mmcblk0 name 26 userdata || return 1
parted -s /dev/block/mmcblk0 name 27 storage || return 1
return 0
}
Code:
ui_print "format partitions"
for NUM in 23 24 25 26 27
do
if ! format_partition "$NUM"; then
ui_print "Failed format partition $NUM"
exit 1
fi
done
already did full backup of sdcard, i just dont know if i should disable TDB before i stat repartitioning ... I dont know how TDB works to split the data partition thats my problem :/
yes that should work.
You don't need to disable TDB because your whole data partition will be wiped and it stores the TDB configuration(that means that TDB automatically gets disabled).
Had some errors but now its working fine ..thanks
unmount sdcard in CWM. It's a bug of this script.
Nice to hear it works now.
7 days ago Phone not start because partition corrupt
Hello
First do not panic is not the fault of your script but for you experience with mi2s and partitions are the few people in the world that can save my phone.
I'm playing a game phone(Xiaomi m2s 16GB) hang and one or more partitions are corrupt (I think this is the problem). But all de documentation than i find to delete o edit partition not work. Fastboot rom installation all ok but always only start with white logo. Mirecovery works perfectly and CWM by ivan works but temporally with this command sudo fastboot boot recovery.img
This is the result of your script
check environment
/sbin/mount
/sbin/umount
/sbin/parted
/sbin/tune2fs
/sbin/e2fsck
dump old table
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: Unable to satisfy all constraints on the partition.
Failed changing table
OTHER TEST
/dev/block # e2fsck -fDp /dev/block/mmcblk0p24
e2fsck: Bad magic number in super-block while trying to open /dev/block/mmcblk0p24
/dev/block/mmcblk0p24:
The superblock could not be read or does not describe a correct ext2
filesystem. If the device is valid and it really contains an ext2
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193 <device>
/dev/block # tune2fs -O extents,uninit_bg,dir_index /dev/block/mmcblk0p24
tune2fs 1.41.14 (22-Dec-2010)
tune2fs: Bad magic number in super-block while trying to open /dev/block/mmcblk0p24
Couldn't find valid filesystem superblock.
I try to delete partition and create a new one but fail.
(parted) rm 24
rm 24
(parted) mkpartfs primary ext2 872 1409
mkpartfs primary ext2 872 1409
Error: Unable to satisfy all constraints on the partition.
I FOUND THIS IN XDA FORUM BUT I HAVEN'T IMAGE TO TEST
adb push mmcblk0p19_repaired.img /tmp/
adb shell dd if=/tmp/mmcblk0p19_repaired.img of=/dev/block/mmcblk0p19
adb reboot bootloader
MY PARTITION TABLE SYSTEM1 NOT HAVE FILESYSTEM EXT4
[email protected]:~/Escritorio/recovery$ sudo adb shell parted -s /dev/block/mmcblk0 print
Model: MMC SEM16G (sd/mmc)
Disk /dev/block/mmcblk0: 15.8GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
1 17.4kB 89.1MB 89.1MB fat16 modem
2 89.1MB 178MB 89.1MB fat16 modem1
3 178MB 179MB 524kB sbl1
4 179MB 179MB 524kB sbl2
5 179MB 180MB 1049kB sbl3
6 180MB 181MB 1049kB rpm
7 181MB 182MB 1049kB tz
8 182MB 183MB 524kB DDR
9 183MB 187MB 4194kB aboot
10 187MB 188MB 1049kB misc
11 188MB 191MB 2990kB logo
12 191MB 192MB 799kB m9kefs1
13 192MB 193MB 799kB m9kefs2
14 193MB 193MB 1024B m9kefsc
15 193MB 201MB 8501kB bk1
16 201MB 202MB 799kB 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 8389kB ext4 persist
23 336MB 872MB 537MB ext4 system
24 872MB 1409MB 537MB system1
25 1409MB 1812MB 403MB ext4 cache
26 1812MB 5570MB 3758MB ext4 userdata
27 5570MB 15.8GB 10.2GB ext4 storage
Xiaomi Mi2 32GB
XIAOMI MI2 32GB ONLY
For those using a single MIUI ROM I've made a partition table with system1 set to 1024Mb.
Run the attached from CWM (in /tmp).
Aternus said:
XIAOMI MI2 32GB ONLY
For those using a single MIUI ROM I've made a partition table with system1 set to 1024Mb.
Run the attached from CWM (in /tmp).
Click to expand...
Click to collapse
Can you explain a little more? Does it only leave 1 system partition? Can I flash it like a regular zip?
Enviado desde mi MI 2S mediante Tapatalk
any step by step manual how to change partition? with all necessary downloads etc...
or.... is it possible to delete system2 with all its parts? - for me I'd to use system1 only
Why can not I change the size of the system partition?
Already tried several times, with disabled TDB and with enabled TDB.
Full wipe did and still no result.
P.S. I have already been able to do any repartitioning.
Code:
PS C:\Android> adb push repartition.sh /tmp
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
21 KB/s (3797 bytes in 0.169s)
PS C:\Android> adb shell chmod 0777 /tmp/repartition.sh
PS C:\Android> 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 /sdcard: 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)
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/500856 files (0.0% non-contiguous), 62917/1000445 blocks
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/262144 files (0.0% non-contiguous), 49386/524289 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/mmcblk0p24: ***** FILE SYSTEM WAS MODIFIED *****
/dev/block/mmcblk0p24: 11/262144 files (0.0% non-contiguous), 49386/524289 blocks
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 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/mmcblk0p25: ***** FILE SYSTEM WAS MODIFIED *****
/dev/block/mmcblk0p25: 11/196608 files (0.0% non-contiguous), 32935/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/399200 files (9.1% non-contiguous), 28951/798348 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/399200 files (9.1% non-contiguous), 28951/798348 blocks
Done.
PS C:\Android> adb reboot recovery
PS C:\Android>
UPD. The problem was that I was using Windows Povershell
Run the script from the command line and everything turned out.
Thanks!
I have to format first system and system1 in recovery to apply this script, because I have and error :
tmp/repartition.sh lin 115 can´t create /sdcard/parted_12_06_2014_FDFD6F4CB043F4956D9CAD053C3738AA.
DO MOUNT your SDCARD
then Follow the instruction
duhh...
I modified the script a little bit for 1 ROM usage. System1 is 840MB as in the original and System2 is 5MB. The rest goes into userdata. This is for the 16GB version.
Ok! I did again and umount the sdcard abd it worked fine.
Thanks
I found a better way
If u reboot into dload mode, u can change the partition table from your computer
The problem is that most partition managers don't support changing the GPT Partition names and that's why I added support for that to GParted.
GParted supports booting from Live CD/USB so Windows/Mac users aren't left out.
http://i.imgur.com/3SwSXs2.png
I pushed the patch to GParted repo's and I'll inform u once there're any news.
from my point of view the best way for use is:
- system (system1) - let 1024 MB
- system1 (system2) - let 10 MB
- userdata (apps) - let 4096 MB (take it from sdcard) - but maybe more