Wipe data/factory reset from ODIN

Search This thread

sfhub

Senior Member
Oct 23, 2008
5,350
7,231
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.
 
Last edited:

Esoteric68

Senior Member
Jun 9, 2011
2,979
1,442
Hellabama
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!
 

tenazrael

Senior Member
Nov 16, 2010
103
39
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?
 
Last edited:

ajonesma

Senior Member
Jun 29, 2010
309
33
Detroit
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.
 

sfhub

Senior Member
Oct 23, 2008
5,350
7,231
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.
 
Last edited:

sfhub

Senior Member
Oct 23, 2008
5,350
7,231

DataHawg

Senior Member
Aug 26, 2010
1,610
768
East Seattle
Excellent indeed. Never used Zarchiver before but I installed it and extracted the MD5 tar for future use. Can't wait for another leak to try it with Mobile Odin. Thanks sfhub
 

locoboi187

Senior Member
Aug 5, 2010
2,053
253
Thanks sfhub. Can someone upload the tar version for those who do not have access to a computer? Just wanna mobile Odin haha

Sent from my SPH-D710 using xda premium
 

sjsharksfan420

Senior Member
Dec 16, 2011
3,139
847
www.interwebsource.com
So, I have been reading around that mobile Odin is not safe to use on the e4gt when on an ICS based kernel (of all flavors), now is this to reference in using MO to flash entire roms? Or kernels too? I have been using MOpro to flash EL26/cwr5 kernel when needing to run nandroid or get back to GB..

Should I be using the pc version instead? I would hate to think that I have just been lucky every time I've used it to flash a kernel.. :/

sj

Sent from my SGS2 Epic 4G Touch on AoKPm5 FE22 OS4.0.4 with dpi @ 128 using Tap@Talk 2.1.1 Pro
 
Last edited:

sfhub

Senior Member
Oct 23, 2008
5,350
7,231
It should be ok to flash kernels as I don't believe they would be calling make_ext4s() (the problem call in ICS-based kernels) for installing kernels.

For /system /data /cache don't know what code path they would be eliciting so can't say for sure.
 
  • Like
Reactions: sjsharksfan420

Top Liked Posts

  • There are no posts matching your filters.
  • 67
    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.
    7
    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
    5
    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.
    3
    My sentiments exactly. So SF, can thus be used in between flashing ROMS with mobile odin/ Odin?
    I cannot tell you for sure how it will work with Mobile ODIN unless I look through the source code.

    After examining the problem code for Recovery, it appears the code that is causing issues is in the libext4_utils.a library. If Mobile ODIN links against an ICS-based version of libext4_utils.a, then it is susceptible to the problem. If not (or it never calls make_ext4fs()), then it is probably safe.

    I will say however, that the purpose is to simulate wipe data/factory restore, not necessarily for the purposes of flashing a ROM, but rather to reset your Android user data. Wipe data/factory restore isn't exactly geared for ROM installs because it leaves /system untouched, which you probably want reset for ROM flashing.
    2
    Thanks sfhub. Can someone upload the tar version for those who do not have access to a computer? Just wanna mobile Odin haha

    Sent from my SPH-D710 using xda premium

    You don't need access to a computer. I did what sfhub said. Downloaded Zarchiver from Market. Opened zarchiver, navigated to the exe file I downloaded onto my phone from the OP, long pressed the exe file, and selected "extract here." The tar.MD5 file was created on my external sd card. Mine shows up in Mobile Odin as a flashable file but I haven't tested it out yet. You're welcome to the file I created, but probably safer to do it yourself in case of a bad upload or download with dropbox.
    http://db.tt/XER4pAjp