[Q] Deleting encrypted data partition - One (M7) Q&A, Help & Troubleshooting

I turned on device encryption in order to play with it (bad mistake). Performance is suckish, it prevents me from flashing anything stored on the internal filesystem (have to use USB dongle), battery life has gone down, etc.
I tried wiping the device by doing a factory reset both in recovery and through settings. Neither method touches the encrypted data partition. Re-flashing the ROM makes no difference. The encrypted partition is extremely resilient
Based on some research, the only known way to wipe the encryption is to revert to stock and use stock recovery to do a factory reset. This sounds insanely cumbersome if all I want to do is wipe a partition. Does anyone know of a better way?
If stock recovery can do a factory wipe without mounting the encrypted partition, it sounds like a feature to add to CWM or TWRP.
Device is ATT HTC One, rooted, S-OFF, Super CID, CWM recovery, Sentinel ROM 4.0.
Many thanks

You can try and flash an ruu? See if that helps and if it doesnt try the stock recovery thing. Never heard of it though.
Sent from my HTC One X using xda app-developers app

So, the wipe of TWRP didn't removed the encryption like it say this when you will wipe?
Strange
However, flash the stock recovery and do a factory reset like you said, and see if it work..

you can do it via TWRP just make sure the rm -rf mode is disabled in settings... Or maybe in fastboot... Just type
Code:
fastboot erase userdata
Or another perhaps is ask someone to create a nand dump of their user data partition and use "dd" to write it on your own.

Problem Solved!
Eureka!!!!
I was playing with CWM and figured it out. In the "mounts and storage" tab, if you select "format /data" it fails with an error that it can't mount the volume.
If you select "format /data and /data/media" it works like a charm. For some reason, it performs the format operation on the raw partition while the prior option tried to mount it first.
Back in business

Thanks RootShot ["format /data ¨in advanced wipe first¨ and format/data ¨& write yes in second¨ " ] did the trick and saved my phone back to work ...

Related

[Q] Can't perform factory reset

Hi there
Although this is my first post, I am regular visitor of this forum since Defy's devs started porting CM and finaly is time to make a post (need a help ).
I have decided to flash Omars ROM but wanted to do nandroid backup first. My phone is encrypted due to exchange policy so I've backup my apps and wanted to do factory reset. For some reason I can't (neither through settings, stock recovery or CWM). When hit wipe data in CWM and confirm, all I get is:
wiping data
formatting /data
error mounting /data!
skipping format
formatting /cache
formatting /sd-ext
formatting /sdcard/.android_secure
error mounting /sdcard/.android_secure!
skipping format
data wipe complete...and everything is as before it.
I was thinking to flash sbf through RSD lite but wanted to ask if somebody had similar problem (I am not even sure if it is encryption related or not) which can be solved easily?
Thanks
//edit: because I couldn't figure out what was blocking factory reset, RSD did the job just right and now everything works great again (and custom rom is finally in)

[Q] How to wipe Data partition after it's been encrypted?

Hey guys,
My work switched to Google Apps for their email so i wanted to test it out on my phone. Doing so required them to encrypt my phone. What this appears to have done is encrypt the data partition. So now when i go into (TWRP) recovery and try to do a backup / wipe / or anything else, it says it is "Unable to mount /sdcard" I'm unable to do a factory reset of any kind so i'm essentially stuck on this rom (ARHD) until i can figure out how to wipe data and get the /sdcard to be not encrypted. Does anyone have any ideas? I'm imagining that with the modified recovery not being able to access the data partition that i'm going to have to do some adb type stuff?
Please help! I want to keep flashing new roms!
Anyone??
I think you can't decrypt your data partition...
Did you try to wipe your data partition with the latest TWRP?
Guich said:
I think you can't decrypt your data partition...
Did you try to wipe your data partition with the latest TWRP?
Click to expand...
Click to collapse
That's the thing, the recovery can't mount /sdcard so wiping isn't an option from recovery
jrun said:
That's the thing, the recovery can't mount /sdcard so wiping isn't an option from recovery
Click to expand...
Click to collapse
Hi! Only TWRP recovery can solve your issue just do this...
Boot to TWRP recovery->Wipe
From there there are 2 options the left is the advance wipe and on the right is Format Data
Just select the format data button and it should reformat the whole data partition.
1st one would prompt so many errors and reformat then reformat it again 1 time and it should fully reformat your phone.
In theory it should reformat data partition even when encrypted but just in case it fails and I won't be able to go back to this thread just boot in bootloader and type
"fastboot erase userdata"
Well none of that works. TWRP doesn't support decryption yet for this device.
sevenalive said:
Well none of that works. TWRP doesn't support decryption yet for this device.
Click to expand...
Click to collapse
What I instructed basically doesn't decrypt the partition. It reformats it.
Riyal said:
What I instructed basically doesn't decrypt the partition. It reformats it.
Click to expand...
Click to collapse
I know what you instructed, it doesn't work. Only way I got it to work. Flash the stock recovery. Boot into system. Take off the encryption, phone reboots and removes the encryption, data is formatted. Then flash TWRP again.
I basically ran into this exact problem. I was hoping that I'd still be able to back up the encrypted device, but forget about it. What a pain in the ass.
Someone should make add something to the guides about how encrypting your device makes nandroid backups impossible.

[Q] Problem with flashing roms and partitions/mounting...

After I flash a rom, when i try boot into TWRP it asks for a password and refuses to mount any partitions unless i wipe data in there, and then wipe the other partitions in CWM... I have no idea what to do as this is pretty much stuffing everything up.
Edit: It's always the /data partition that need to be wiped...

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.

[HELP] I've messed up somewhere, need experienced users

I haven't formatted my phone in a while, so rather than delete files while my phone was working. I booted into recovery and selected the format data option in TWRP. Now I am getting all kinds of errors in TWRP. I was on a custom rom when I did all of this and somehow I screwed up. I can't even get a zip on my phone as my phone is only recognized as charging and not a storage device under these circumstances. I have tried adb sideloading a rom, but that is to no avail. I am thinking about flash a stock recovery in hopes that I'll be able to flash a stock rom and fix my phone.
this is what it says when trying to wipe anything:
could not mount /data and unable to find crypto footer.
failed to mount '/data (invalid argument)
without typing out everything the rest of it says failed to mount '/data' (invalid argument)
Boot the phone into fastboot, type fastboot format userdata
fastboot format cache
then fastboot flash recovery <name of twrp recovery>.img (don't put < >)
boot into recovery and go to advanced wipe and wipe everything except internal
everything will be fine now
you can flash any rom now.
If it worked, hit the thanks button
Try unbrick tutorial from XDA to back to new alike!
This is the best option
Well actually I took a different route altogether. I don't know why I didn't think about it initially. You would think after almost 10 years of dealing with custom ROMs and recoveries that I would of been a lot quicker in finding a solution, so I googled it. Came to the conclusion that I needed a stock OP3T recovery, so I downloaded it and fastboot flashed the stock recovery. From recovery I was able to wipe data, cache, dalvik-cache. All was good after that. Now I'm running coltOS.
Sent from my ONEPLUS A3000 using Tapatalk
Glad you fixed it. If you face a similar issue in the future you can download MSMTool for the OnePlus 3T which will restore stock OOS through fastboot

Categories

Resources