[Q] Factory Data Reset on Encrypted Phone: Trials and Tribulations - AT&T Samsung Galaxy S 4 Q&A, Help & Troubleshootin

Hello All!
I've owned every Samsung Galaxy and both Nexus 7's and have successfully done all the basics (rooting, CWM, custom ROM) using Odin, ADB, and Fastboot. I've reached a problem that has stymied me, and Googling has thus far revealed no solutions.
Hopefully this question isn't as stupid as it seems to me.
Background
My AT&T Galaxy S4 has been rooted, has CWM recovery installed, and is running SlimBean's version of Android 4.3.
The phone was encrypted using the ROM's encryption (Settings >> Security >> Encrypt Phone). There is no decrypt option.
I installed the latest version of the ROM without realising that CWM's "Wipe Data/Factory Reset" option yielded errors due to the phone's encryption. Very stupid of me. Now, the phone works if I can get it to boot, but getting it to boot is a huge hassle that involves wiping /cache and re-installing the ROM every time.
Problem
I need to wipe data/factory reset and re-install the ROM in order to prevent the reboot problem from constantly occurring. I cannot do this from CWM due to the encryption of the phone.
Things I have tried:
1) Using ADB to mount and format system, data, cache
2) Using recovery to mount and format system, data, cache
For both, mounting and formatting system and cache were successful. Mounting and formatting data was unsuccessful.
3) Rebooting into Fasboot and using fastboot -w
For this, my Windows PC and my friend's Mac didn't recognise the device.
4) Using AirDroid to wipe data remotely
Using avast! to wipe data remotely
Using Android Device Manager to wipe data remotely
Asking my Exchange Admin at work to wipe the data remotely (maybe?)
None of these worked. The phone just rebooted like normal.
Basically
1. How can I wipe data/factory reset my encrypted phone?
2. How can I format the /data on my encrypted phone? Is this the only way to achieve (1)?
3. If I borrow a friend's Mac, and install Android SDK, would fastboot -w work on an encrypted phone?
Thanks bunches,
--Abhinav

abhinavk said:
Hello All!
I've owned every Samsung Galaxy and both Nexus 7's and have successfully done all the basics (rooting, CWM, custom ROM) using Odin, ADB, and Fastboot. I've reached a problem that has stymied me, and Googling has thus far revealed no solutions.
Hopefully this question isn't as stupid as it seems to me.
Background
My AT&T Galaxy S4 has been rooted, has CWM recovery installed, and is running SlimBean's version of Android 4.3.
The phone was encrypted using the ROM's encryption (Settings >> Security >> Encrypt Phone). There is no decrypt option.
I installed the latest version of the ROM without realising that CWM's "Wipe Data/Factory Reset" option yielded errors due to the phone's encryption. Very stupid of me. Now, the phone works if I can get it to boot, but getting it to boot is a huge hassle that involves wiping /cache and re-installing the ROM every time.
Problem
I need to wipe data/factory reset and re-install the ROM in order to prevent the reboot problem from constantly occurring. I cannot do this from CWM due to the encryption of the phone.
Things I have tried:
1) Using ADB to mount and format system, data, cache
2) Using recovery to mount and format system, data, cache
For both, mounting and formatting system and cache were successful. Mounting and formatting data was unsuccessful.
3) Rebooting into Fasboot and using fastboot -w
For this, my Windows PC and my friend's Mac didn't recognise the device.
4) Using AirDroid to wipe data remotely
Using avast! to wipe data remotely
Using Android Device Manager to wipe data remotely
Asking my Exchange Admin at work to wipe the data remotely (maybe?)
None of these worked. The phone just rebooted like normal.
Basically
1. How can I wipe data/factory reset my encrypted phone?
2. How can I format the /data on my encrypted phone? Is this the only way to achieve (1)?
3. If I borrow a friend's Mac, and install Android SDK, would fastboot -w work on an encrypted phone?
Thanks bunches,
--Abhinav
Click to expand...
Click to collapse
Format the phone completely via TWRP, and flash AMDL via ODIN. That should resolve your issue.

Related

[Q] Problem With recovery (Error Formatting Data)

Hello all
I'm having a problem here, Wanted someone to help me
I want to format my Data (wipe data/Factory reset)
I'm using ClockworkModRecovery v3.0.2.8 with HC 3.0.1
Now in the process of formatting data after a loooooong time it stops and says
Formatting /Data..
Error removing /data/misc/vpn/profiles/460173684741634006
Formatting /sd-ext
Formatting /sdcard/.and_secure
Data wipe Complete.
And System is not working very well. so Any help is appreciated
*EDIT: After reading the message, I tried to take a look at VPN Settings, but surprisingly enough when I click the VPN settings device hangs.
So there must be something wrong with the file system, Can anyone help me for Zero Flashing or formatting this Partition??
-I have tried Fastboot, it says Process was successful but nothing seems to have changed.
-And Although I dont have a Root access I dont think ADB is the answer but can I do it with?
you are using the wrong recovery
use this
http://forum.xda-developers.com/showthread.php?t=1074979
or
http://forum.xda-developers.com/showthread.php?t=1235170

[Q] Nexus 7 memory/storage - Wiping in TWRP...???!!!

Hi every one,
I have two related questions about nexus 7 memory/storage and TWRP wipes...
I'm pretty new with NEXUS 7 , but not with android.
I had a ACER LIQUID (sold) - HTC DESIRE HD (sold) - SONY XPERIA S (Actual phone)
ASUS TRANSFORMER TF101 (sold) - NEXUS 7 (actual tablet)
I've rooted, installed recovery, flash a lot of roms with all my device, but with nexus 7, i get a bit confused !!!
In Astro file manager, I see 4 local storage... I don't understand why...? And where to put files in order to find them after wiping data in TWRP...
I've flashed TWRP 2.3.2.1 to my nexus 7 recovery.
When I want to flash a rom, I like to wipe everything, in order to avoid problems...
On my other device, i used to wipe data, but on the nexus 7, when you wipe data, you loose the file you want to flash... (often in "DOWNLOAD"
Am I completly stupid ? :silly:
Is wiping system/dalvik/cache and a factory reset enought to avoid problem and to have a fresh install without wiping data ?
(sorry for my english, French people and there legendary english talking...)
Thanks for your help.
Geek endangered...
Stupid question ???
I'm new to nexus 7 and TWRP, but I believe wipe data wipes everything, including sdcard.
Maybe you are used to CWM, you were looking for the "factory reset" button.
It's confusing but I believe there is a warning before wiping data in TWRP saying it'll erase sdcard, am I wrong?
Yeah, used to use cwm... For you, factory reset in twrp is like wiping data in cwm?
If that's the case, for a fresh install, doing a factory reset in twrp is all I need to do? No need to wipe data?
I have the exact same question !
why wiping data (format /data) also remove /sdcard which should stay untouched event after factory reset, beacause if if it's virual I never ever see a sdcard wipe by a wipe data function.
As far as i understand, to deal with multiple user they now make a folder in /data/whatever that contains each profil.
This folder is mount in /sdcard according to the user of tablet, But why ****ing why the only option in this version of TWRP is FORMAT DATA and not wipe data (wich could avoid the deletion of sdcard content) SDCARD is like a sanctuary nothing should be able to delete what's in it except the user itself !

[Q] flashing ROM, lost SD card contents

This has been bugging me and I can't seem to find anything on here to explain it.
I have installed custom ROMs on my N7. Problem is most ROM instructions say to do a full wipe/factory reset. When I do that, the downloaded ROM that was sitting on the SDCard gets wiped out as well.
I then have to go back and search for info on how to reset/restore the N7 and start all over, because the recovery (both CWM and TeamWin) don't let me mount the SD card to copy the needed zip over.
How can I do the recommended data wipe without losing the sd card contents?
Failing that, what's easiest way to get the ROM zip back on the N7 when the recovery won't allow it?
Thanks
dont wipe data...
just do a 'factory reset' in custom recovery...then flash a rom
I use TWRP & don't wipe everything, just System & Factory (to delete installed apps).
This is after wiping Cache & Dalvik Cache.
Unless I'm missing something a data wipe will wipe everything except recovery.
I don't think we have the option to exempt the media folder like on other devices.
(you type faster than me PG)
I appreciate the suggestions, and I've done the factory wipe. It wiped out the /SDcard folder contents where the zips were.
How do I get zips back on the N7? tried ADB, tried sideload from TWRP, nothing works.
Having many more problems than the last time I did this.
jneg123 said:
I appreciate the suggestions, and I've done the factory wipe. It wiped out the /SDcard folder contents where the zips were.
How do I get zips back on the N7? tried ADB, tried sideload from TWRP, nothing works.
Having many more problems than the last time I did this.
Click to expand...
Click to collapse
factory reset in TWRP doesnt touch /data/media
are you sure you are on the most recent version of recovery?
updated to latest recovery version, that seemed to be my issue. sd card now untouched.
Pirateghost said:
factory reset in TWRP doesnt touch /data/media
Click to expand...
Click to collapse
Pirateghost speaks the truth.
The stock recovery however, wipes everything with it's "factory reset".
It's a little bit unfortunate that the identical terminology is used. No doubt new folks will occasionally get bit by assuming they are the same.
I haven't used cwm yet; not sure what it means by "factory reset" - or even if it uses that terminology.

Did I screw myself? I think my phone is dead - Any help would be appreciated

Whole Story:
I'm on a i337m Canadian S4 - Comes with Bootloader unlocked.
Last night I clicked "Format Data" by mistake in the newest TWRP - Lost everything - Could not do anything - flashing Roms did not work, so I downloaded a complete Restore of 4.2.2 from Sammobile and Odin 3.0.7 and was going to flash it back to stock.
About 1/2 way through the flash, something failed regarding a partition - Now my phone will not do anything other than display the below screen. It does not load a recovery, it does not go into download mode. Kies does not detect the phone anymore.
What can I do? Anything?
I'm so depressed over this.
bigystyle84 said:
Whole Story:
I'm on a i337m Canadian S4 - Comes with Bootloader unlocked.
Last night I clicked "Format Data" by mistake in the newest TWRP - Lost everything - Could not do anything - flashing Roms did not work, so I downloaded a complete Restore of 4.2.2 from Sammobile and Odin 3.0.7 and was going to flash it back to stock.
About 1/2 way through the flash, something failed regarding a partition - Now my phone will not do anything other than display the below screen. It does not load a recovery, it does not go into download mode. Kies does not detect the phone anymore.
What can I do? Anything?
I'm so depressed over this.
Click to expand...
Click to collapse
Format data will do nothing other than restore to factory settings, it should boot straight after.
winwiz said:
Format data will do nothing other than restore to factory settings, it should boot straight after.
Click to expand...
Click to collapse
From what I've read, Format Data using the newest version of TWRP deletes everything, causing everything not to work and is some sort of bug.
The ODIN Flash then failed after too.
I have the i337M Canadian version with the S600 Qualcomm
I've flashed via Odin dozens of times before with my previous Note II / S3 - never had one fail.
bigystyle84 said:
From what I've read, Format Data using the newest version of TWRP deletes everything, causing everything not to work and is some sort of bug.
The ODIN Flash then failed after too.
I have the i337M Canadian version with the S600 Qualcomm
I've flashed via Odin dozens of times before with my previous Note II / S3 - never had one fail.
Click to expand...
Click to collapse
Does adb detect the phone?
kingzain900 said:
Does adb detect the phone?
Click to expand...
Click to collapse
I'm not sure - I can see when I get home.
Can a cable cause this? I am not using the Cable that came with the phone - That wasn't included when I bought it. I'm using a Sony Cable from a Xperia T I used to own.
Why did the Odin flash fail to begin with?
Why did Format Data in TWRP cause all this to happen?
bigystyle84 said:
I'm not sure - I can see when I get home.
Can a cable cause this? I am not using the Cable that came with the phone - That wasn't included when I bought it. I'm using a Sony Cable from a Xperia T I used to own.
Why did the Odin flash fail to begin with?
Why did Format Data in TWRP cause all this to happen?
Click to expand...
Click to collapse
You can also ask Does god exist and what is the meaning of life.
Haha. I don't know. Such rethorical questions.
The cable matters because the other cable might not push enough current. Not sure. About the rest I have no idea. TWRP has a bug that's for sure. I don't use it. Check what adb says.
RESOLVED!!!
Tried my Laptop running Windows 7, and switched the cable. Also tried ODIN 1.85 instead of 3.07
Finally! This version of ODIN recongizes my phone.
3rd Attempt at flashing the firmware worked. The first TWO times failed.
Once it flashed, it froze, but factory rest has me back to Stock.
Now - to avoid that format Data button in TWRP, think I'll be giving CWM a try for the first time in years. Need me some Google Edition.
bigystyle84 said:
RESOLVED!!!
Tried my Laptop running Windows 7, and switched the cable. Also tried ODIN 1.85 instead of 3.07
Finally! This version of ODIN recongizes my phone.
3rd Attempt at flashing the firmware worked. The first TWO times failed.
Once it flashed, it froze, but factory rest has me back to Stock.
Now - to avoid that format Data button in TWRP, think I'll be giving CWM a try for the first time in years. Need me some Google Edition.
Click to expand...
Click to collapse
Wiping data, opposed to Formatting data.
TWRP FAQ
What to Wipe in TWRP
If you are switching ROMs (changing from one ROM to a completely different one) then you should perform a factory reset. A factory reset wipes data and cache (which includes dalvik cache). A factory reset will also wipe sd-ext and android_secure if your device has those items. 99% of the time, this is all that you need to wipe and you only need to do it once, not three times as some people would lead you to believe.
If you're installing a nightly update, then oftentimes you don't need to wipe anything at all. However, if you encounter strange behavior, then you may want to consider performing a factory reset. Of course, if the ROM maker recommends that you do a factory reset during an update, then it's a good idea to follow their recommendation.
The vast majority of ROMs wipe system as part of the zip install. This means that in most cases you do not need to wipe system... ever.
At this point, cache (not dalvik cache) is primarily used for recovery. It's used to store the recovery log and for storing OTA (Over The Air) updates. You probably don't need to wipe cache, and cache is already wiped as part of a factory reset.
In most ROMs, dalvik cache is stored in the data partition, so if you do a factory reset, you've also wiped dalvik cache. In a few custom ROMs, especially on older devices with small data partitions, the ROM maker may have moved dalvik to the cache partition to provide you with more room for apps. Since we wipe cache with a factory reset, again, you probably don't need to wipe dalvik. There are a few situations where you may need to wipe dalvik cache when installing updates, but you will know that it's needed when you are greeted with force closes when trying to open some apps.
Depending on your device and its configuration, you may have options for wiping internal storage, external storage, sd-ext, android_secure, and/or an option for formatting data. There's almost no reason that you would ever need to use these items. These options are there for convenience. For instance, if you're getting ready to sell your device, then it's a good idea to wipe everything on the device so that the new owner doesn't get your private data. Note that these wipe options may not be completely destructive. If you store especially sensitive information on your device or are really concerned about your private data, then you may need to look into other options to ensure that your data is fully destroyed.
norml said:
Wiping data, opposed to Formatting data.
TWRP FAQ
What to Wipe in TWRP
If you are switching ROMs (changing from one ROM to a completely different one) then you should perform a factory reset. A factory reset wipes data and cache (which includes dalvik cache). A factory reset will also wipe sd-ext and android_secure if your device has those items. 99% of the time, this is all that you need to wipe and you only need to do it once, not three times as some people would lead you to believe.
If you're installing a nightly update, then oftentimes you don't need to wipe anything at all. However, if you encounter strange behavior, then you may want to consider performing a factory reset. Of course, if the ROM maker recommends that you do a factory reset during an update, then it's a good idea to follow their recommendation.
The vast majority of ROMs wipe system as part of the zip install. This means that in most cases you do not need to wipe system... ever.
At this point, cache (not dalvik cache) is primarily used for recovery. It's used to store the recovery log and for storing OTA (Over The Air) updates. You probably don't need to wipe cache, and cache is already wiped as part of a factory reset.
In most ROMs, dalvik cache is stored in the data partition, so if you do a factory reset, you've also wiped dalvik cache. In a few custom ROMs, especially on older devices with small data partitions, the ROM maker may have moved dalvik to the cache partition to provide you with more room for apps. Since we wipe cache with a factory reset, again, you probably don't need to wipe dalvik. There are a few situations where you may need to wipe dalvik cache when installing updates, but you will know that it's needed when you are greeted with force closes when trying to open some apps.
Depending on your device and its configuration, you may have options for wiping internal storage, external storage, sd-ext, android_secure, and/or an option for formatting data. There's almost no reason that you would ever need to use these items. These options are there for convenience. For instance, if you're getting ready to sell your device, then it's a good idea to wipe everything on the device so that the new owner doesn't get your private data. Note that these wipe options may not be completely destructive. If you store especially sensitive information on your device or are really concerned about your private data, then you may need to look into other options to ensure that your data is fully destroyed.
Click to expand...
Click to collapse
Thanks - I realize this and am installing TWRP as we speak. (I just prefer it)
I was actually reading the Complete Guide in the general section and saw under CWM install that you need to format data between switching Roms.. I never actually did this ever with previous phones. Completely my fault for reading the CWM part, not the TWRP part, right under neath. I thought the Format Data was something S4 specific since this is my 2nd day with the device.
I'm now rooted with TWRP back on.

Unable to decrypt data

Hello,
So I tried to install LineageOS 17 (Android 10). And there were errors. So I decided to return to RR. And what i see is that the data is encrypted and I have to format my phone. When I click on this button phone restarts to recovery(orange fox) where I have to enter PIN. And everything is fine but in logs I see this:
Failed to encrypt data.
Unable to decrypt with default password. You may need to perform a Format Data.
Unable to mount storage
I can't use my device now. After booting to system same button and text appears. Please help
Update.
When I was writing this thread I couldn't find option Format Data but when I was searching in the recovery I finnaly found it. Now everything works fine
I don't think you can flash anything without first formatting the storage . This happened for me on Redmi6pro (sakura). That was the only option left for me that time.
hope you had a back up otherwise you will lost your files.
if you had a pin to unlock your phone put that ping in the box asking for decrypt the phone. if that doesn't work you may need to format data and reinstall.
If that's the case, restart into recovery (power+vol_up)
-go to manage partitions, format data partition.
-restart to recovery
-full wipe (data, dalvik, cache system)
-flash rom (can be the same) after a format and full wipe should work well i had lineage and was great.
-restart to recovery
- flash gapps and magisk if you like.
-restart into system.
Hope you get luck.,
Mr.Dogerrr said:
Failed to encrypt data.
Unable to decrypt with default password. You may need to perform a Format Data.
Unable to mount storage
Click to expand...
Click to collapse
If you this exact text, then you can pretty much say goodbye to the data from internal storage. At this point, there no way to rescue the files... Sadly, had the exact thing happen to me & I lost all my stuff

Categories

Resources