General Hard Brick Fixes? - General Questions and Answers

I have a Mi K20 and tried to find a solution to my issue on the device's sub forum. So far, I've only found a few people who are currently dealing with the same issue I'm facing. I think what caused this to happen was failing to disable verity and force encrypt before reboot after flashing a MIUI 11 ROM for our device. Right now, it takes over an hour to access TWRP, data is stubbornly encrypted so I can't format it with mkfs.ext4 or f2fs because it always hangs, formatting on TWRP doesn't do anything but make me wait 30+ minutes for failure, fastboot erase won't work because of the encryption, mkefs doesn't work, and my internal storage is gone. I've also tried a dd trick I picked up from Stack and it didn't do anything. Does anyone know of a way I can just nuke the data partition using some other commands?

Related

[Q] Emmc got write-protected or frozen

About a month ago my Xoom (MZ605, EOS 3.0) froze and I had to do a hard reset. After that the tablet became unusable due to the neverending stream of Closed Force dialogs. First I thought the fs and or partition table were buggered, but now I have discovered that whatever I do to the emmc, nothing changes at all: Fastboot flash, SBF flashing, fsck and gdisk in recovery (using adb shell). In all cases, the writing and flashing completes without any errors, but when checking for the results, nothing has changed at all.
Any idea on what might have caused this? Or even better: how to make to emmc writable again? If necessary I'm willing to open it up and mess with the hardware.
Thanks!
Have you tried locking and then re-unlocking the boot loader? Just a suggestion, not promising anything.
It will, normally, wipe your internal storage so make sure you backup any necessary data to a computer.
Sent from my SAMSUNG-SGH-I747 using xda premium
Hi d3athsd00r,
I tried that several times, but just be sure I tried it again. Unfortunately it didnt help Thanks for the suggestion anyway! If you or anyone else has any other ideas, please let me know. The personal data on the tablet isn't important btw (just music), so there's no problem if everything is lost.
Have you tried to format everything in cwm under the mounts menu? (Remove sdcard before doing so)
Sent by Samsung Galaxy Nexus (SCH-I515 Verizon LTE) using Tapa2
I use TWRP, but that one seems to do an rm -rf instead of a real format. Either way it has no effect: even after wiping everything several times, nothing changes: all files are still there. The same goes for using an adb shell in recovery and manually doing an ext4 format. No matter what I do, the data on the internal storage seems frozen or write protected.
ioish said:
I use TWRP, but that one seems to do an rm -rf instead of a real format. Either way it has no effect: even after wiping everything several times, nothing changes: all files are still there. The same goes for using an adb shell in recovery and manually doing an ext4 format. No matter what I do, the data on the internal storage seems frozen or write protected.
Click to expand...
Click to collapse
I would say your recovery is faulty. Try an earlier version or a different kind
Sent from my Xoom
Hi cdexsw
The problem is that flashing has no effect: when I do a fastboot flash or even RSD Lite, the commands complete without error. However after that nothing seems to have changed: the recovery stays the same, the rom (EOS 3 at the moment) stays the same and all my personal data is still there even although I did an oem lock and then oem unlock several times. It seems that whatever I do, the internal storage doesn't change a single byte. I even used dd if=/dev/zero =/dev/block/mmcblk0p10 (and also on the system and cache partitions) in an adb shell to wipe the userdata completely, but it doesn't do anything at all. So I simply can't seem to replace the recovery since not even flashing has any effect.
ioish said:
Hi cdexsw
The problem is that flashing has no effect: when I do a fastboot flash or even RSD Lite, the commands complete without error. However after that nothing seems to have changed: the recovery stays the same, the rom (EOS 3 at the moment) stays the same and all my personal data is still there even although I did an oem lock and then oem unlock several times. It seems that whatever I do, the internal storage doesn't change a single byte. I even used dd if=/dev/zero =/dev/block/mmcblk0p10 (and also on the system and cache partitions) in an adb shell to wipe the userdata completely, but it doesn't do anything at all. So I simply can't seem to replace the recovery since not even flashing has any effect.
Click to expand...
Click to collapse
odd indeed....have u looked to see if any other devices from other makes have had a similar issue?
Sent by Samsung Galaxy Nexus (SCH-I515 Verizon LTE) using Tapa2
I looked a lot on google, but didn't find anything relevant to my case. I even tried to find the datasheet of the chip to if there's a pin (ball) that controls the read-only, like a switch would. Unfortunately it doesn't seem to be publicly available on the internet.
The only topics I found to remotely relevant is:
http://discussions.nokia.com/t5/Maemo-and-MeeGo-Devices/Memory-In-Readonly-Cannot-Flash-EMMC/td-p/1030885
bu that doesn't have any relevant info.
Are you familiar with linux?
If you are, check out the first post on page 2 of this thread.
http://forum.xda-developers.com/showthread.php?t=1609825&page=2
Sent from my SGH-I747 using xda premium
Yep, quite familiar
That indeed sounds the same as my problem, but I already ran fsck a million times and everytime it complains that there are problems with the journal and won't continue. Either way, there do seem to be FS errors, because when mounting the partition it says it's fixing certain errors (very few) and then continues to mount it RW. After trying to change anything, the kernel drops the partition into RO mode. "mount" continues to show it as rw though.
That's why I tried doing an mke2fs, which completes succesfully, but it seems that the changes are only in RAM and never persisted to emmc.
ioish said:
Yep, quite familiar
That indeed sounds the same as my problem, but I already ran fsck a million times and everytime it complains that there are problems with the journal and won't continue. Either way, there do seem to be FS errors, because when mounting the partition it says it's fixing certain errors (very few) and then continues to mount it RW. After trying to change anything, the kernel drops the partition into RO mode. "mount" continues to show it as rw though.
That's why I tried doing an mke2fs, which completes succesfully, but it seems that the changes are only in RAM and never persisted to emmc.
Click to expand...
Click to collapse
Very odd indeed. I might have missed this but have you tried installing CWM (not TWRP as it only does the rm) and attempting to do a format from there?
Sent from my SGH-I747 using xda premium
I did try installing CWM using fastboot flash and also a newer version of TWRP and the command completes succesfully, no errors on the screen. When booting into recovery, the same TWRP is still there, as if I never flashed anything
Same problem with my Moto G. Nothing gets flashed. emmc is just write protected and I cannot mount anything

[Q] Unable to mount /data

My wife's Galaxy S3 suddenly decided it didn't want to boot past the Galaxy SIII logo (which includes the blue Cyanogen mascot at the bottom)
I was going to attempt to re-flash Cyanogenmod 10.2, but for some reason TWRP prompted me for a password upon going into recovery. Hitting Cancel here allows me into TWRP. I flashed the latest version on TWRP, and still I am prompted by that password.
I then found that I was unable to wipe Dalvik Cache, and then found that I'm unable to mount /data.
Well that's not good. I assume that I'll have to use Odin to go back to stock and re-partition? Any suggestions would be appreciated.
Sounds like your /data is encrypted. When you're prompted for a password, that's to decrypt the /data partition (it's probably the PIN she uses to unlock the phone). Hitting cancel simply leaves /data unencrypted and unmounted. If you hit mount within TWRP, you'll probably see a "Decrypt Data" button. Try using the PIN and see if that works.
Joe
erc. said:
My wife's Galaxy S3 suddenly decided it didn't want to boot past the Galaxy SIII logo (which includes the blue Cyanogen mascot at the bottom)
I was going to attempt to re-flash Cyanogenmod 10.2, but for some reason TWRP prompted me for a password upon going into recovery. Hitting Cancel here allows me into TWRP. I flashed the latest version on TWRP, and still I am prompted by that password.
I then found that I was unable to wipe Dalvik Cache, and then found that I'm unable to mount /data.
Well that's not good. I assume that I'll have to use Odin to go back to stock and re-partition? Any suggestions would be appreciated.
Click to expand...
Click to collapse
joeinternet said:
Sounds like your /data is encrypted. When you're prompted for a password, that's to decrypt the /data partition (it's probably the PIN she uses to unlock the phone). Hitting cancel simply leaves /data unencrypted and unmounted. If you hit mount within TWRP, you'll probably see a "Decrypt Data" button. Try using the PIN and see if that works.
Joe
Click to expand...
Click to collapse
Yes, I think you're right about the encryption. How does /data become encrypted? She doesn't recall encrypting it through settings, of course. Her usual pin doesn't work to allow access either. If I can't figure out the password to decrypt /data, what's next?
Within CM, the ability to encrypt /data is selected within settings. It will ask you to set a pin or passphrase, have more than 80% battery and will reset to encrypt (you'll see a green wireframe android icon and an encryption progress meter). This is all a conscious decision, so someone must have gone in there to set it, if that's the reason why it's asking for a password. You can set a different password for encryption, but you would have to do this from the command line, which doesn't sound likely here.
If encryption was interrupted, it's possible the drive isn't encrypted, but TWRP thinks it is (the key data is stored at the end of the partition). I'm paraphrasing, but if that bit is set, it will always think the partition is encrypted. The only way to wipe that is to completely wipe the /data partition, which you probably don't want to do unless you've got good backups (and nandroid will not backup /data/media, so be careful with that option).
Do you know if the phone had adb debugging enabled? You could try running logcat while it boots to see what the issue is. I had something similar happen to mine (hanging at the CM icon at boot) when I upped from the October CM10.2 nightlies to the M1 release and ended up using ODIN to return to stock - it's a good thing I had backups!
You can get a shell while in recovery to poke around. You can try mounting from the command line there (the /data partition will be listed in the /etc/recovery.fstab file).
If all else fails, and you have good backups, you could try wiping /data from within TWRP, but keep in mind that all pictures, texts, music, etc will go with it! I would only do this as a last, last resort.
I've seen several threads lately about issues with the partition layout in recent flashing (esp. with the MF1 update). I've reverted back to stock as a precaution, myself.
Joe
erc. said:
Yes, I think you're right about the encryption. How does /data become encrypted? Her usual pin doesn't work. If I can't figure out the password to decrypt /data, what's next?
Click to expand...
Click to collapse
joeinternet said:
Within CM, the ability to encrypt /data is selected within settings. It will ask you to set a pin or passphrase, have more than 80% battery and will reset to encrypt (you'll see a green wireframe android icon and an encryption progress meter). This is all a conscious decision, so someone must have gone in there to set it, if that's the reason why it's asking for a password. You can set a different password for encryption, but you would have to do this from the command line, which doesn't sound likely here.
If encryption was interrupted, it's possible the drive isn't encrypted, but TWRP thinks it is (the key data is stored at the end of the partition). I'm paraphrasing, but if that bit is set, it will always think the partition is encrypted. The only way to wipe that is to completely wipe the /data partition, which you probably don't want to do unless you've got good backups (and nandroid will not backup /data/media, so be careful with that option).
Do you know if the phone had adb debugging enabled? You could try running logcat while it boots to see what the issue is. I had something similar happen to mine (hanging at the CM icon at boot) when I upped from the October CM10.2 nightlies to the M1 release and ended up using ODIN to return to stock - it's a good thing I had backups!
You can get a shell while in recovery to poke around. You can try mounting from the command line there (the /data partition will be listed in the /etc/recovery.fstab file).
If all else fails, and you have good backups, you could try wiping /data from within TWRP, but keep in mind that all pictures, texts, music, etc will go with it! I would only do this as a last, last resort.
I've seen several threads lately about issues with the partition layout in recent flashing (esp. with the MF1 update). I've reverted back to stock as a precaution, myself.
Joe
Click to expand...
Click to collapse
Hey Joe, I appreciate you taking the time to answer the questions. I did edit my earlier response while you were responding, but to go into slightly more detail, her phone was just sitting on the arm of the couch, when she realized that it was off (it had been on just prior to that). She assumed the battery had died, but when I charged it to 100% and tried to boot it, that's when we found out that it wouldn't boot.
Anyway, wiping data isn't an issue. I have all of her photos and videos backed up, and most of her important stuff is stored in Google Drive. Unfortunately, trying to wipe data actually throws an error. Can you wipe /data if you can't even mount it?
EDIT: When I try to format data in TWRP, I get errors saying "E: Failed to decrypt data", and then it stops at "Updating partition details..."
Possibly a coincidence, She was previously using CM10.2 nightlies and just recently went to the M1 release.
So if we can't mount or wipe /data from recovery, I assume the next step is to go back to stock with Odin? And if that's the case, can you point me in the right direction? I am downloading Official VRBMF1 4.1.2 right now. Do I need a PIT file or something to fix the partitions?
Thanks again
Hrm..
I'd say going back to stock with ODIN will definitely get things back on track. You might need a PIT file to re-partition the device. You'll want to make sure it's the PIT for your model of phone (Verizon 16GB GS3, for example). Google turned up this:
http://teamuscellular.com/Forum/topic/3882-pit-files-for-all-us-variants-of-sgsiii/
I'm the SCH-I535 16GB so I used that one.
One other caveat - be sure you're running ODIN from a real PC - I was using a Virtual Machine and that caused issues.
Joe
erc. said:
Hey Joe, I appreciate you taking the time to answer the questions. I did edit my earlier response while you were responding, but to go into slightly more detail, her phone was just sitting on the arm of the couch, when she realized that it was off (it had been on just prior to that). She assumed the battery had died, but when I charged it to 100% and tried to boot it, that's when we found out that it wouldn't boot.
Anyway, wiping data isn't an issue. I have all of her photos and videos backed up, and most of her important stuff is stored in Google Drive. Unfortunately, trying to wipe data actually throws an error. Can you wipe /data if you can't even mount it?
EDIT: When I try to format data in TWRP, I get errors saying "E: Failed to decrypt data", and then it stops at "Updating partition details..."
Possibly a coincidence, She was previously using CM10.2 nightlies and just recently went to the M1 release.
So if we can't mount or wipe /data from recovery, I assume the next step is to go back to stock with Odin? And if that's the case, can you point me in the right direction? I am downloading Official VRBMF1 4.1.2 right now. Do I need a PIT file or something to fix the partitions?
Thanks again
Click to expand...
Click to collapse
joeinternet said:
Hrm..
I'd say going back to stock with ODIN will definitely get things back on track. You might need a PIT file to re-partition the device. You'll want to make sure it's the PIT for your model of phone (Verizon 16GB GS3, for example). Google turned up this:
http://teamuscellular.com/Forum/topic/3882-pit-files-for-all-us-variants-of-sgsiii/
I'm the SCH-I535 16GB so I used that one.
One other caveat - be sure you're running ODIN from a real PC - I was using a Virtual Machine and that caused issues.
Joe
Click to expand...
Click to collapse
Well, I wish I could come back with more insightful information, but through a bunch of poking and prodding in recovery, I was able to eventually format /data without having to use Odin. Thanks for the link, though. I'm saving the PIT file (same as yours), because who knows when it'll be needed.
This is actually the second time this phone has been stuck at the Galaxy SIII logo screen (with Cid, before the boot animation) in the past couple weeks. Both times were with the Cyanogenmod 10.2 M1 release. I think I might try RC1 to see if it behaves any better, but if not, it's back to stock she goes. If my wife didn't find TouchWiz so hideous, I'd likely go skip trying RC1 and go straight to stock and wait patiently for the 4.3 OTA.

Encrypted Device - NO keyboard

So, I encrypted my device last night, but on rebooting, the password screen has no keyboard, so I cannot enter my password... In TWRP, I cannot mount data (doesn't prompt for a password like it should), so I cannot wipe... Any attempts to wipe result in FAILED. I cannot access anything from a computer (nothing shows up).
I've seen a few scattered posts that relate, but none resolved. It would appear that I have a completely bricked phone now. Any suggestions?
HTC Droid DNA - Cyanogenmod (latest milestone) - TWRP 2.8
Did you encrypt /system?
You should normally be using LUKS and have an unencrypted partition on your SD card so you can access it via USB. Then getting to the other encrypted partitions is a lot easier.
dyczone said:
Did you encrypt /system?
You should normally be using LUKS and have an unencrypted partition on your SD card so you can access it via USB. Then getting to the other encrypted partitions is a lot easier.
Click to expand...
Click to collapse
I can access/mount system in TWRP, however I cannot see it over USB on my computer. Is there anything I can do from TWRP to get a keyboard, or at least wipe and start over.
Nagrom Nniuq said:
I can access/mount system in TWRP, however I cannot see it over USB on my computer. Is there anything I can do from TWRP to get a keyboard, or at least wipe and start over.
Click to expand...
Click to collapse
Can you try flashing a stock ROM via fastboot?
Well, incase anyone is interested. I was able to adb sideload CM11 onto my phone using TWRP and my computer. After that I was able to reboot and get a keyboard on the encryption screen. Unfortunately, after I entered my password, the screen looked like it was unlocking, however it then just went blank and stayed like that for over an hour before I gave up on that. Sadly, I was reduced to formatting data, losing everything, and starting over from scratch... Chalk that up to a massive fail for encryption. If that happens to people, no one is going to use it.

[SOLVED] TWRP can't mount internal storage - the problem is coming back...

I wanted to update my rooted Android Nougat to Oreo and also go from SuperSU to Magisk. During that process I discovered that TWRP recovery couldn't mount my internal storage.
I quickly saw on a lot of sites that it's a well-known issue, and I solved it by converting from ext4 to ext2 and back again. Now my phone is running perfect. All apps are installed, data and settings are restored with Titanium and root with Magisk is working fine. But then I remembered about the issue with TWRP and booted into recovery - just to discover the problem is back again. I can't mount my internal storage. So I can't flash zip files, I can't do a backup etc.
When I search xda or the web in general, I can't figure out why the problem has occured again. Also I can't find out how to fix it without losing all my data. Can anybody answer these two questions? Why is this happening again and how do I permanently fix it? And can it be with all my data on my phone - because I'm not able to do a backup.
Michael B.N. said:
I wanted to update my rooted Android Nougat to Oreo and also go from SuperSU to Magisk. During that process I discovered that TWRP recovery couldn't mount my internal storage.
I quickly saw on a lot of sites that it's a well-known issue, and I solved it by converting from ext4 to ext2 and back again. Now my phone is running perfect. All apps are installed, data and settings are restored with Titanium and root with Magisk is working fine. But then I remembered about the issue with TWRP and booted into recovery - just to discover the problem is back again. I can't mount my internal storage. So I can't flash zip files, I can't do a backup etc.
When I search xda or the web in general, I can't figure out why the problem has occured again. Also I can't find out how to fix it without losing all my data. Can anybody answer these two questions? Why is this happening again and how do I permanently fix it? And can it be with all my data on my phone - because I'm not able to do a backup.
Click to expand...
Click to collapse
The problem occurs when you use a ROM which encrypts the software or the ROM your flashing has an encrypted kernal. The only way out is to flash a ROM which doesn't encrypt. It is a known problem with TWRP and we have to wait for the TWRP team to update TWRP to handle quota allocation.
It seems the problem is solved for me. I flashed the TWRP version from this link: https://forum.xda-developers.com/showpost.php?p=77296102&postcount=1243
First I tried from Odin but it didn't work. Then I installed the TWRP app from Google Play and flashed the other file, rebooted to recovery, and it seems to work. I can mount my internal storage, make a backup etc. So this is the solution for me.
I had also similar problem of internal storage 0mb and i was not be able to mount my data
so when i flash color recovery by nobody
It's gone because it's allready patch by him
I think it's issue of encrypt data so just flash this recovery from nobody post
https://forum.xda-developers.com/galaxy-s7/themes/recovery-twrps-colored-t3859323
Hey guys
wondering if somebody can assist me with my issue. I can mount the internal storage via twrp, and can copy files etc over to the internal storage on my pc. But when i go into file manager nothing appears. even though i indicate that it show me the internal storage. any ideas?
isgakbrfc said:
Hey guys
wondering if somebody can assist me with my issue. I can mount the internal storage via twrp, and can copy files etc over to the internal storage on my pc. But when i go into file manager nothing appears. even though i indicate that it show me the internal storage. any ideas?
Click to expand...
Click to collapse
i think you must try with different file mngr, that one have no ability or permission to read system files
noniboyba said:
i think you must try with different file mngr, that one have no ability or permission to read system files
Click to expand...
Click to collapse
I'll re flash later and try a different file manager. Otherwise I'll install treble or re flash stock and start over
isgakbrfc said:
Hey guys
wondering if somebody can assist me with my issue. I can mount the internal storage via twrp, and can copy files etc over to the internal storage on my pc. But when i go into file manager nothing appears. even though i indicate that it show me the internal storage. any ideas?
Click to expand...
Click to collapse
same problem, have you found solution ? please help me
TWRP sometimes can't mount the storage, the storage is encrypted, but don't worry. You can still flash your files and rewrite system partion. But in order to show the Storage, you have to use a different version of TWRP. Why am I saying this is mentioned following:
I installed the latest version of twrp, It didn't ask for any password patter to decrypt my storage. So , different XDA posts made me understand that , formatting everything, factory reset will decrypt my storage. And trust me, I have done it several time, several times my brother but it didn't decrypt my storage. I couldn't backup my ROM and without backing up my ROM, I didn't take the risk of flashing new ROM. I waited. This twrp couldn't even mount my system partion. So I seeked knowledge from different person. It took a lot of effort.
Then I learned that, I should change this version of TWRP. I changed to an older version and it didn't decrypt my internal storage after formatting, but it mounted my system partion. Since, it couldn't decrypt my internal storage, I couldn't take backup of my rom and save it to internal storage. so I inserted a pendrive in my phone, and saved the backup of my rom there.
Permanent Solution​
Flashing DM Verity Force Encryption Disabler will decrypt your storage instantly. But in my case, it aroused another problem, None of the security measures of my phone worked afterwards. FOD, pin, password, pattern none of them worked. I don't know the reason but I don't suggest it with my little knowledge. but almost every rom flasher use them, so I thing I have to study about them to know how they work.​
second and best option: start trying older version of TWRP, the good one will be the one to ask the password the recovery in the beginning. It will decrypt your internal storage.​
I was brief here, if anyone doesn't understand these things, let me know, I will explain them step by step because I know the pain of being NEWB.

failed Lineage18.1 update, trying to regain encrypted data

Hey guys,
my first Thread/post here. cause I have a slight problem (I do hope that I'm in
Today, I wanted to make an update of LineageOS 18.1 for my Samsung S7 herolte mobile. Therefore I use the custom ROM from Ivan Meler. Since some time, a bug accures, that an update needs a complete wipe of everything, cause elseways, Lineage wouldn't boot - I don't know why. This is something I completely forgot, so I never did a backup - something I usually do.
First Idea to solve it was simply do a backup with TWRP. This fails right away, because I used my external SD Card as a expansion for the internal storage. Thats a function of android as far as I can tell you can use at first use of the sdcard. Anyways, I can't mount the sdcard so that method fails.
Second try is using adb. The Partition is encrypted, so I use
twrp decrypt "PASSWORD" as described here. But TWRP gives me Failed to decrypt data. with no further details why. I am very certain I enter the correct password. I don't understand why it fails and never found a way to find further details to it. The only and easiest way to see it would be, that the data is corrupted but I doubt it. Starting up lineage fails (restart) after the submission of the passphrase.
My third Idea is using USB OTG but I lack the hardware to do so. Well, I could use my computer to do that, but TWRP seems to not recognise the computer as a storage device.
Does anyone have an Idea how to solve that mess? I don't want to loose 6 Months of data...
Edit: As I continue to learn: maybe the recovery.log from twrp helps - I couldn't find sth useful in there.

Categories

Resources