Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,811,995 Members 49,774 Now Online
XDA Developers Android and Mobile Development Forum

Wipe data/factory reset from ODIN

Tip us?
 
sfhub
Old
(Last edited by sfhub; 28th May 2012 at 06:47 PM.)
#1  
Recognized Contributor - OP
Thanks Meter 6,837
Posts: 4,757
Join Date: Oct 2008
Default Wipe data/factory reset from ODIN

A few weeks back, I got tired of not trusting wipe data/factory reset from any ICS-based kernel's recovery so I put together a small ODIN utility to wipe /cache and /data

Here it is if anyone is interested:
SPH-D710.ODIN_WIPE_CACHE_DATA.exe

You just double-click in windows, boot your phone to ODIN DL mode, and press Start.

No need to flash GB-based kernel/recovery just to do wipe data/factory reset then flash back to ICS-based kernel.

To be clear, the purpose is to have a "safe" replacement for wipe data/factory reset (recovery option) until we get the "fixed" kernels. It will wipe /cache and /data only, which is what wipe data/factory reset does. It will NOT wipe /system nor will it wipe your kernel.

In case people are not aware, there is a bug in the EMMC firmware (likely wear-level code) where if you issue an mmc_erase() it may result in a lockup/superbrick(). The reason it doesn't happen in GB is because GB doesn't use mmc_erase(). In ICS they added mmc_erase() into the code path initiated from make_ext4fs(). This is used by wipe data/factory reset in Recovery which is why we sometimes see the lockup/superbrick. Given that the problem is likely in the wear-level EMMC firmware code, it may not get triggered all the time even if mmc_erase() is called, but we are at risk whenever it is called.

As usual, you should be careful when flashing anything. I've been using this for 2 weeks now to test releases and haven't had any issues.
Disclaimer: No touchscreens were harmed nor injured during the creation of this post. GPS units were all treated ethically and humanely.
Signed: People against misbehaving Nexus 7 2013s
The Following 63 Users Say Thank You to sfhub For This Useful Post: [ Click to Expand ]
 
Esoteric68
Old
#2  
Esoteric68's Avatar
Senior Member
Thanks Meter 1,483
Posts: 2,943
Join Date: Jun 2011
Location: Hellabama
Quote:
Originally Posted by sfhub View Post
A few weeks back, I got tired of not trusting wipe data/factory reset from any ICS-based kernel's recovery so I put together a small ODIN utility to wipe /cache and /data

Here it is if anyone is interested:
SPH-D710.ODIN_WIPE_CACHE_DATA.exe

You just double-click in windows, boot your phone to ODIN DL mode, and press Start.

No need to flash GB-based kernel/recovery just to do wipe data/factory reset then flash back to ICS-based kernel.
Awesome. Thank you so much!
 
ih8aol
Old
#3  
ih8aol's Avatar
Junior Member
Thanks Meter 0
Posts: 23
Join Date: May 2008
Location: Cloquet
Just tried this! Restores phone to stock ICS. Thank you!
 
tenazrael
Old
(Last edited by tenazrael; 25th May 2012 at 08:19 PM.)
#4  
Member
Thanks Meter 35
Posts: 93
Join Date: Nov 2010
Q1 - Will this completely wipe all data, even from internal storage? How do I get my phone to go back to having only the basic folder/files needed to run?

Here is the reason I ask. I'm currently running Team Rogue Recovery. I just selected the Calkulin's Format All for E4gt.zip and ran it. It said it wiped a number of directories. After it ran, I then selected the Wipe > Factory Reset option. It said it wiped a number of directories.

However, when I go back and say "Choose .zip from Internal Storage", I see all these directories that were created by apps I installed that I thought would have been wiped. For example, I see a directory for BeWeather, CameraZoom, GoLauncher, GoLocker, etc. If I did a factory reset, shouldn't all those directories disappear from the internal storage?

Q2 - Assuming the answer to Q1 is yes, then based on the instructions provided, if I were to use this utility, it would clear out the data, but it would not remove the kernel. So could I use this utility while having a GB (EL29) kernel installed, and then flash a GB ROM?
 
ajonesma
Old
#5  
Senior Member
Thanks Meter 31
Posts: 301
Join Date: Jun 2010
Location: Detroit

 
DONATE TO ME
Quote:
Originally Posted by sfhub View Post
A few weeks back, I got tired of not trusting wipe data/factory reset from any ICS-based kernel's recovery so I put together a small ODIN utility to wipe /cache and /data

Here it is if anyone is interested:
SPH-D710.ODIN_WIPE_CACHE_DATA.exe

You just double-click in windows, boot your phone to ODIN DL mode, and press Start.

No need to flash GB-based kernel/recovery just to do wipe data/factory reset then flash back to ICS-based kernel.

As usual, you should be careful when flashing anything. I've been using this for 2 weeks now to test releases and haven't had any issues.
Does this take it back to the latest OTA from Sprint/Samsung (I believe is EL29)? Or does it take it to some other ROM.
Devices: AT&T Galaxy S3 - Cyanogenmod 10 Nightlies running Ktoonsez KT747 kernel | Google/ASUS Nexus 7 - AOKP Jelly Bean Build 2

Get free cloud storage on Dropbox!
 
slick_rick
Old
#6  
slick_rick's Avatar
Recognized Contributor
Thanks Meter 6,201
Posts: 2,877
Join Date: Sep 2011
Location: Immokalee/Tampa FL

 
DONATE TO ME
Quote:
Originally Posted by ajonesma View Post
Does this take it back to the latest OTA from Sprint/Samsung (I believe is EL29)? Or does it take it to some other ROM.
No it just wipes data/cache. You'll still be on the same rom/kernel/modem, just starting "fresh"

Hey sfhub, how can we mobile Odin this from our phone again?

Sent from my SPH-D710 using Tapatalk
I don't answer rom support questions through PM! You will be ignored! Post your question in the relevant thread instead.
 
sfhub
Old
(Last edited by sfhub; 26th May 2012 at 12:56 AM.)
#7  
Recognized Contributor - OP
Thanks Meter 6,837
Posts: 4,757
Join Date: Oct 2008
Quote:
Originally Posted by tenazrael View Post
Q1 - Will this completely wipe all data, even from internal storage? How do I get my phone to go back to having only the basic folder/files needed to run?

Here is the reason I ask. I'm currently running Team Rogue Recovery. I just selected the Calkulin's Format All for E4gt.zip and ran it. It said it wiped a number of directories. After it ran, I then selected the Wipe > Factory Reset option. It said it wiped a number of directories.

However, when I go back and say "Choose .zip from Internal Storage", I see all these directories that were created by apps I installed that I thought would have been wiped. For example, I see a directory for BeWeather, CameraZoom, GoLauncher, GoLocker, etc. If I did a factory reset, shouldn't all those directories disappear from the internal storage?

Q2 - Assuming the answer to Q1 is yes, then based on the instructions provided, if I were to use this utility, it would clear out the data, but it would not remove the kernel. So could I use this utility while having a GB (EL29) kernel installed, and then flash a GB ROM?
The purpose of this utility is to simulate the wipe data/factory reset option in Recovery using ODIN. The reason I put it together is there is a change in the ICS kernel where wipe data/factory reset does an mmc_erase(). This in turns triggers a bug in the EMMC firmware which could lead to your phone superbricking.

Wipe data/factory reset in Recovery will reset /cache and /data. It won't touch your SD card. This utility does the same, but does it in a safe manner that won't trigger the EMMC lockup/superbrick situation.

Don't expect stuff in /system (ie your ROM) to be reset nor your kernel. That is not the purpose of Wipe data/factory reset in Recovery. Its purpose is to get rid of your Android user data so you start from scratch.

If you are using a GB-based kernel/recovery, you don't need this. Your kernel/recovery doesn't issue an mmc_erase() thus are safe from the EMMC lockup/superbrick.
Disclaimer: No touchscreens were harmed nor injured during the creation of this post. GPS units were all treated ethically and humanely.
Signed: People against misbehaving Nexus 7 2013s
The Following 5 Users Say Thank You to sfhub For This Useful Post: [ Click to Expand ]
 
peanut1596
Old
#8  
peanut1596's Avatar
Senior Member
Thanks Meter 189
Posts: 720
Join Date: Apr 2012
Location: SATX

 
DONATE TO ME
Anyone ever told you that you are a damn genius?


Surprise! You're a damn genius.

Sent from my SPH-D710 using XDA
The Following User Says Thank You to peanut1596 For This Useful Post: [ Click to Expand ]
 
sfhub
Old
#9  
Recognized Contributor - OP
Thanks Meter 6,837
Posts: 4,757
Join Date: Oct 2008
Quote:
Originally Posted by slick_rick View Post
No it just wipes data/cache. You'll still be on the same rom/kernel/modem, just starting "fresh"

Hey sfhub, how can we mobile Odin this from our phone again?
Here is a tar.md5 (7zip self-extractor) you can use:

SPH-D710.WIPE_CACHE_DATA-sfx.exe

Double-click on windows (or use zArchiver on Android) and it'll give you the .tar.md5
Disclaimer: No touchscreens were harmed nor injured during the creation of this post. GPS units were all treated ethically and humanely.
Signed: People against misbehaving Nexus 7 2013s
The Following 7 Users Say Thank You to sfhub For This Useful Post: [ Click to Expand ]
 
slick_rick
Old
#10  
slick_rick's Avatar
Recognized Contributor
Thanks Meter 6,201
Posts: 2,877
Join Date: Sep 2011
Location: Immokalee/Tampa FL

 
DONATE TO ME
Quote:
Originally Posted by sfhub View Post
Here is a tar.md5 (7zip self-extractor) you can use:

SPH-D710.WIPE_CACHE_DATA-sfx.exe

Double-click on windows (or use zArchiver on Android) and it'll give you the .tar.md5
Thank you I was looking for the name of that app. Awesome work as usual.

Sent from my SPH-D710 using Tapatalk
I don't answer rom support questions through PM! You will be ignored! Post your question in the relevant thread instead.

The Following User Says Thank You to slick_rick For This Useful Post: [ Click to Expand ]
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes