[Q] Help Recreate All Partitions? - Droid Incredible Q&A, Help & Troubleshooting

Hi all,
I am trying to repair an Incredible, that I *think* has missing or corrupt partitions. Can anyone assist me with manually fixing / recreating them? Here is what I've got:
HBOOT 1.02, Unlocked via HtcDev.com
CWM Recovery 5.0.2.0
ADB access
parted command pushed to the device
As soon as I launch CWM, I get the following errors:
E:Can't mount /cache/recovery/command
E:Can't mount /cache/recovery/log
E:Can't open /cache/recovery/log
E:Can't mount /cache/recovery/last_log
E:Can't open/cache/recovery/last_log
When trying to mount the following partitions, I get these errors:
E:failed to find "datadata" partition to mount at "/datata"
Error mounting /datadata!
Error mounting /cache!
Error mounting /sd-ext! <----- and thus I have no SD Card access, can't install zip files from SD
Error mounting /emmc!
Error mounting /sdcard!
E:Unable to write to ums lunfile (No such file or directory)
I do seem to have a boot, system, and data partition, though I am unsure if they are proper size, format, or location. In adb shell, here are some of the commands I know (and have gleaned from other threads).
/dev/block # ls
loop0 loop3 loop6 mmcblk0p1 mtdblock2 mtdblock5
loop1 loop4 loop7 mtdblock0 mtdblock3 mtdblock6
loop2 loop5 mmcblk0 mtdblock1 mtdblock4 platform
/dev/block # parted mmcblk0
parted 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: SD 00000 (sd/mmc)
Disk /dev/block/mmcblk0: 2003MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 1049kB 2003MB 2002MB primary ext3 boot
/dev/block # parted mmcblk0p1
parted mmcblk0p1
GNU Parted 1.8.8.1.179-aef3
Using /dev/block/mmcblk0p1
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print
print
print
Model: Unknown (unknown)
Disk /dev/block/mmcblk0p1: 2002MB
Sector size (logical/physical): 512B/512B
Partition Table: loop
Number Start End Size File system Flags
1 0.00B 2002MB 2002MB ext3
/dev/block # parted mtdblock0
parted mtdblock0
GNU Parted 1.8.8.1.179-aef3
Using /dev/block/mtdblock0
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print
print
print
Error: /dev/block/mtdblock0: unrecognised disk label
...Same result through all 6 mtdblocks
/dev/block # mount -a
mount -a
mount: mounting /dev/block/mmcblk0p2 on /cache failed: No such file or directory
mount: mounting /dev/block/mmcblk1p1 on /sdcard failed: No such file or directory
mount: mounting /dev/block/mmcblk1p2 on /sd-ext failed: No such file or directory
Anyone know what's going on here, and able to help guide me through recreating the proper partition structure?
Thanks in advance!

Also, I am not familiar with the fstab file, but I found the command while researching, and here is the output:
/dev/block # cat /etc/fstab
cat /etc/fstab
/dev/block/mmcblk0p2 /cache auto rw
/dev/block/mmcblk0p1 /data auto rw
/dev/block/mmcblk0p1 /datadata yaffs2 rw
/dev/block/mtdblock3 /system yaffs2 rw
/dev/block/mmcblk1p1 /sdcard vfat rw
/dev/block/mmcblk1p2 /sd-ext auto rw
The "mmcblk1p1" and "mmcblk1p2" don't appear in the /dev/block directory??
/dev/block # ls
ls
loop0 loop3 loop6 mmcblk0p1 mtdblock2 mtdblock5
loop1 loop4 loop7 mtdblock0 mtdblock3 mtdblock6
loop2 loop5 mmcblk0 mtdblock1 mtdblock4 platform

While reading through this post, http://forum.xda-developers.com/showthread.php?t=1819095&page=3, I see a similar behavior in my phone. If I am reading this correctly, my *regular* fstab file needs to be adjusted to include all of the entries that show up in the recovery fstab file? Do I have that right?
Code:
~ # ls /etc/*fstab*
ls /etc/*fstab*
/etc/fstab /etc/recovery.fstab
~ # cat /etc/fstab
cat /etc/fstab
/dev/block/mmcblk0p2 /cache auto rw
/dev/block/mmcblk0p1 /data auto rw
/dev/block/mmcblk0p1 /datadata yaffs2 rw
/dev/block/mtdblock3 /system yaffs2 rw
/dev/block/mmcblk1p1 /sdcard vfat rw
/dev/block/mmcblk1p2 /sd-ext auto rw
~ # cat /etc/recovery.fstab
cat /etc/recovery.fstab
# mount point fstype device [device2]
/misc mtd misc
/recovery mtd recovery
/boot mtd boot
/system yaffs2 system
/datadata yaffs2 datadata
/data ext4 /dev/block/mmcblk0p1 NULL
ext3
/cache ext4 /dev/block/mmcblk0p2 NULL
ext3
/emmc vfat /dev/block/mmcblk0p3
/sdcard vfat /dev/block/mmcblk1p1 /dev/block/mmcblk1
/sd-ext ext4 /dev/block/mmcblk1p2 NULL
ext3
~ # cat /proc/partitions
cat /proc/partitions
major minor #blocks name
31 0 640 mtdblock0
31 1 4608 mtdblock1
31 2 3072 mtdblock2
31 3 253952 mtdblock3
31 4 640 mtdblock4
31 5 40960 mtdblock5
31 6 152576 mtdblock6
179 0 1955840 mmcblk0
179 1 1954816 mmcblk0p1
~ # mount
mount
rootfs on / type rootfs (rw)
tmpfs on /dev type tmpfs (rw,relatime,mode=755)
devpts on /dev/pts type devpts (rw,relatime,mode=600)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
Anyone able to point me in the right direction here?

I'd say flash ruu. You have missing partitions. Whoever had the phone before you messed it up. Mtdblock0 isn't a block device and cannot be managed with parted. Once you try the ruu first (may need s-off to do it) let me know what happens next.
I wouldnt even bother messing with the fstab. The post your talking about is related to swapping the internal and external storage.
Sent from my HTC One using Tapatalk 4

tiny4579 said:
I'd say flash ruu. You have missing partitions. Whoever had the phone before you messed it up. Mtdblock0 isn't a block device and cannot be managed with parted. Once you try the ruu first (may need s-off to do it) let me know what happens next.
I wouldnt even bother messing with the fstab. The post your talking about is related to swapping the internal and external storage.
Sent from my HTC One using Tapatalk 4
Click to expand...
Click to collapse
Hi Tiny, thanks for the assistance. I've been using your Cyanogen 10.1 on my own Dinc and love it. Thanks for your awesome work!
I did try flashing the most recent RUU yesterday from here: shipped-roms.com/index.php?category=android&model=Incredible -- 4.08.605.2, and it went through the motions as if it was working (completed without any errors), but it didnt actually do anything (oddly, it didn't create a log file in the ruu_lof directory either) that I noticed. I tried it one more time right now though, just to be safe, and it failed. This time, it log, and the last entry is <T182509><DEBUG><OUT>FAILED (remote: 99 unknown fail)</OUT>
</DEBUG></T182509>
I didn't think S-OFF would make much difference with the unlocked bootloader, but I'll read up on how to do it. In the meantime, any other ideas? And, again, thanks a lot, I appreciate it greatly.

Lifted this command from another thread as well:
Code:
~ # e2fsck -fy /dev/block/mmcblk0p1
e2fsck -fy /dev/block/mmcblk0p1
e2fsck 1.41.6 (30-May-2009)
/dev/block/mmcblk0p1: recovering journal
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
/dev/block/mmcblk0p1: ***** FILE SYSTEM WAS MODIFIED *****
/dev/block/mmcblk0p1: 14/122400 files (0.0% non-contiguous), 15903/488704 blocks
~ # e2fsck -fy /dev/block/mmcblk0
e2fsck -fy /dev/block/mmcblk0
e2fsck 1.41.6 (30-May-2009)
e2fsck: Superblock invalid, trying backup blocks...
e2fsck: Bad magic number in super-block while trying to open /dev/block/mmcblk0
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>
~ # quit

DavidPhx said:
Hi Tiny, thanks for the assistance. I've been using your Cyanogen 10.1 on my own Dinc and love it. Thanks for your awesome work!
I did try flashing the most recent RUU yesterday from here: shipped-roms.com/index.php?category=android&model=Incredible -- 4.08.605.2, and it went through the motions as if it was working (completed without any errors), but it didnt actually do anything (oddly, it didn't create a log file in the ruu_lof directory either) that I noticed. I tried it one more time right now though, just to be safe, and it failed. This time, it log, and the last entry is <T182509><DEBUG><OUT>FAILED (remote: 99 unknown fail)</OUT>
</DEBUG></T182509>
I didn't think S-OFF would make much difference with the unlocked bootloader, but I'll read up on how to do it. In the meantime, any other ideas? And, again, thanks a lot, I appreciate it greatly.
Click to expand...
Click to collapse
Youll need s-off to flash a downgrade ruu. If your ruu is an upgrade it should work without s-off though I recommend it anyway to make resolving the issue simpler.
Sent from my HTC One using Tapatalk 4

tiny4579 said:
Youll need s-off to flash a downgrade ruu. If your ruu is an upgrade it should work without s-off though I recommend it anyway to make resolving the issue simpler.
Sent from my HTC One using Tapatalk 4
Click to expand...
Click to collapse
Tiny, to achieve S-OFF, I am following Scotty's instructions here: http://androidforums.com/incredible...ot-unlock-downgrade-achieve-s-off-htcdev.html
I am having some difficulty on Step 4, getting an error regarding "is a directory". I noticed if I leave off the trailing slash can get the command to work and adb will push the file, but even so it fails in the next step. I will keep reading to thread to see if anyone else had similar troubles.
Code:
C:\Users\David\Downloads\ADB-Tools>adb push flash_image /data/local/
failed to copy 'flash_image' to '/data/local/': Is a directory
C:\Users\David\Downloads\ADB-Tools>adb push flash_image /data/local
1105 KB/s (76044 bytes in 0.067s)
C:\Users\David\Downloads\ADB-Tools>adb push mtd0.img /sdcard/
1556 KB/s (655360 bytes in 0.411s)
C:\Users\David\Downloads\ADB-Tools>adb shell
~ # chmod 0755 /data/local/flash_image
chmod 0755 /data/local/flash_image
chmod: /data/local/flash_image: Not a directory
C:\Users\David\Downloads\ADB-Tools>adb shell
~ # cd /data/local
cd /data/local
/sbin/sh: cd: can't cd to /data/local
~ # cd /data
cd /data
/data # ls
ls
local
/data # cd local
cd local
/sbin/sh: cd: can't cd to local
/data # ls
ls
local
Any ideas on how to proceed?

Try adb shell mkdir /data/local though that folder should exist. If you do just adb shell do you get a # or $ prompt?
Sent from my Nexus 7 using Tapatalk 4

tiny4579 said:
Try adb shell mkdir /data/local though that folder should exist. If you do just adb shell do you get a # or $ prompt?
Sent from my Nexus 7 using Tapatalk 4
Click to expand...
Click to collapse
The mkdir command executed without any errors, and I do have a # sign...indicating phone is rooted and has su perms if I understand correctly?
Code:
C:\Users\David\Downloads\ADB-Tools>adb shell mkdir /data/local
C:\Users\David\Downloads\ADB-Tools>adb shell
~ #

After issueing that mkdir command like you suggested, I tried again where I left off in step 4, and was able to proceed with the rest of the instructions in step 4 and get Froyo loaded and running. Making good progress here, thanks Tiny!
The writing of the PB31IMG.zip file:
Code:
C:\Users\David\Downloads\ADB-Tools>fastboot flash zip PB31IMG.zip
sending 'zip' (176625 KB)...
OKAY [ 25.167s]
writing 'zip'...
(bootloader) adopting the signature contained in this image...
(bootloader) signature checking...
(bootloader) zip header checking...
(bootloader) zip info parsing...
(bootloader) checking model ID...
(bootloader) checking custom ID...
(bootloader) checking main version...
(bootloader) start image[hboot] unzipping for pre-update check...
(bootloader) start image[hboot] unzipping & flushing...
(bootloader) [RUU]UZ,hboot,0
(bootloader) [RUU]UZ,hboot,100
(bootloader) start image[radio] unzipping & flushing...
(bootloader) [RUU]UZ,radio,0
(bootloader) [RUU]UZ,radio,9
(bootloader) [RUU]UZ,radio,18
(bootloader) [RUU]UZ,radio,23
(bootloader) [RUU]UZ,radio,32
(bootloader) [RUU]UZ,radio,41
(bootloader) [RUU]UZ,radio,46
(bootloader) [RUU]UZ,radio,51
(bootloader) [RUU]UZ,radio,60
(bootloader) [RUU]UZ,radio,69
(bootloader) [RUU]UZ,radio,78
(bootloader) [RUU]UZ,radio,87
(bootloader) [RUU]UZ,radio,97
(bootloader) [RUU]UZ,radio,100
(bootloader) [RUU]WP,radio,0
(bootloader) [RUU]WP,radio,7
(bootloader) [RUU]WP,radio,16
(bootloader) [RUU]WP,radio,21
(bootloader) [RUU]WP,radio,26
(bootloader) [RUU]WP,radio,35
(bootloader) [RUU]WP,radio,40
(bootloader) [RUU]WP,radio,45
(bootloader) [RUU]WP,radio,50
(bootloader) [RUU]WP,radio,100
(bootloader) start image[boot] unzipping & flushing...
(bootloader) [RUU]UZ,boot,0
(bootloader) [RUU]UZ,boot,43
(bootloader) [RUU]UZ,boot,83
(bootloader) [RUU]UZ,boot,100
(bootloader) [RUU]WP,boot,0
(bootloader) [RUU]WP,boot,42
(bootloader) [RUU]WP,boot,85
(bootloader) [RUU]WP,boot,100
(bootloader) start image[recovery] unzipping & flushing...
(bootloader) [RUU]UZ,recovery,0
(bootloader) [RUU]UZ,recovery,20
(bootloader) [RUU]UZ,recovery,43
(bootloader) [RUU]UZ,recovery,73
(bootloader) [RUU]UZ,recovery,99
(bootloader) [RUU]UZ,recovery,100
(bootloader) [RUU]WP,recovery,0
(bootloader) [RUU]WP,recovery,20
(bootloader) [RUU]WP,recovery,40
(bootloader) [RUU]WP,recovery,60
(bootloader) [RUU]WP,recovery,80
(bootloader) [RUU]WP,recovery,100
(bootloader) start image[system] unzipping & flushing...
(bootloader) [RUU]UZ,system,0
(bootloader) [RUU]UZ,system,6
(bootloader) [RUU]UZ,system,12
(bootloader) [RUU]UZ,system,19
(bootloader) [RUU]UZ,system,25
(bootloader) [RUU]UZ,system,32
(bootloader) [RUU]UZ,system,39
(bootloader) [RUU]UZ,system,45
(bootloader) [RUU]UZ,system,51
(bootloader) [RUU]UZ,system,58
(bootloader) [RUU]UZ,system,64
(bootloader) [RUU]UZ,system,71
(bootloader) [RUU]UZ,system,78
(bootloader) [RUU]UZ,system,84
(bootloader) [RUU]UZ,system,89
(bootloader) [RUU]WP,system,0
(bootloader) [RUU]WP,system,89
(bootloader) [RUU]UZ,system,89
(bootloader) [RUU]UZ,system,89
(bootloader) [RUU]UZ,system,90
(bootloader) [RUU]UZ,system,91
(bootloader) [RUU]UZ,system,92
(bootloader) [RUU]UZ,system,93
(bootloader) [RUU]UZ,system,94
(bootloader) [RUU]UZ,system,94
(bootloader) [RUU]UZ,system,96
(bootloader) [RUU]UZ,system,96
(bootloader) [RUU]UZ,system,97
(bootloader) [RUU]UZ,system,98
(bootloader) [RUU]UZ,system,99
(bootloader) [RUU]UZ,system,100
(bootloader) [RUU]WP,system,89
(bootloader) [RUU]WP,system,89
(bootloader) [RUU]WP,system,90
(bootloader) [RUU]WP,system,91
(bootloader) [RUU]WP,system,92
(bootloader) [RUU]WP,system,93
(bootloader) [RUU]WP,system,94
(bootloader) [RUU]WP,system,94
(bootloader) [RUU]WP,system,95
(bootloader) [RUU]WP,system,96
(bootloader) [RUU]WP,system,97
(bootloader) [RUU]WP,system,98
(bootloader) [RUU]WP,system,99
(bootloader) [RUU]WP,system,100
(bootloader) start image[sp1] unzipping & flushing...
(bootloader) [RUU]UZ,sp1,0
(bootloader) [RUU]UZ,sp1,100
(bootloader) [RUU]WP,sp1,0
(bootloader) [RUU]WP,sp1,100
OKAY [153.388s]
finished. total time: 178.557s
C:\Users\David\Downloads\ADB-Tools>
C:\Users\David\Downloads\ADB-Tools>fastboot reboot
rebooting...
finished. total time: 0.097s
C:\Users\David\Downloads\ADB-Tools>

Made it through Steps 5 and 6 successfully, and on to Step 7...However, here we run into problems once again. I copied the Superuser and Unrevoked-Forever zip files to my sd card (which I know is good, because my laptop recognized it immediately and I can see all of the default folders the phone itself created), placed it in the phone, and booted to recovery.
CWM starts up, but launching it I am immediately greeted by the same set of errors as before:
E:Can't mount /cache/recovery/command
E:Can't mount /cache/recovery/log
E:Can't open /cache/recovery/log
E:Can't mount /cache/recovery/last_log
E:Can't open/cache/recovery/last_log
Choosing "install zip from sd card --> choose zip from sdcard" gives me an error that states: "E:Can't mount /sdcard/". "choose zip from internal sdcard" gives me an error that states "E:Can't mount /emmc/"
I still have adb access, so do you know if there is a way to install the Unrevoked Forever zip file through an adb command instead perhaps?

DavidPhx said:
Made it through Steps 5 and 6 successfully, and on to Step 7...However, here we run into problems once again. I copied the Superuser and Unrevoked-Forever zip files to my sd card (which I know is good, because my laptop recognized it immediately and I can see all of the default folders the phone itself created), placed it in the phone, and booted to recovery.
CWM starts up, but launching it I am immediately greeted by the same set of errors as before:
E:Can't mount /cache/recovery/command
E:Can't mount /cache/recovery/log
E:Can't open /cache/recovery/log
E:Can't mount /cache/recovery/last_log
E:Can't open/cache/recovery/last_log
Choosing "install zip from sd card --> choose zip from sdcard" gives me an error that states: "E:Can't mount /sdcard/". "choose zip from internal sdcard" gives me an error that states "E:Can't mount /emmc/"
I still have adb access, so do you know if there is a way to install the Unrevoked Forever zip file through an adb command instead perhaps?
Click to expand...
Click to collapse
There isn't a way to sideload AFAIK with the clockworkmod recovery version you have. Do you have a MicroSD card laying around? If you do you can push it to your device. That's how I'd recommend pushing it to your device. If you check around the dev forums there should be a clockworkmod 6 version that supports sideload though. The next step once S-OFFing will be to manually partition your system as in your first or second post I saw a 2GB single partition which isn't correct. Let me know when you're ready for that.

So this is what parted /dev/block/mmcblk0 (your main mmc partition with /cache /data and /emmc) should look like:
Code:
~ # 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 HYNIX (sd/mmc)
Disk /dev/block/mmcblk0: 8095MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 8192B 797MB 797MB primary ext3
2 797MB 1007MB 210MB primary ext3
3 1007MB 8095MB 7088MB primary fat32 lba
Also. error mounting /sd-ext is fine. You don't have an ext2 or ext3 sdcard partition. That is fine. Error mounting /sdcard is different.
I'd suggest reading up on parted. If I find a helpful thread on parted and Android I'll let you know but it just takes a bit of searching which it sounds like you're quite capable of doing already.

tiny4579 said:
There isn't a way to sideload AFAIK with the clockworkmod recovery version you have. Do you have a MicroSD card laying around? If you do you can push it to your device. That's how I'd recommend pushing it to your device. If you check around the dev forums there should be a clockworkmod 6 version that supports sideload though. The next step once S-OFFing will be to manually partition your system as in your first or second post I saw a 2GB single partition which isn't correct. Let me know when you're ready for that.
Click to expand...
Click to collapse
Alright, I found the CWM 6 build you were referring to in the Dev forum, flashed it, booted to recovery, and attempted a sideload of unrevoked-forever.zip. Unfortunately, it was a no go, and generated errors:
C:\Users\David\Downloads\adb1031>adb sideload unrevoked-forever.zip
adb server is out of date. killing...
* daemon started successfully *
sending: 'unrevoked-forever.zip' 100%
Code:
failed to open device control: No such file or directory
E:Can't mount /cache/recovery/last_install
E:failed to open last_install: No such file or directory
Finding update package...
Opening update package...
Installing update...
E:Error in /tmp/update.zip
(Status 0)
Installation aborted
I'll do my homework and research the errors.
Meanwhile, you asked if I have a microSD card around...I have one in the phone, but Recovery won't mount it or read it. Interestingly, the phone will mount and read it when in Froyo.

Hey, go to the HBOOT menu and check if it has S-OFF. It might have it already. To get there hold volume down while turning on the phone. It will say S-OFF if it's S-OFF in the upper left of the screen.
That status 0 error is likely related to the update-binary in the zip. You're actually going to be best flashing that with the former recovery. After checking if you have S-OFF, we should try to fix the partitions next.
You never did mention the symptoms of your partition issues. If you can boot into a ROM, let me know the output of the mount command from a terminal emulator or mount from an adb shell.

tiny4579 said:
Hey, go to the HBOOT menu and check if it has S-OFF. It might have it already. To get there hold volume down while turning on the phone. It will say S-OFF if it's S-OFF in the upper left of the screen.
That status 0 error is likely related to the update-binary in the zip. You're actually going to be best flashing that with the former recovery. After checking if you have S-OFF, we should try to fix the partitions next.
You never did mention the symptoms of your partition issues. If you can boot into a ROM, let me know the output of the mount command from a terminal emulator or mount from an adb shell.
Click to expand...
Click to collapse
Tiny, I apologize if I missed some information along the way that was important. I thought I was including all pertinent info, but without a firm grasp on the problem I may have missed some.
In HBOOT, the phone still shows S-ON. I can go back down to CWM 5.0.2.0, but that version does not have Sideload capability. Since I can't get the phone to read from the internal memory or external micro sd card while in Recovery, that was the reason for going up to CWM 6 and attempting to load unrevoked-forever.zip via Sideload.
When I get home, I will install Terminal Emulator, boot to Froyo, and let you know the results of the 'mount' command.
In the meantime, I will begin doing my research and learning about parted.

DavidPhx said:
Tiny, I apologize if I missed some information along the way that was important. I thought I was including all pertinent info, but without a firm grasp on the problem I may have missed some.
In HBOOT, the phone still shows S-ON. I can go back down to CWM 5.0.2.0, but that version does not have Sideload capability. Since I can't get the phone to read from the internal memory or external micro sd card while in Recovery, that was the reason for going up to CWM 6 and attempting to load unrevoked-forever.zip via Sideload.
When I get home, I will install Terminal Emulator, boot to Froyo, and let you know the results of the 'mount' command.
In the meantime, I will begin doing my research and learning about parted.
Click to expand...
Click to collapse
In Froyo, here is the output from a 'mount' command:
$ mount
mount
rootfs / rootfs ro,relatime 0 0
tmpfs /dev tmpfs rw,relatime,mode=755 0 0
devpts /dev/pts devpts rw,relatime,mode=600 0 0
proc /proc proc rw,relatime 0 0
sysfs /sys sysfs rw,relatime 0 0
none /acct cgroup rw,relatime,cpuacct 0 0
tmpfs /mnt/asec tmpfs rw,relatime,mode=755,gid=1000 0 0
none /dev/cpuctl cgroup rw,relatime,cpu 0 0
/dev/block/mtdblock3 /system yaffs2 ro,relatime 0 0
/dev/block/mtdblock6 /data yaffs2 rw,nosuid,noatime,nodiratime 0 0
/dev/block/mtdblock5 /cache yaffs2 rw,nosuid,nodev,noatime,nodiratime 0 0
tmpfs /app-cache tmpfs rw,relatime,size=8192k 0 0
/dev/block/vold/179:1 /mnt/sdcard vfat rw,dirsync,nosuid,nodev,noexec,relatime,u
id=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,iocharset
=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
/dev/block/vold/179:1 /mnt/secure/asec vfat rw,dirsync,nosuid,nodev,noexec,relat
ime,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,ioch
arset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
tmpfs /mnt/sdcard/.android_secure tmpfs ro,relatime,size=0k,mode=000 0 0
This varies significantly from the 'mount' command run from Recovery:
~ # mount
mount
rootfs on / type rootfs (rw)
tmpfs on /dev type tmpfs (rw,relatime,mode=755)
devpts on /dev/pts type devpts (rw,relatime,mode=600)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)

Ok, comparing the two, and some research on the 'mount' command led to me to the following:
Code:
~ # mount /dev/block/mtdblock5 /cache
mount /dev/block/mtdblock5 /cache
~ # cd dev/block
cd dev/block
/dev/block # ls
ls
loop0 loop3 loop6 mmcblk0p1 mtdblock2 mtdblock5
loop1 loop4 loop7 mtdblock0 mtdblock3 mtdblock6
loop2 loop5 mmcblk0 mtdblock1 mtdblock4 platform
/dev/block # mount /dev/block/mmcblk0p1 /sdcard
mount /dev/block/mmcblk0p1 /sdcard
/dev/block #
I was able to successfully mount the cache and sdcard partitions! This cleared up the CWM errors, and I was able to use the "Install zip from sdcard" option in CWM to finally load the superuser.zip and unrevoked-forever.zip files. Rebooted to hboot, and I am now S-OFF!

DavidPhx said:
Ok, comparing the two, and some research on the 'mount' command led to me to the following:
Code:
~ # mount /dev/block/mtdblock5 /cache
mount /dev/block/mtdblock5 /cache
~ # cd dev/block
cd dev/block
/dev/block # ls
ls
loop0 loop3 loop6 mmcblk0p1 mtdblock2 mtdblock5
loop1 loop4 loop7 mtdblock0 mtdblock3 mtdblock6
loop2 loop5 mmcblk0 mtdblock1 mtdblock4 platform
/dev/block # mount /dev/block/mmcblk0p1 /sdcard
mount /dev/block/mmcblk0p1 /sdcard
/dev/block #
I was able to successfully mount the cache and sdcard partitions! This cleared up the CWM errors, and I was able to use the "Install zip from sdcard" option in CWM to finally load the superuser.zip and unrevoked-forever.zip files. Rebooted to hboot, and I am now S-OFF!
Click to expand...
Click to collapse
Awesome, time to parted. Clearly from your information above I can tell a few things. 1. You have only one partition in mmcblk0. You should have 3. One for /data, one for /cache and one for /emmc. That will need to be fixed with parted. Secondly, the system seems to be falling back to the mtdblock partitions for /data and /cache. mtd should be /data/data and /system with /cache on mmcblk. Also, it doesn't seem to be recognizing your sdcard at all as that shows up as mmcblk1p1. Your sdcard is formatted as FAT or FAT32 correct?
Anyway, in recovery do the following
Code:
#parted /dev/block/mmcblk0
(parted) print
That should show you what partitions you have. Take note of the value for end for the last listed partition (you will only have one) What you'll want to do now is delete it.
Code:
(parted) rm 1
If prompted type i for ignore.
Now time to re-create them
Code:
(parted) mkpartfs primary ext3 8192B 797MB
(parted) mkpartfs primary ext3 797MB 1007MB
(parted) mkpartfs primary fat32 1007MB "end-size from the print step" - without the quotes
If you're unsure or confused, hold off on the rm and mkpartfs steps or do them one at a time with a print in between to list the current setup.

Related

[Q] [data2sd] invalid filesystem superblock

Moin,
after no special action on sunday I got a boot loop. It should be cause by the following error:
Code:
I//system/xbin/busybox(): /system/bin/tune2fs: No such file or directory while trying to open /dev/block/mmcblk0p2
I//system/xbin/busybox(): Couldn't find valid filesystem superblock.
I//system/xbin/busybox(): mount: mounting /dev/block/mmcblk0p2 on /data failed: No such file or directory
The output of
Code:
/system/bin/tune2fs -l /dev/block/mmcblk0p2
is:
Filesystem state: not clean with errors
I have tried to install Data2SDReInstallerX1.zip - but it doesn't work.
And I cant find fsck to repair the partition.
filesystem cleaned in recovery with:
Code:
umount /dev/block/mmcblk0p2
e2fsck -ycv /dev/block/mmcblk0p2
tune2fs -l /dev/block/mmcblk0p2
What can I else do?
Model: Bravo HTC Desire PVT1 SHIP Aktivmatrix-OLED MICROP-031d
Baseband/Radio: 32.56.00.32U_5.17.05.23
Software/ROM: GingerBurst_1.0.0.3.zip
Boatloader/H-BOOT: 6.93.1002
Recovery: Revolutionary ClockworkMod Recovery v4.0.1.4
ROOTED: Revolutionary v4.0.1.4 S-OFF
Provider: O2 Germany
Android: 2.3.3
HTC Sense: 2.1
filesystem cleaned in recovery with:
Code:
umount /dev/block/mmcblk0p2
e2fsck -ycv /dev/block/mmcblk0p2
tune2fs -l /dev/block/mmcblk0p2
Better redo it in a card reader and linux. Recovery fsck has limitations.

[Q] partition-layout: None (damaged partition)

Hi, similar to couple of threads, but - I believe - specific enough to start a new dedicated one. I have endeavoru HOX, cid HTC__032. Some time ago I damaged partition layout. It was complete ignorant era - I was doing things I should have read about before I bought used HOX with stock 3.14.401.31 (OTA update applied in the meantime as far as I rmember), I was experiencing some problems with it so unlocked, pushed CWM recovery and installed CM 10.1.3. Unfortunately, gapps kept crashing so I decided to do some cleaning and apparently did the factory reset in custom recovery. I guess this brought me to the state my HOX is in now.
So, how the things look like:
1. This is my current HOX info:
Code:
(bootloader) version: 0.5a
(bootloader) version-bootloader: 1.39.0000
(bootloader) version-baseband: 5.1204.162.29
(bootloader) version-cpld: None
(bootloader) version-microp: None
(bootloader) version-main: 3.14.401.31
(bootloader) serialno: *****
(bootloader) imei: *****
(bootloader) product: endeavoru
(bootloader) platform: HBOOT-T30S
(bootloader) modelid: PJ4610000
(bootloader) cidnum: HTC__032
(bootloader) battery-status: good
(bootloader) battery-voltage: 3816mV
(bootloader) devpower: 54
[B](bootloader) partition-layout: None[/B]
(bootloader) security: on
(bootloader) build-mode: SHIP
(bootloader) boot-mode: FASTBOOT
(bootloader) commitno-bootloader: None
(bootloader) hbootpreupdate: 2
(bootloader) gencheckpt: 0
2. I can connect via fastboot/adb - flash, use adb shell, etc. I can also push files, create and write files in adb shell, so it looks like the card is not entirely dead
3. I can flash recovery (tried TWRP and CWM) - so no problem with charging anymore
4. No partition layout and I can’t mount storage:
Code:
~ # fdisk -l /dev/block/mmcblk0
Disk /dev/block/mmcblk0: 31.2 GB, 31268536320 bytes
4 heads, 16 sectors/track, 954240 cylinders
Units = cylinders of 64 * 512 = 32768 bytes
Disk /dev/block/mmcblk0 doesn't contain a valid partition table
Code:
~ # parted /dev/block/mmcblk0
GNU Parted 1.8.8.1.179-aef3
Using /dev/block/mmcblk0
(parted) print
print
Error: /dev/block/mmcblk0: unrecognised disk label
(parted) mklabel msdos
mklabel msdos
(parted) print
print
Error: /dev/block/mmcblk0: unrecognised disk label
Code:
~ # ls -la /dev/block/
drwxr-xr-x 3 root root 300 Nov 4 21:11 .
drwxr-xr-x 9 root root 2320 Nov 4 21:07 ..
brw------- 1 root root 7, 0 Nov 4 21:07 loop0
brw------- 1 root root 7, 1 Nov 4 21:07 loop1
brw------- 1 root root 7, 2 Nov 4 21:07 loop2
brw------- 1 root root 7, 3 Nov 4 21:07 loop3
brw------- 1 root root 7, 4 Nov 4 21:07 loop4
brw------- 1 root root 7, 5 Nov 4 21:07 loop5
brw------- 1 root root 7, 6 Nov 4 21:07 loop6
brw------- 1 root root 7, 7 Nov 4 21:07 loop7
brw------- 1 root root 179, 0 Nov 4 21:07 mmcblk0
-rw-r--r-- 1 root root 0 Nov 4 21:12 mmcblk0p13
-rw-r--r-- 1 root root 0 Nov 4 21:12 mmcblk0p15
-rw-rw-rw- 1 root root 1088 Nov 4 21:12 mmcblk0p17
drwxr-xr-x 3 root root 60 Nov 4 21:07 platform
[I]-- (but this mmcblk0pxx are there only because I tried to format - unsuccessfully - related partitions through recovery) --[/I]
~ # cat /proc/partitions
major minor #blocks name
179 0 30535680 mmcblk0
~ # cat /etc/fstab
/dev/block/mmcblk0p13 /cache ext4 rw
/dev/block/mmcblk0p15 /data ext4 rw
/dev/block/mmcblk0p12 /system ext4 rw
/dev/block/mmcblk0p14 /sdcard auto rw
~ # cat /etc/recovery.fstab
# mount point fstype device [device2]
/recovery emmc /dev/block/mmcblk0p5
/boot emmc /dev/block/mmcblk0p4
/cache ext4 /dev/block/mmcblk0p13
/data ext4 /dev/block/mmcblk0p15
/sdcard auto /dev/block/mmcblk0p14
/system ext4 /dev/block/mmcblk0p12
/misc emmc /dev/block/mmcblk0p17
~ # cat /proc/emmc
dev: size erasesize name
mmcblk0p5: 00800000 00001000 "recovery"
mmcblk0p4: 00800000 00001000 "boot"
mmcblk0p12: 50000000 00001000 "system"
mmcblk0p13: 14000000 00001000 "cache"
mmcblk0p17: 00200000 00001000 "misc"
mmcblk0p1: 00600000 00001000 "wlan"
mmcblk0p2: 00200000 00001000 "WDM"
mmcblk0p20: 00200000 00001000 "pdata"
mmcblk0p3: 00600000 00001000 "radiocab"
mmcblk0p14: 650000000 00001000 "internalsd"
mmcblk0p15: 89400000 00001000 "userdata"
mmcblk0p19: 01600000 00001000 "devlog"
mmcblk0p16: 00200000 00001000 "extra"
On TRWP/CWM/Philz I get (more or less the same) logs/messages:
Code:
E:Can’t open /dev/block/mmcblk0p17
(No such file or directory)
E: Can’t mount /cache/recovery/command
E: Can’t mount /cache/recovery/log
E: Can’t open /cache/recovery/log
[I](...) eg. Wipe Data/Factory Reset:[/I]
-- Wiping data…
Formating /data
E: format_volume: make_extf4fs failed on /dev/block/mmcblk0p15
Formating /cache
E: format_volume: make_extf4fs failed on /dev/block/mmcblk0p13
Formating /sd-ext
Formating /sdcard/.android_secure…
Error mounting /sdcard/.android_secure!
Skipping format...
Data wipe complete.
5. Tried RUU that ought to be correct for my HOX & hboot version: (RUU_ENDEAVOR_U_JB_45_S_HTC_Europe_3.14.401.31_R_Radio_5.1204.162.29_release_302015_signed.exe) RUU software says it was flashed successfully, but when I restart the HOX it gets stucked on “HTC quitely brilliant” logo. Also, if I try to flash boot and system images manually (extracted from the ROM.zip from this RUU) the latter fails with “heap not enough” error (tried flashing on 32-bit Windows 7 and 64-bit OS X). This way or another, I don’t expect it to work, as there’s a problem with partition.
6. In the recovery I can’t wipe/erase a single thing (as in the example above)
7. As a result, no way to install a zip from recovery (due to missing partition layout) and no way to restore from backup (as it requires to mount /sdcard and it can't)...
8. ADB sideload doesn’t work (on TWRP: big red FAIL).
9. Some interesting lines from recovery.log:
Code:
recovery filesystem table
=========================
0 /tmp ramdisk (null) (null) 0
1 /recovery emmc /dev/block/mmcblk0p5 (null) 0
2 /boot emmc /dev/block/mmcblk0p4 (null) 0
3 /cache ext4 /dev/block/mmcblk0p13 (null) 0
4 /data ext4 /dev/block/mmcblk0p15 (null) 0
5 /sdcard auto /dev/block/mmcblk0p14 (null) 0
6 /system ext4 /dev/block/mmcblk0p12 (null) 0
7 /misc emmc /dev/block/mmcblk0p17 (null) 0
W:Unable to get recovery.fstab info for /datadata during fstab generation!
W:Unable to get recovery.fstab info for /emmc during fstab generation!
W:Unable to get recovery.fstab info for /preload during fstab generation!
W:Unable to get recovery.fstab info for /sd-ext during fstab generation!
W:Unable to get recovery.fstab info for /external_sd during fstab generation!
(...)
W:failed to mount /dev/block/mmcblk0p13 /cache ext4 (No such file or directory)
stat /dev/block/mmcblk0p17 try 1: No such file or directory
(...)
failed to stat /dev/block/mmcblk0p17
E:Can't open /dev/block/mmcblk0p17
(...)
ro.build.display.id=cm_endeavoru-userdebug 4.2.2 JDQ39E eng.root.20130419.224121 test-keys
[I](...) - leftovers from cyanogenmod?[/I]
ro.build.description=4.18.401.2 CL231174 release-keys
[I](...) - is it the reason? Are these problems because I’m actually downgrading?[/I]
ro.aa.customizationid=559204
ro.aa.romver=4.18.401.2
ro.prot=true
ro.aa.maincid=HTC__001
ro.aa.rid=302
ro.aa.modelid=PJ4610000
ro.aa.report=com
ro.aa.project=ENDEAVOR_U_JB_50_S
ro.aa.skulist=401
ro.aa.taskid=330269
ro.aa.mainsku=401
So the most interesting part is the partition-layout: None is found with fastboot getvar all. I noticed that in almost all (all?) threads where people have problems with unsuccessful stock restore (RUU) or other "stuck on logo" and share their info from getvar there's a one common issue: partition-layout: None. Does anyone have idea what's the reason and how to get it back to partition-layout: Generic (this is the correct one as I assume looking at other threads)? I believe founding a fix for this one general problem would solve all of the mentioned not-booting/stuck-on-logo/soft-bricked issues.
I have no more ideas as I browsed through tons of posts and tried a lot of possible solutions with no effect. I believe there's a need to apply some low-level system "magic" I don't feel like being able to figure out myself. If you have any idea on how to proceed I’d be more than happy to try it out. My last try would be to flash a rom with more up-to-date android, but I'm afraid it would involve updating hboot and no chance to use RUU anymore.
Also, if you think it’s all useless given the state the HOX is in, please share, so I stop to waste my (and your) time - I already spent 2 weeks on it, learned a lot, read hundreds of threads on XDA - If I’d only knew that much before
On the other hand, if any member with magic skills would like to use my HOX to perform remote surgery to try to find a general solution for that problem, I'd be more than happy (well, just happy, I would be more if I could fix it ) to sacrifice my HOX even if there's a chance to kill it definitely.
Any clues guys? Maybe I should ask different question: do you know a method to check if the internal storage is faulty (chkdsk kind of thing)? Maybe my case is helpless (why I can read/write it from recovery, though).
Also, I was thinking about booting recovery (fastboot boot recovery - NOT fastboot flash recovery), hoping it won't read from storage but from memory, thus allowing me to unmount the storage and format (am I correct here? would it help anyway?). The thing is fastboot boot recovery won't work on HOX, but maybe there's a specific way that overrides kernel commandline (fastboot -c ... ) known already.
My HOX is stock, locked and working perfectly, and when I do a fastboot getvar all I also see partition-layout: none, so that cannot be the problem.
webpatrick said:
My HOX is stock, locked and working perfectly, and when I do a fastboot getvar all I also see partition-layout: none, so that cannot be the problem.
Click to expand...
Click to collapse
Thank you webpatrick, good to know that. So this one is not a problem.
I suspect bad sectors then (I wonder if that could be a reason for my HOX to restart on stock and gapps keep crashing on CWM back in the days it was alive). Any idea how to verify that and maybe fix?
Ok, so browsing (way) outside One X forum, I found GPT fdisk compiled for android. It is available in this thread: http://forum.xda-developers.com/showpost.php?p=24805392&postcount=74 or directly http://dl.dropbox.com/u/64885133/gptfdisk.zip. I could use it to load partition data from a backup file, but - obviously - I don't have one.
Could any of you guys run gdisk from the zip, back up GPT data to a file and post it?
Code:
./adb push gdisk /sbin
./adb shell
~ # gdisk /dev/block/mmcblk0
GPT fdisk (gdisk) version 0.8.4
Command (? for help): b
Enter backup filename to save: backup.gpt
The operation has completed successfully.
Command (? for help): q
Thanks in advance!
Couple points more:
1) To clarify, as I believe it matters, I have 32GB version, so I'd enjoy GPT back up for this one. Anyone, pleeeeease?
2) Also, one more question. Correct me if I'm wrong, but I believe that:
a) If I flash firmware manually, I don't have to change the name of the zip file
b) If I "flash" automatically, I need to change the name of the firmware zip to the specific one, PJ46IMG.zip in my case, before I put it on the sd card
Not that I could try b), but just wondering if I've been trying a) in the correct way

nexus with broken file system, cannot wipe

Hi everybody,
I'm in deep troubles with my nexus (maguro).
Yesterday, it started to reboot after showing for about 5-10 seconds the lock screen.
the phone is rooted, Iand the last rom (cyanogenmod) was running stable in the last 6 months.
twrp 2.8.0.1 was installed, so I Rebooted to fastboot to flash the 2.8.6.0.
And then the weird part begins:
it's like every partition is read only, but from the mount command it doesn't look like it.
flashing the new recovery is a success, but after reboot the 2.8.0.1 is still there.
factory reset successful, and everything is like before.
wiping sdcard, nothing happens.
if I try to create a backup in twrp, it fails after 20 seconds or so. (I've copied everything to the pc using the pull command in adb).
Try to fix or to change the partitions filesystem in twrp doesn't change anything.
I tried also to change the file system in parted, through the adb shell,this happens:
Code:
~ # ←[6nparted /dev/block/mmcblk0p12 mkfs ext2
parted /dev/block/mmcblk0p12 mkfs ext2
Warning: The existing file system will be destroyed and all data on the
partition will be lost. Do you want to continue?
parted: invalid token: ext2
Yes/No? yes
yes
yes
Partition number? 1
1
1
File system type? [ext2]?
Error: File system was not cleanly unmounted! You should run e2fsck. Modifying
an unclean file system could cause severe corruption.
Ignore/Cancel? i
i
i
Error: File system has an incompatible feature enabled. Compatible features are
has_journal, dir_index, filetype, sparse_super and large_file. Use tune2fs or
debugfs to remove features.
You found a bug in GNU Parted! Here's what you have to do:
Don't panic! The bug has most likely not affected any of your data.
Help us to fix this bug by doing the following:
Check whether the bug has already been fixed by checking
the last version of GNU Parted that you can find at:
...
Please check this version prior to bug reporting.
If this has not been fixed yet or if you don't know how to check,
please visit the GNU Parted website:
...
for further information.
Your report should contain the version of this release (1.8.8.1.179-aef3)
along with the error message below, the output of
parted DEVICE unit co print unit s print
and the following history of commands you entered.
Also include any additional information about your setup you
consider important.
Error: SEGV_MAPERR (Address not mapped to object)
Aborted
and of course nothing changes.
so, I have access to adb in recovery and to fastboot, there is a way to wipe completely the filesystem and start from scratch, or load a different kernel, that would help?
If I send with adb push a new rom to the sdcard, twrp fails and at the next reboot the files disappear.
this is my mount result:
Code:
~ # ←[6nmount
mount
rootfs on / type rootfs (rw)
tmpfs on /dev type tmpfs (rw,seclabel,nosuid,relatime,mode=755)
devpts on /dev/pts type devpts (rw,seclabel,relatime,mode=600)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,seclabel,relatime)
selinuxfs on /sys/fs/selinux type selinuxfs (rw,relatime)
tmpfs on /tmp type tmpfs (rw,seclabel,relatime)
/dev/block/mmcblk0p11 on /cache type ext4 (rw,seclabel,relatime,user_xattr,barri
er=1,data=ordered)
/dev/block/mmcblk0p12 on /data type ext4 (rw,seclabel,relatime,user_xattr,barrie
r=1,data=writeback)
/dev/block/mmcblk0p12 on /sdcard type ext4 (rw,seclabel,relatime,user_xattr,barr
ier=1,data=writeback)
/dev/block/mmcblk0p10 on /system type ext4 (rw,seclabel,relatime,user_xattr,barr
ier=1,data=ordered)
and remounting in rw the partitions has no effect.
Even the parted, e2fsck, etc files disappear from /sbin after each reboot.
thank you
edit:
Having a second nexus, I could take a look at the partitions, and the difference seems to be the data=writeback options.
I'm looking for a procedure to make them "ordered" as the other phone.
edit2:
Code:
/tmp # ←[6ntune2fs -l /dev/block/mmcblk0p12 | grep features
tune2fs -l /dev/block/mmcblk0p12 | grep features
__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!
Filesystem features: has_journal ext_attr resize_inode filetype needs_recov
ery extent sparse_super large_file
/tmp # ←[6ne2fsck -f /dev/block/mmcblk0p12
e2fsck -f /dev/block/mmcblk0p12
e2fsck 1.42.9 (28-Dec-2013)
/dev/block/mmcblk0p12: recovering journal
Superblock needs_recovery flag is clear, but journal has data.
Run journal anyway<y>? y
y
yes
e2fsck: unable to set superblock flags on /dev/block/mmcblk0p12
/dev/block/mmcblk0p12: ********** WARNING: Filesystem still has errors *********
*
/tmp #
/tmp # ←[6ntune2fs -O ^has_journal /dev/block/mmcblk0p12
tune2fs -O ^has_journal /dev/block/mmcblk0p12
tune2fs 1.42.9 (28-Dec-2013)
The needs_recovery flag is set. Please run e2fsck before clearing
the has_journal flag.
Stuck here at the moment, cannot set superblock flags..
edit3:
Tested every possible superblock position, no luck.
I'm starting to think that the internal memory could be dead, but the phone in fastboot and recovery mode works fine.
I forgot to say that I've tried also the fastboot -w command, it works a lot (about 270 seconds) but no effect.

Asus ZenFone2 UL-Z00T-CN

Hi everyone!
I've got this phone Asus ZenFone2 UL-Z00T-CN and i whant to make it WW
Making it WW grants me the posibility to use every custom ROM
I think I've read on every article about it and I came to the conclusion I cant change it
I think the problem with this CN phone seems to be the system partition wich is partitioned a little smaller than the WW version
C:\Users\Andrew>fastboot flash system D:\WW\system.img
target reported max download size of 268435456 bytes
erasing 'system'...
OKAY [ 0.431s]
sending sparse 'system' 1/12 (259338 KB)...
OKAY [ 12.131s]
writing 'system' 1/12...
FAILED (remote: size too large)
finished. total time: 12.570s
Can you tell me how are your partitions fitted inside your phones to get some ideas about them?
I dont know how to use those commands in this busybox of mine but i tried after some research and a little study and i came to some results and i hope are a little useful for me and for you too.
Here are some things i discovered....
~ # df -a -h (all partitions listed human)
Filesystem Size Used Available Use% Mounted on
tmpfs 1.3G 16.0K 1.3G 0% /dev
devpts 0 0 0 0% /dev/pts
proc 0 0 0 0% /proc
sysfs 0 0 0 0% /sys
selinuxfs 0 0 0 0% /sys/fs/selinux
tmpfs 1.3G 20.0K 1.3G 0% /tmp
pstore 0 0 0 0% /sys/fs/pstore
adb 0 0 0 0% /dev/usb-ffs/adb
/dev/block/mmcblk0p46
25.7G 155.9M 25.5G 1% /data
/dev/block/mmcblk0p46
25.7G 155.9M 25.5G 1% /sdcard
/dev/block/mmcblk0p44
27.5M 180.0K 26.7M 1% /cache
/dev/block/mmcblk1p1 7.4G 3.1G 4.3G 42% /sdcard1 (this is my 8Gig SDcard)
-------------------------------------------------------------------------------------------------------
~ # df -h (all mounted partitions listed human)
Filesystem Size Used Available Use% Mounted on
tmpfs 1.3G 16.0K 1.3G 0% /dev
tmpfs 1.3G 20.0K 1.3G 0% /tmp
/dev/block/mmcblk0p46
25.7G 144.5M 25.5G 1% /data
/dev/block/mmcblk0p46
25.7G 144.5M 25.5G 1% /sdcard
/dev/block/mmcblk0p44
27.5M 468.0K 26.4M 2% /cache
-------------------------------------------------------------------------------------------------------
mount
rootfs on / type rootfs (rw,seclabel)
tmpfs on /dev type tmpfs (rw,seclabel,nosuid,relatime,size=1403968k,nr_inodes=350992,mode=755)
tmpfs on /tmp type tmpfs (rw,seclabel,relatime,size=1403968k,nr_inodes=350992)
devpts on /dev/pts type devpts (rw,seclabel,relatime,mode=600)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,seclabel,relatime)
selinuxfs on /sys/fs/selinux type selinuxfs (rw,relatime)
pstore on /sys/fs/pstore type pstore (rw,seclabel,relatime)
adb on /dev/usb-ffs/adb type functionfs (rw,relatime)
/dev/block/mmcblk0p46 on /data type ext4 (rw,seclabel,relatime,data=ordered)
/dev/block/mmcblk0p46 on /sdcard type ext4 (rw,seclabel,relatime,data=ordered)
/dev/block/mmcblk0p44 on /cache type ext4 (rw,seclabel,relatime,data=ordered)
-------------------------------------------------------------------------------------------------------
du -h (Display the total size of all the files in a given directory and its subdirectories)
/
./sdcard (internal storage partition showed on computer as a drive)
4.0K ./sdcard/ASUS/Calllog/Backup (4.0K Backup each empty directory)
8.0K ./sdcard/ASUS/Calllog (4.0K empty directory inside of the + 4.0K Calllog = 8.0K)
12.0K ./sdcard/ASUS (4.0K empty directory inside of the + 4.0K Calllog = 8.0K + 4.0K ASUS)
etc.
0 ./usb-otg (empty 0KB)
0 ./sdcard1 (MMC memory card partition showed on computer after restart as drive when flash is inserted)
0 ./persist
0 ./firmware
0 ./factory
4.0K ./asdf
0 ./sideload
4.0K ./cache
0 ./recovery
0 ./boot
48.0K ./vendor
1.4M ./twres
20.0K ./tmp
0 ./system
0 ./sys/fs/f2fs
0 ./sys/fs/ext4/features
0 ./sys/fs/ext4/mmcblk0p44
0 ./sys/fs/ext4/mmcblk0p46
0 ./sys/fs/ext4
0 ./sys/fs/fuse/connections
0 ./sys/fs/fuse
0 ./sys/fs/selinux/policy_capabilities
etc.
0 ./sys/fs/selinux
0 ./sys/fs/cgroup
0 ./sys/fs/pstore
0 ./sys/fs
etc.
0 ./sys/bus/cpu
0 ./sys/bus/cpu
etc.
0 ./sys/bus/iio/drivers
0 ./sys/bus/iio
0 ./sys/bus/mmc/devices
0 ./sys/bus/mmc/drivers/mmcblk
0 ./sys/bus/mmc/drivers
0 ./sys/bus/mmc
0 ./sys/bus/soc/devices
etc.
0 ./sys
460.0K ./supersu
11.5M ./sbin
0 ./res/images
4.0K ./res
0 ./proc/msm_otg
0 ./proc/uid_stat
etc.
0 ./proc
0 ./oem
4.0K ./license/openaes
4.0K ./license
12.0K ./etc
4.0K ./data/lost+found
etc.
54.6M ./data/data
4.0K ./data/dalvik-cache/profiles
33.0M ./data/dalvik-cache/arm
6.3M ./data/dalvik-cache/arm64
39.2M ./data/dalvik-cache
etc.
4.0K ./data/system/job
2.2M ./data/system
4.0K ./data/shared
4.0K ./data/fota
4.0K ./data/hostapd
44.0K ./data/time
4.0K ./data/audio
4.0K ./data/camera
4.0K ./data/nfc/param
8.0K ./data/nfc
4.0K ./data/tombstones/modem
etc.
100.3M ./data
0 ./root
16.0K ./dev
115.6M .
-------------------------------------------------------------------------------------------------------
i found a script about how to partitioning but is for other phone I think Samsung
#!/sbin/sh
OUTFD=$2
ui_print() {
echo -n -e "ui_print $1\n" > /proc/self/fd/$OUTFD
echo -n -e "ui_print\n" > /proc/self/fd/$OUTFD
}
ui_print ""
ui_print "###########################"
ui_print "# audahadi #"
ui_print "# modded from forumber2's #"
ui_print "# Repartition script #"
ui_print "# Mi 3W /system 1.2G #"
ui_print "# only! #"
ui_print "###########################"
ui_print ""
ui_print "Unmounting systems partiton..."
umount -l /system
umount -l /system1
umount -l /dev/block/mmcblk0p25
umount -l /dev/block/mmcblk0p26
ui_print ""
ui_print "WARNING! System is ready, repartitioning will start in 2 seconds"
sleep 2
ui_print ""
ui_print "Removing partitions..."
parted /dev/block/mmcblk0 rm 25
parted /dev/block/mmcblk0 rm 26
ui_print "Removing partitions...COMPLETED"
ui_print ""
ui_print "Creating new partitions..."
parted /dev/block/mmcblk0 mkpart primary 403MB 1074MB
parted /dev/block/mmcblk0 mkpart primary 1074MB 1745MB
parted /dev/block/mmcblk0 name 25 system
parted /dev/block/mmcblk0 name 26 system1
ui_print "Creating new partitions...COMPLETED"
ui_print ""
ui_print "Unmounting systems partitions again..."
umount -l /system
umount -l /system1
umount -l /dev/block/mmcblk0p25
umount -l /dev/block/mmcblk0p26
ui_print "Unmounting systems partitions again...COMPLETED"
ui_print ""
ui_print "Formatting new partitions..."
mke2fs -b 4096 -T ext4 /dev/block/mmcblk0p25
mke2fs -b 4096 -T ext4 /dev/block/mmcblk0p26
ui_print "Formatting new partitions...COMPLETED."
ui_print ""
ui_print "ALL DONE!..."
ui_print ""
ui_print "Rebooting to recovery in 5 seconds..."
ui_print "Thanks to forumber2 for his original GT-i9300 repartition script"
sleep 5
reboot recovery
SO in conclusion I want to redistribute partitions so i can install any ROM or WW IMG I want NOT the CN version. Is there a way to do that?
Can you help me?
If this chalanging problem is solved I would like to make it sticky if it's possible

Question I think I messed up my B Slot Partition(s)

I have a Poco F3 Global, and I currently am running TWRP 3.5.2_11-Nebrassy.
If I tap Reboot and it shows my Current Slot as A, then under Mount I see the following:
System, system_ext, Product, Vendor, ODM, Metadata, Data, Cust, and Firmware
And I can check each of them. I can also perform Wipe -> Format Data -> yes.
But if I boot into Slot B, and tap Mount it doesn't let me click the checkmarks for System, system_ext, Product, or Vendor.
And if I try to execute Wipe -> Format Data -> yes it shows "Failed to mount" in red for all of the following:
'/system_root', '/system_ext', '/product', '/vendor' (Invalid argument)
(Some of them are in there multiple times)
Running cat /etc/fstab in B outputs:
Code:
/dev/block/sda18 /metadata ext4 rw 0 0
/dev/block/sda35 /data f2fs rw 0 0
/dev/block/sda29 /cust ext4 rw 0 0
/dev/block/bootdevice/by-name/modem_b /firmware vfat rw 0 0
/dev/block/sda22 /persist ext4 rw 0 0
/usb_otg vfat rw 0 0
Running cat /etc/fstab in A outputs:
Code:
/dev/block/dm-2 /system_root ext4 ro 0 0
/dev/block/dm-3 /system_ext ext4 ro 0 0
/dev/block/dm-1 /product ext4 ro 0 0
/dev/block/dm-4 /vendor ext4 ro 0 0
/dev/block/dm-0 /odm ext4 ro 0 0
/dev/block/sda18 /metadata ext4 rw 0 0
/dev/block/sda35 /data f2fs rw 0 0
/dev/block/sda29 /cust ext4 rw 0 0
/firmware vfat rw 0 0
/dev/block/sda22 /persist ext4 rw 0 0
/usb_otg vfat rw 0 0
For both A and B going to Wipe -> Advanced Wipe it only shows Dalvik / ART Cache, Metadata, Data, Internal Storage, and USB-OTG
I can still install an OS, but that is finicky at times.
How can I fix my B Partition?
Solved it:
Download the MiFlash Tool, and the Fastboot version of the Stock ROM. Extract the contents of the zip (and within the zip the tar file) to a directory without spaces in it (I just extracted it directly to C: drive). Open MiFlash, click Select and choose the directory you just extracted. At the bottom of the MiFlash app select "Clean All", NOT "Clean all and Lock" (unless that's what you want). Click Refresh (if phone doesn't appear, make sure your phone is in fastboot mode and connected to PC). Then click Flash. Mine failed the first time with some error about "Antirollback check error". If you get this you have to manually edit the "flash_all.bat" file within the extracted directory and remove the lines that don't start with "fastboot", then save the bat file, and restart the flash. It took MiFlash 604 seconds to complete, and ended with a status of "error: Not catch checkpoint, ..., flash is not done" you can ignore that, or remove that checkpoint in the MiFlash configuration settings. My phone restarted and booted into the stock ROM.
following had the same errors when i mistakenly ignorantly wiped system etc while trying to flash a rom

Categories

Resources