[Q] Partition destroyed after power loss - HTC Sensation

Hi everyone,
today i tried to update my CM11 to the newest CM12 Version. I booted into TWRP recovery and made a full Wipe. While doing this, my device had something like power loss, so the wipe could not finish.
Now the device doesn't boot anyway, after Power on it's booting into fastboot mode. The recovery isn't able to start. It is possible to use ADB and Fastboot. Using "fastboot boot /....../recovery.img it is possible to boot an recovery. The TWRP Recovery displays:
E:Unable to find partition size for '/recovery'
E:Unable to find partition size for '/boot'
E:Unable to find partition size for '/misc'
E:Updating partition details
E:Unable to mount '/cache'
E:Unable to mount '/data'
E:Unable to mount '/sytem'
...done
E:Unable to mount storage
E:Unable to mount /sdcard during GUI startup
E:Unable to mount '/cache'
Full SELinux support is present
E:Unable to mount '/cache'
E:Unable to set emmc bootloader message.
E:Unable to mount /'cache'
E:Unable to mount /sdcard/TWRP/.twrps when trying to read settings file.
MTP Enabled​
The "repair file system" option in TRWP Recovery doesnt work.
After several hours reading threads about similar problems i don't know what to do.
How can i repair the file system tables to reinstall the CM12 or any other ROM?
Hopefully
DragonGuard

I think, i have an idea.
What about to rewrite the complete partitions on my Sensation using adb shell and then rewrite with the partitions? Could that work?
I read an article with an similar problem here: cyanogenmod.org
The problem was that I managed to screw up the partitions on my internal storage card, so basically nothing would work properly. I could still get into recovery, though. That's key.
Here's what you'll need:
Working recovery, basic knowledge of adb & the shell
Parted (download here)
stock PB31IMG.zip
Note also that I had run unrevoked forever (so my phone was S-OFF) ... I'm not sure if that's required or not.
So, grab parted from the link above. Now you need to extract the individual binaries from the .zip (the 6 files in the sdparted folder within the zip), ideally to your android-sdk\tools directory. Now push all 6 files (adb push [file] /sbin/). Next, we need to make them useable, so go into the shell (adb shell). Change to your /sbin/ directory, and run: chmod 0755 <file> on each of the 6 files.
Now, we need to fix the partitions. This is assuming that the partitions are there, just the wrong format (which is what happened to me .. I accidentally made them FAT32 instead of ext). So, run the following: parted /dev/block/mmcblk0 mkfs ext2. It will ask if you want to continue, hit yes. When it asks for the partition number, enter 1. Next, when it asks for the format, enter ext2. Let it do its thing. Now, once it's done, run parted again. This time, enter partition 2 (everything else is the same).
Once all that's done, your recovery program should be able to mount both the /data and /cache partitions. If that's true, you're pretty much done! One thing I found was that I couldn't directly install a new OS (I tried both Cyanogen and Ultimate). In both cases, it would look for stuff in the davik-cache that it couldn't find, so something wasn't installing correctly I think. So, if that happens, flash back to the stock PB31IMG.zip (put it in the root of your /sdcard/ and let hboot install it), and then root your phone anew. That's what I ended up doing.
Again, huge credit for this goes to -Steveo- and ciwrl for helping me figure out which partitions were the right ones (and for supplying parted, which I hadn't been able to find anywhere). If something doesn't end up working, just drop me a pm and we'll see what we can do.
Click to expand...
Click to collapse
Today i would need parted for ext4 partitions and i need to know where on the internal storage i have to write which partition. Is this a possible way to repair the partitions?
Hopefully

Bump

I'm having the same problem, my recovery log shows exactly the same. Have you found a solution yet?

Hi,
i am sorry, but i haven't found any solution yet. I am looking for an HTC Sensation to pull the emmc Data system Files and rewrite it on my broken HTC Sensation. I need the /dev/block/mmcblk0 etc. files to try. In my /dev/block/ folder are only "loop" files located, i think they are part of my problem.
Greetz

Related

[Q] SD Card will not mount after ext4 part.

Attempting to partition sd card with ext4 -a process I completed multiple times successfully on a Nexus One, the process appeared to complete but now the phone will not mount the sd card. I've tried a wipe/reset, to no avail. I can still access and partition the sd card through adb, but the phone cannot mount it to format/partition, restore from recovery, partition sd-card from within ClockWork Recovery, nothing. I've re-partitioned the sd card through adb, which indicated a successful completion, but the phone still refuses to mount the sd card. If this weren't a Nexus S with it's cursed internal sd-card I would simply swap out the sd card with another or format it externally like all the google topics I pull up on the subject suggest.
Is this fixable or has the fused sd-card scenario become a liability?
Common Error messages:
Can't mount /sdcard
Can't mount /sdcard/.android_secure
Phone: Nexus S (US, T-Mobile, manufactured Dec. '10)
Recovery Img: ClockworkMod Recovery 3.0.2.4
Rom: CM 7.0.3 (now wiped, cannot put back on since sd card won't mount)
fstab:
/dev/block/mtdblock4 /cache yaffs2 rw
/dev/block/platform/s3c-sdhci.0/by-name/userdata /data ext4 rw
/dev/block/platform/s3c-sdhci.0/by-name/system /system ext4 rw
/dev/block/platform/s3c-sdhci.0/by-name/media /sdcard vfat rw
Can mount everything except the last one, /sdcard.
I've tried all the recommended procedures garnered from the first 10 or so pages in google, xda, cyanogem forum, etc:
Restore from nandroid: Not possible, can't mount the SD,
Wipe/Reset: can't wipe /media as sd card won't mount,
partition sd card from within Clockwork: indicates success but does nothing,
format from within clockwork: unable to mount,
repartition using adb: works, parted can see them, I can move files to from, but the phone will not mount,
clearing fstab: no effect,
Fastboot works, but I don't have the proper images. ADB works, as do the installed utilities. Have not tried ODIN as again, I don't have the proper images. Should I attempt to compile my own images from source?
Update: SOLVED, Microsoft Windows. To whom it may concern: I was able to mount the /dev/block/platform/s3c-sdhci.0/by-name/media from two different laptops running OSX and Fedora/Ubuntu then successfully been able to partition them with fat32 as the ClockworkMod (and maybe Cyanogen?) expect with 0 progress. Then I pulled out an old Windows machine, installed the JDK/ADK's +tools and performed the same procedure and that time it worked. I'm uncertain as to what particular quality a 'genuine' Windows formatting provides, but either this phone or the particular software combination I'm running require it. I was able to mount & re-partition the /sdcard in Clockwork, then manually remove rebuild them and upgrade to ext4 using tune2fs as usual. In the interim for work and such, I had to find a surrogate (for the SIM) and could only find and old k750i (which still had a full charge and worked flawlessly all day, btw). Wow phones used to be small.
I think I was missing something about the way ClockworkMod handles fstab, because everytime I would modify it specifically to the specs I passed to parted while creating the partitions with mkpartfs, it would either ignore or overwrite them. So be careful messing with the sd-card, the S's aren't like the One's in the sense that if you screw it (the sd-card) up or it goes bad you can't just take it out and format it in another machine/phone, you have to appeal to ClockworkMod. ODIN $ucks by the way, I found fastboot to be much more effective.
If you format the sd partition ext4, then you should change the fstab too.
from
Code:
/dev/block/platform/s3c-sdhci.0/by-name/media /sdcard vfat rw
to from
Code:
/dev/block/platform/s3c-sdhci.0/by-name/media /sdcard ext4 rw
or from
Code:
/dev/block/platform/s3c-sdhci.0/by-name/media /sdcard auto rw
The 2nd last entry there is the file system type.
Likely, this would have solved your problem.
Of course, I don't know, whether the recovery has the vfat type in fstab. You might have to change it there too. On my linux box auto works very well in fstab.
Of course, if you partition your sd partition ext4, you won't be able to use it as usb memory from windows. (At least I am pretty sure you can't, haven't tried)
Well of course I couldn't let it die, I went back and started tinkering again now that I have a way back. I can't change the fstab it seems, whatever I change it to gets over written everytime either Clockwork or the Rom starts. It's weird, I know I'm missing something and I don't know much about CWMod. (had Amon_Ra on the N1, which had the nifty fsupgrade script)
The 2nd last entry there is the file system type.
Likely, this would have solved your problem.
Click to expand...
Click to collapse
I'm quite familiar with unix style fs and fstab, it's the stubbornness I'm not used to. I'm also spoiled by vi and nano. CW has some nice scripts built in as well though.

[Q] fstab can't mount system, sdcard, or anything really.

So yeah, my phone was regular 2.3.4 and it wouldn't always reboot easily (took multiple tries). So I figured I'd install CyanogenMod 7 like all the cool kids. I'm a programmer, this should be easy, right? Wrong.
So after much trial and error fastboot decided to randomly find my phone and let me unlock it (long story...). I start playing around with adb and fastboot, having a good old time. I decide to do the ClockworkMod Recovery image and it works great. I try to do an "update from sdcard" with the latest CyanogenMod for Nexus S and it amazingly works!... Except that it still won't boot up. It sits on the Google loading screen--I suspect failing to mount anything.
I found out about this:
Code:
ClockworkMod Recovery v4.0.0.2
recovery filesystem table
=========================
0 /tmp ramdisk (null) (null)
1 /sdcard vfat /dev/block/platform/s3c-sdhci.0/by-name/media (null)
2 /system ext4 /dev/block/platform/s3c-sdhci.0/by-name/system (null)
3 /cache yaffs2 cache (null)
4 /data ext4 /dev/block/platform/s3c-sdhci.0/by-name/userdata (null)
5 /misc mtd misc (null)
6 /boot mtd boot (null)
7 /recovery mtd recovery (null)
8 /bootloader mtd bootloader (null)
9 /radio mtd radio (null)
W:Unable to get recovery.fstab info for /sd-ext during fstab generation!
Notice all of the (null)s....
Also this:
Code:
-- Install from sdcard...
Finding update package...
I:Update location: /sdcard/update.zip
W:failed to mount /dev/block/platform/s3c-sdhci.0/by-name/media (No such file or directory)
E:Can't mount /sdcard/update.zip
Installation aborted.
mtd: successfully wrote block at 0
I:Set boot command ""
E:Unable to write to ums lunfile (No such file or directory)
...and this, clearly from fstab:
Code:
/dev/block/platform/s5pc110-onenand # mount -a
mount -a
mount: mounting /dev/block/platform/s3c-sdhci.0/by-name/userdata on /data failed
: No such file or directory
mount: mounting /dev/block/platform/s3c-sdhci.0/by-name/system on /system failed
: No such file or directory
mount: mounting /dev/block/platform/s3c-sdhci.0/by-name/media on /sdcard failed:
No such file or directory
There's no s3c-sdhci.0 in /dev/block/platform.... only s5pc110-onenand (which happens to be the title of the processor and memory used in my phone).
So yeah, that's where my brain gives out.
I'd like to install CM7, or at the least get a working phone back somehow.
Oh yeah, I tried doing adb shell and a nandroid restore command w/ downloaded nandroid backup. No love. It told me "unknown volume for path [/sdcard] Can't mount /sdcard". No ****.
Ideas?
Thanks!
Small update:
about 1 out of 100 times, it'll allow me to mount the sdcard after some random fiddling. I have tried multiple recovery images, erasing partitions, flashing random things... nothing works!
The one or two times it mounted the sdcard, I was able to perform an "update from sdcard" but then it would just do what it has done for a long time--sit at the google loading screen for hours and never actually boot into the real OS.
Sigh. Hardware issue maybe?
Hi,
what's your phones status?
My Nexus seems at a similar state now I came across http://forum.xda-developers.com/showthread.php?t=991276 and had to try it (why not, I have nandroid backups, Titanium etc. ...) I applied a setting, rebooted and got stuck at the google logo. It would boot into recovery but there it has no access to sdcard, system, data (but cache is mounted). After lots of fiddling I got it to work once, whiped, flashed a rom and all looked good again. But now I did a reboot and the phone is stuck again and in recovery (CWM 3.something) I get no sdcard
What happened and how to fix it?
I managed to flash a stock system back on the phone and it still didn't work, so I called Samsung and they let me RMA the phone. I got it back three weeks later, in good shape. They had to replace the PBA, the mainboard, and they did it all for free. They even gave me a shipping label to use when I shipped it out. Nice.
At the least, I think it's necessary to flash a stock bootloader and lock the phone before calling them.
Good luck!
Good for you
I tried flashing a stock rom, both using fastboot and also using Odin, both methods fail or get stuck while flashing the system.img
Looks like I've screwed up
If I could at least once get to the data on sdcard ...
i think i found a workaround
i tried flashing the old clockworkmod (3.1.0.1) and the flashing the latestest one twice and then clockworkmod was able to mount the sdcard. huge relief. installed the rom and then rebooted and the system booted well.
also tried installing the clockwork manager app and flashing the latest recovery from the app and then rebooted into recovery. it was able to mount the sdcard now.
not sure if this random success or a fix. it worked.
Had the same exact issue. Sprint tech replaced the phone for me for $35 without insurance. But basically the internal memory would only mount once every 10-100 reboots.
Definitely a manufacturing issue.
obsanity said:
Had the same exact issue. Sprint tech replaced the phone for me for $35 without insurance. But basically the internal memory would only mount once every 10-100 reboots.
Definitely a manufacturing issue.
Click to expand...
Click to collapse
Have you tried reflashing the recovery twice?
Did the sprint tech provide the details on what exactly the issue was?
In my case, the phone is contract free and I have to approach samsung support if this issue occurs again.
Since the sdcard is some times mounting, i am hopeful that there should be a way out via sw.
gsrdemon said:
Have you tried reflashing the recovery twice?
Did the sprint tech provide the details on what exactly the issue was?
In my case, the phone is contract free and I have to approach samsung support if this issue occurs again.
Since the sdcard is some times mounting, i am hopeful that there should be a way out via sw.
Click to expand...
Click to collapse
Samsung service center repaired the device (mother board replaced); in warranty.
Sent from my Nexus S

[Q] /data partition unable to wipe

Hey guys,
I had previously encrypted my phone with the inbuilt android encryption, but it just didn't work (the PIN wasn't my password)
I tried to factory reset it but it didn't work either, from both fastboot or recovery.
So I reflashed my entire system from fastboot (which worked perfectly). Now I want to install the unofficial cm12 zip, but I can't erase userdata from my phone at all.. Either through fastboot or recovery, and I'm locked to the GPe image I am using currently.
The recovery error I get when trying to delete my data partition is:
Code:
-- Wiping data...
Formatting /data...
Error mounting /data!
Skipping format...
Formatting /cache...
Formatting /sd-ext...
E:unknown volume for path [/sd-ext]
Formatting /sdcard/.android_secure...
Error mounting /sdcard/.android_secure!
Skipping format...
Data wipe complete.
I have no idea what to do help please?
Possible solution
Okay, so the CWM recovery is beyond stupid and seems to want to verify that it can read a partition before it lets you format it. But you can't do this if you've encrypted it. So you have to reformat it yourself. But first, you have to figure out the device name of that partition.
After you've booted the phone into recovery, you'll need to send commands to the phone with adb.
Type this to receive an error revealing a device name:
Code:
adb shell mount /data
Then type the following using the /dev/ name given in the error from the first command. That device name might be unique to my phone. I'm not sure:
Code:
adb shell ls -l /dev/block/platform/msm_sdcc.1/by-name/
In any case, you want to find where userdata is pointing to. On mine, it is:
Code:
/dev/block/mmcblk0p36
Then to double check which type of filesystem is being used on that userdata partition:
Code:
adb shell cat /etc/fstab
Then to format it yourself (if f2fs is the filesystem) since CWM recovery won't bloody well do it and lets everyone think they've bricked their phone:
Code:
adb shell mkfs.f2fs /dev/block/mmcblk0p36
Disclaimer: this worked for me, but I can't make any guarantees. It got me past the error CWM was giving. After I formatted the partition on my own, CWM recovery was able to proceed as normal.
Worked for me atleast
1) You Need twrp recovery.
2)Select data partition.
3)Change file system to some other than f2fs.
4)Again change file system to f2fs (without rebooting recovery).
5)Repair Partition with twrp menu.
6)If Partition repair was successful then wipe the Partition.
7)? Good to go.
8)And yeah though it doesn't brick your phone if anything happens to your device then I am not responsible.
jlm0 said:
Okay, so the CWM recovery is beyond stupid and seems to want to verify that it can read a partition before it lets you format it. But you can't do this if you've encrypted it. So you have to reformat it yourself. But first, you have to figure out the device name of that partition.
After you've booted the phone into recovery, you'll need to send commands to the phone with adb.
Type this to receive an error revealing a device name:
Code:
adb shell mount /data
Then type the following using the /dev/ name given in the error from the first command. That device name might be unique to my phone. I'm not sure:
Code:
adb shell ls -l /dev/block/platform/msm_sdcc.1/by-name/
In any case, you want to find where userdata is pointing to. On mine, it is:
Code:
/dev/block/mmcblk0p36
Then to double check which type of filesystem is being used on that userdata partition:
Code:
adb shell cat /etc/fstab
Then to format it yourself (if f2fs is the filesystem) since CWM recovery won't bloody well do it and lets everyone think they've bricked their phone:
Code:
adb shell mkfs.f2fs /dev/block/mmcblk0p36
Disclaimer: this worked for me, but I can't make any guarantees. It got me past the error CWM was giving. After I formatted the partition on my own, CWM recovery was able to proceed as normal.
Click to expand...
Click to collapse
@jlm0 Hope your post will help me. I have terminal emulator, with this how do I run these commands, because I'm not able to change the recovery also.
Regards
Janardhan TS
sent from Mi

[Q] My Internal sdcard is corrupted! Please Help!

I Think my Internal sdcard is corrupted!
Please Help! Reflashing android won't work. I think the partition is corrupted!
Device: Google Nexus 5
Original OS: Android 5.1.0_r1 (LMY47D)
Recovery: TWRP 2.8.6.0
One day I turned my phone off, and later i decided to go into recovery. I believe I went inside Advanced Options and clicked "Fix Permissions." Then I proceeded to reboot. I was busy at the time, so when I remembered about my phone, I saw that it was still booting. It had been at least 30 minutes so I knew it was in a bootloop. I decided to go back into recovery and reflash the system.img onto it. No luck. I realized I had to try flashing the entire Nexus image (using the flash-all.bat). The phone would still not turn on. I tried flashing different versions of android, and here are my findings:
Android 5.1.0_r3, 5.1.0_r1, 5.0.1: all cause my phone to not be able to boot up (stuck on the 4 color flying animation)
Android 4.4.4, CyanogenMod (cm-11-20141008-SNAPSHOT-M11-hammerhead.zip): Allow my phone to boot up.
However, after I found that I could boot onto Android 4.4.4 and CyanogenMod, I realized that I could not get access to the sdcard!
Here are my findings:
When I go to the phone's root folder, I see a FILE called "sdcard"
When I go to \storage, I see a FILE called sdcard0
When I open camera, the app crashes (possibly because it stores pictures on the sdcard).
I tried to delete these files when I had root access with CyanogenMod but the file manager said "can't delete file." When I am in recovery mode (TWRP) however, I can see the sdcard folder and the contents. Just through every system boot, the sdcard is inaccessible.
After I realized that the problem wasn't due to the data on my phone (after flashing many system images), I realized my data partition might be corrupted. Then I went to this site and followed the directions: http://forum.xda-developers.com/goo...o-repairing-corrupted-data-partition-t2577447
The e2fsck command didn't do anything as cmd said "The superblock could not be read or does not describe a correct ext2 filesystem."
Afterwards, my friend told me to try mke2fs /dev/block/platform/msm_sdcc.1/by-name/userdata
I typed that in adb shell and something happened. I started processing blocks or something. Unfortunately now, I am unable to mount the data partition at all. I am also unable to flash the userdata.img onto my phone through fastboot.
UPDATE: When I open up twrp recovery and look in the log I see the following:
E: Could not mount /data and unable to find crypto footer.
E: Unable to mount '/data'
E: Unable to recreate /data/media folder.
Updating partition details...
E: Unable to mount '/data'
E: Unable to mount '/cache/
E: Unable to mount '/persist'
...done
E: Unalbe to mount storage.
E: Unable to mount /data/media during GUI Startup.
E: Unable to mount '/cache'
Full SELinux support is present.
E: Unable to mount '/cache'
E: Unable to Mount '/cache'
E: Unable to mount /data/media/TWRP .twrps when trying to read settings file.
E: Unable to mount '/data'
MTP Enabled
Anyone know how to fix this? Please help, I owe you so much if you can solve this! Reply to me if you're able to help, I'm also new to xda so I don't really know how messages work. Thanks!
Try taking it out and putting it back in. It happened to me too.
mygoldeneye said:
Try taking it out and putting it back in. It happened to me too.
Click to expand...
Click to collapse
By sdcard I mean the internal sdcard (/storage/emulated/0). Nexus 5 does not have an external sdcard slot anyways.
So you are saying you have no apps, no widgets, nothing... /storage/emulated/0 is your main storage which INCLUDES your system files (unless you have a phone or tablet that has a separate internal SD card - would be /storage/emulated/1 ... I am guessing)

Shield tablet bootloops after flashing Custom ROM

Shield tablet neverending loop
Hello guys,
Today I've tried flashing my Shield Tablet using Shield Custom ROM guide from by cots from gbatemp.net forums (can't post links).
Despite doing everything carefully, step by step, my Shield is now rebooting forever showing only one screen and rebooting again.
Unfortunately I can't post a picture, because forums rules don't allow me, so I wrote down the text from TWRP:
E:Could not mount /data and unable to find crypto footer.
E:Unable to mount '/data'.
E:Unable to recreate /data/media folder.
Updating partition details...
E:Unable to mount '/data'.
...done
E:Unable to mount storage.
E:Unable to mount /data/media during GUI startup.
Full SELinux support is present.
E:Unable to mount /data/media/TWRP/.twrps when trying to read settings file.
Processing AOSP recovery commands...
E:Unable to mount '/data'
--Wiping Data Partition...
Formatting Cache using make_ext4fs function.
E:Unable to mount '/data'
--Data Partition Wipe Complete!
Done processing script file
aaaaand it reboots.
Pressing "Home" and/or "Back" button at that TWRP screen does nothing, Shield is still rebooting to that screen over and over again.
Help would be greatly appreciated. Any ideas?
Best regards,
Łukasz
I had the same problem; the same thread that you referred to had a post yesterday on resolving this issue. This worked for me.
Re-do all the steps except that before doing the TWRP flash, do a fastboot -w.
Can you boot into twrp? The sequence is: Volume DOWN (keep pressed) + Power (click and release keeping VDOWN pressed)
This should give you access to bootloader mode, where you can eventually reboot into recovery or enable fastboot protocol. So if twrp works you should be able to use the "format" which will fix your corrupted filesystem. Once you've done that you can restore your official OTA, copy your custom rom files again somewhere inside the now-restored filesystem, go back into recovery and flash again (just wipe system, cache and dalvik, nothing else).
If you cannot access twrp, once in bootloader mode you can enable fastboot and flash twrp again via adb from your pc.
Just to clarify, once you're in the bootloader, fastboot is ALREADY enabled and you will need to use fastboot, NOT adb, to flash anything.

Categories

Resources