[Q] How to mount encrypted storage with TWRP? - One (M7) Q&A, Help & Troubleshooting

I'm using Android Revolution HD 30 and TWRP 2.6.3.0 (Flyhalf205 version). The phone is S-OFF.
I tried to encrypt the phone storage. It worked, but TWRP was not able to mount /data anymore. It should have asked me for the encryption password, but it didn't.
What are the commands to mount /data using and adb shell?
Regards

Same issue here. TWRP 2.6.3.0 asks for password on Nexus 7 (2012), doesn't ask or mount anything on my One. I'm on the latest stock GPE ROM, S-ON, custom kernel with /system protection off.

I feel uncomfortable knowing that if I lose my phone, anyone could very easily retrieve private content.
At least with stock recovery and locked bootloader, accessing private content requires motivation and work, since simply unlocking the bootloader to install a custom recovery would erase /data/ partition too.
With a custom recovery installed the risk is even worse, since reading personal data doesn't require any work.

Related

[Q] Removing encryption

I am thinking of encrypting my HD+ (Settings>Security>Encrypt Tablet). As far as I can see this means simply that the /data partition will be encrypted and that CWM is afterwards not able to access this anymore (ie for backups or restores). I can do a complete backup by other means, but how would I be able to restore that?
Will the recovery still boot and will I then be able to format/wipe /data? Probably not because /data is not mounted!?
Also, what happens if I want to update the system, say to a newer version of CM?
So no one's ever tried to encrypt their HD/HD+?
I am still investigating this "problem" and it seems that quite a few people have run into trouble after encrypting their tablet (TWRP Recovery seems to support an encrypted /data partition but CWM doesn't... correct me if I'm wrong).
So here's a question for the Linux gurus: if I have booted an encrypted tablet and have opened a terminal window with full root access, will I be able to unmount and reformat the /data partition? After that I should be able to reboot into recovery and restore a backup.

HTC One Formatted phone and now cant mount data with twrp

I was formatting my HTC One to give it to a family member. I was going to sideload or push a rom and flash it, but twrp keeps saying it cant mount /data/ or internal storage. I got to sideload android revolution HD GPE but when it boots its asks for a password to decrypt the storage which i have never done. In twrp it still says it can't mount internal storage or data and I need help getting out of this mess. :/
xXxG0dzRAgexXx said:
I was formatting my HTC One to give it to a family member. I was going to sideload or push a rom and flash it, but twrp keeps saying it cant mount /data/ or internal storage. I got to sideload android revolution HD GPE but when it boots its asks for a password to decrypt the storage which i have never done. In twrp it still says it can't mount internal storage or data and I need help getting out of this mess. :/
Click to expand...
Click to collapse
inside TWRP select wipe and then select format data, this will however completely wipe your phone and you will need to push or sideload a new rom then flash it, try and use TWRP 2.6.3.3, it makes all the difference.
Seanie280672 said:
inside TWRP select wipe and then select format data, this will however completely wipe your phone and you will need to push or sideload a new rom then flash it, try and use TWRP 2.6.3.3, it makes all the difference.
Click to expand...
Click to collapse
I flashed CWM to see if it worked instead but still said cant mount /data and can't mount /sdcard. I formatted /data and now trying to sideload android revolution again to see if that will work. If not I will try to use TWRP 2.6.3.3. I was using 2.7.1.1 beforehand.
Also the whole reason im here is because I wiped my phone completely with TWRP. Just planned on wiping it all then sideloading a rom to give it that "new phone" sort of feel. No empty random folders and all that. No left over files.
xXxG0dzRAgexXx said:
I flashed CWM to see if it worked instead but still said cant mount /data and can't mount /sdcard. I formatted /data and now trying to sideload android revolution again to see if that will work. If not I will try to use TWRP 2.6.3.3. I was using 2.7.1.1 beforehand.
Also the whole reason im here is because I wiped my phone completely with TWRP. Just planned on wiping it all then sideloading a rom to give it that "new phone" sort of feel. No empty random folders and all that. No left over files.
Click to expand...
Click to collapse
The TWRP 2.7.x.x series all seem to have one or another problem going on with them, most users here swear by 2.6.3.3 or 2.6.3.4, however you will also find that most custom rom's require TWRP recovery over CWM.
also, don't forget to erase the cache after flashing each recovery.
Code:
fastboot flash recovery recovery.img
fastboot erase cache
fastboot reboot-bootloader
Seanie280672 said:
The TWRP 2.7.x.x series all seem to have one or another problem going on with them, most users here swear by 2.6.3.3 or 2.6.3.4, however you will also find that most custom rom's require TWRP recovery over CWM.
also, don't forget to erase the cache after flashing each recovery.
Code:
fastboot flash recovery recovery.img
fastboot erase cache
fastboot reboot-bootloader
Click to expand...
Click to collapse
Ended up reflashing twrp with fastboot and then flashed Android revolution HD71.1 on it. The format of data in CWM worked to fix the mounting problem I had. Twrp probably could have fixed it too if I tried wiping data again. Will remember that next time for the other HTC One I'll be doing this to in the next few days.

TWRP error "E:Unable to mount '/data'"

I have a new LG Optimus L90 (D415) with stock 4.4 ROM, and TWRP 2.8.0.0 (and previously, Philz 6.58.7) for recovery. Obviously, the phone is rooted and now has an unlocked bootloader....
My problem is that neither recovery will back up (or even mount) "/data". Note that I put that in quotes because, without having "/storage/sdcard" or something in front of it, I presume that it's an internal folder and not something to do with the external SDcard.
My first guess would be a problem with encryption, because both the phone and the external SD are using it -- and I never get asked for the password. Either way, the actual error in TWRP says "E: Unable to mount 'data'", while Philz says it can't access /data/philz-touch for the .ini file.
I've made several Google expeditions to find the answer, and have come up empty-handed with all of them. I've seen all kinds of fixes, from claims that I have to run chkdsk against the SDcard, to backing up the entire /data partition with a tar file and reformatting it with command line nightmares.
I'll do what I have to in order to fix this, but I'd rather not embark on an experimental goose chase. Any ideas?
I have this same problem. But only for wiping and flashing.
I have no idea for fix if backup also not working !! (Noob)
1.TWRP click backup. Select all except SDcard.
Finish backup.
2.go to Wipe menu.>advanced wipe>select all except System and Sdcard.
Wipe.
(It will skip the error files)
3.Install menu. Select ROM to flash.
Was what I did.
fear2433 said:
I have this same problem. But only for wiping and flashing.
Click to expand...
Click to collapse
I'm not flashing anything, yet. First I need to make a backup of the entire phone (not including the SDcard). That way, if something goes wrong, I can just restore my old, working configuration -- all at once -- and start over.
I can back up and restore apps individually, using Titanium Backup. But what I need here is a Nandroid-type backup... and that generally has to be done from the recovery partition. There is one other way to backup everything, using a laptop/PC and ADB. But I've never tried it, and it wouldn't protect against a ROM meltdown.
Solved, somewhat...
So I did some further experimentation concerning this error. I did a test run to install CyanogenMod, and I found that I couldn't even factory reset certain partitions because of these "Unable to mount /data/" type errors.
What was ultimately the problem? The encryption. Once I decrypted everything, TWRP was able to see, mount, and backup, those partitions.
But I was under the impression that TWRP handles encryption, e.g. asking for the password, or some such. I mean, how can you do a Nandroid-type backup on a phone, if no recovery can mount those kinds of partitions?
So, for the record: "E:Unable to mount" was definitely due to the encryption being turned on for my internal storage. Thus the solution (so far) is to decrypt storage. A wretched solution, but at least it works for the time being.
BTW, In furtherance of this research, I formatted my internal SDcard to NTFS, just to make sure it wasn't misaligned or whatever when it was just FAT32. And I discovered that NTFS takes forever to format (32GB on the order of a couple hours)., FWIW.
The plot thickens. It may not be sufficient just to undo encryption, there may be something wrong with the way that partition was created, or otherwise is constructed.
Even though I now am able to mount /data, I'm not able to format it.... in TWRP it says something like "unknown filesystem 'auto'".
But there is a thread here that describes using Philz recovery to unmount and then format this mess, and I'm about to try it, I just have to flash Philz in place of TWRP. Now let's hope this version works without issues, because I'd have little recourse if things go bad there.

Can't mount /system in twrp 2.8.3.0

I updated my twrp from 2.7.1 to 2.8.3.0. I haven't flashed a rom in a while, so I don't know for sure that it was working on the old one but I did install CM11 using 2.7.1. Now with 2.8.3 when I go into recovery and wipe is says it worked, but in red there is the error: "E: unable to mount /system".
I tried to repair it with twrp, using format /system as ext4, then wipe and it seems to work and mount correctly, but if I restart, into recovery the /system no longer mounts and gives the same error if I try to wipe it. When I select repair, it says the partition is 0mb. When I format as ext4 it then shows as the correct size (~1.8GB).
So bottom line is that when I try to flash a new rom, it gets stuck at the formating /system step. I think the problem is with twrp but I'm not sure. Any ideas what to do?
I have a T-mobile HTC one M7. It was CM11, but everything is wiped. TWRP 2.8.3. S-off unlocked bootloader.
Thanks!
modman21 said:
I updated my twrp from 2.7.1 to 2.8.3.0. I haven't flashed a rom in a while, so I don't know for sure that it was working on the old one but I did install CM11 using 2.7.1. Now with 2.8.3 when I go into recovery and wipe is says it worked, but in red there is the error: "E: unable to mount /system".
I tried to repair it with twrp, using format /system as ext4, then wipe and it seems to work and mount correctly, but if I restart, into recovery the /system no longer mounts and gives the same error if I try to wipe it. When I select repair, it says the partition is 0mb. When I format as ext4 it then shows as the correct size (~1.8GB).
So bottom line is that when I try to flash a new rom, it gets stuck at the formating /system step. I think the problem is with twrp but I'm not sure. Any ideas what to do?
I have a T-mobile HTC one M7. It was CM11, but everything is wiped. TWRP 2.8.3. S-off unlocked bootloader.
Thanks!
Click to expand...
Click to collapse
first of all the most reliable version of TWRP recovery is stil 2.6.3.3 or 2.6.3.4, most of the users on here would agree with me on that, newer is not always better.
Also, have you tried the format data option, select wipe then format data button, be warned though, this will wipe everything including your sdcard (internal) if this option works you will then have to sideload or push a rom to your device before you can flash.
Seanie280672 said:
first of all the most reliable version of TWRP recovery is stil 2.6.3.3 or 2.6.3.4, most of the users on here would agree with me on that
Click to expand...
Click to collapse
Agree 100% but CM11 require at least 2.7.0.8 to be flashed (block:by-name) and recommended version of twrp to flash CM11 is 2.7.1.2 http://wiki.cyanogenmod.org/w/Install_CM_for_m7
If not flashing a rom like CM11 still recommend using 2.6.3.3/.4 even if there are newer version.
They are talking about this in ARHD thread.
Seems a updater script problem.
Read here and below!
http://forum.xda-developers.com/showpost.php?p=57985309&postcount=84878
My 2 cents
Fain11 said:
They are talking about this in ARHD thread.
Seems a updater script problem.
Read here and below!
http://forum.xda-developers.com/showpost.php?p=57985309&postcount=84878
My 2 cents
Click to expand...
Click to collapse
Thanks for the link. I tried to find similar threads, but couldn't. They are having the same problem but with a different rom (I was trying to flash Sky Dragon android L). The solution on that thread was to use TWRP 2.6.3.3, but some people reported having no problems with 2.8.3. The install instructions for Sky Dragon say use the latest twrp but doesn't specify a version. I guess I could try TWRP 2.6.3.3 but I'm not sure if it will work since CM requires 2.7.1.
The other solution was to mount the partition manually before flashing using the terminal in recovery. This command was suggested:
Code:
run_program("/sbin/umount", "/system");
Haven't tried any of these solution myself. After 3 hours and wiping my entire data partition by accident, I USB-OTG copied my nandroid backup to my phone and did a complete recovery. Luckily the restore process didn't care about mounting /system. I may try this again with manual mounting, but likely I will wait for a twrp update. I'm not sure if twrp 2.6 supports usb-otg so it will be a pain in the ass if I wipe /data again by accident.
Random side note for anyone googling this, if you accidently wipe all the data from your sdcard and have to copy the nandroid backup for twrp, the the restore function won't recognize the files unless they are in exactly the right directory. The best way to get this is to copy the entire TWRP directory when saving your backup in the first place so you can just copy it back. If you didn't do that then just run a nandroid backup of the blank sdcard and it will recreate the folder structure for you. Then you copy the files into the correct folder.
alray said:
Agree 100% but CM11 require at least 2.7.0.8 to be flashed (block:by-name) and recommended version of twrp to flash CM11 is 2.7.1.2 http://wiki.cyanogenmod.org/w/Install_CM_for_m7
If not flashing a rom like CM11 still recommend using 2.6.3.3/.4 even if there are newer version.
Click to expand...
Click to collapse
Exactly this. I do not know the exact reason CM needs 2.7.1 so therefore I don't know if Sky Dragon needs it as well. The instructions just say use the latest twrp.
http://forum.xda-developers.com/showthread.php?t=2400161
Seanie280672 said:
first of all the most reliable version of TWRP recovery is stil 2.6.3.3 or 2.6.3.4, most of the users on here would agree with me on that, newer is not always better.
Also, have you tried the format data option, select wipe then format data button, be warned though, this will wipe everything including your sdcard (internal) if this option works you will then have to sideload or push a rom to your device before you can flash.
Click to expand...
Click to collapse
I did wipe my entire data partition (by accident), but I did not try to format it as ext4. I did format /system to ext4 (so now the partition was displaying correctly as ~1.8gb). The used the twrp repair, then wipe It seemed to work, but if I restarted right then, without even trying to flash the rom, the /system would not mount on reboot to recovery and would show as 0mb. I used all reasonable combinations and permutations of the wipe, repair and format functions on system, nothing worked.
I finally copied my nandroid backup via usb-otg and recovered back to cm11.

Installing Xposed via TWRP on encrypted internal sd

I encrypted my internal drive last nite and just now installed android now, which was not straightforward like before as I had to put the zip on the unencrypted external SD.
I have tried to install xposed but it does not work as it comes up with errors in accessing /data which would be on the encrypted drive.
Is there anyway to get around this or do I just have to unencrypt (not sure i can as i remember it said this operation is not reversible! Lol) or do a clean install from scratch and make sure I dont encrypt it again to ensure compatibility with xposed (and other mods I might want to try in future)?
Sent from my LG-D855 using Tapatalk
Mmh what version of TWRP are you using? Latest TWRP should be able to decrypt the data partition (for CM 12 since 2.8.5.6 i think) , for Stock Roms i am not sure, they can be different though
I had the same thing happen. However, I was running a GPE rom. GPE has it's own encryption that is not standard so TWRP couldn't decrypt it.
However, generally speaking the newer versions of TWRP can decrypt android encryption so you can install and remain encrypted. You'll just need to enter your password. That could be a pin unlock or pattern unlock.

Categories

Resources