Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,729,489 Members 45,661 Now Online
XDA Developers Android and Mobile Development Forum

Clear Cache and Data from Stock Recovery

Tip us?
 
K J Rad
Old
(Last edited by K J Rad; 4th May 2011 at 02:44 PM.) Reason: New Information
#1  
Senior Member - OP
Thanks Meter 97
Posts: 479
Join Date: Jan 2011
Default Clear Cache and Data from Stock Recovery

I've seen a number of requests for this functionality and recently it became necessary for one user who had a disabled Home Key to clear cache and data without the use of ClockworkMod. I have reserached two methods to address this issue. These instructions require some familiarity of android, computer and tablet terminology and usage. Feel free to ask for clarifications in comments. Here we go...

Method I - Stock Recovery Command File

Technical: Stock Recovery command file can be used to perform a few additional functions as well as to alter the path to update files. These commands will execute with all privileges available to recovery mode.

Advantages: Very easy to use. Very little technical knowledge required. No third party software is required for use.

Prerequisites: You will need a MicroSD card formatted FAT32 and a method for transferring files from your computer to the MicroSD.

Usage:

1) Prepare a text file named "command" (no file extension) with one of the following commands on a single line. The wipe data command will wipe both data and cache. Wipe cache will wipe cache only.

--wipe_data
--wipe_cache

2) Place the file in a folder named "recovery" in the root directory of your MicroSD card.
3) From a powered down state, insert the MicroSD card into your tablet and boot into recovery by powering it on while holding down the Volume Up key.
4) Allow the command to execute completely then the tablet should reboot (this may not occur automatically depending on firmware installed).

Method II - Updater Script

Technical: The attached "Updater Scripts" perform delete commands (recursively if necessary) on the named directory or file(s). The directories are mounted automatically by the system before the script executes but it could be easily revised to include that step if necessary. The partitioning, formatting and directory structure are left untouched. Only files are deleted.

Advantages: No third party software is necessary for execution. Relatively easy to modify for more surgical precision (i.e. leaving installed apps but clearing possibly corrupted system data). Included example: "Clear Battery Stats"

Prerequisites: You will need a MicroSD card formatted FAT32 and a method for transferring files from your computer to the MicroSD.

Usage:

1) Download the attached archive (ClearData.zip) to your computer.
2) Extract the files to your computer. You should then have a folder named "recovery" (which contains a file named "command") and an additional archive named "update.zip"
3) Place the recovery folder and the update.zip in the root directory of the MicroSD card.
4) From a powered down state, insert the MicroSD card into your tablet and boot into recovery by powering it on while holding down the Volume Up key.
5) Allow the script to execute completely then reboot the tablet (this may occur automatically depending on firmware installed).
Attached Files
File Type: zip Clear Cache.zip - [Click for QR Code] (160.9 KB, 136 views)
File Type: zip Wipe Data.zip - [Click for QR Code] (160.9 KB, 136 views)
File Type: zip Clear Cache and Data.zip - [Click for QR Code] (161.0 KB, 202 views)
File Type: zip Clear Battery Stats.zip - [Click for QR Code] (161.0 KB, 70 views)
The Following 8 Users Say Thank You to K J Rad For This Useful Post: [ Click to Expand ]
 
mydave1
Old
#2  
mydave1's Avatar
Senior Member
Thanks Meter 35
Posts: 198
Join Date: Mar 2011
This will become handy someday.
Thanks for sharing your knowledge.
 
K J Rad
Old
#3  
Senior Member - OP
Thanks Meter 97
Posts: 479
Join Date: Jan 2011
You're welcome. One quick note... the new stock recovery adds a menu simiilar to ClockworkMod. These methods will still work since the recovery folder/command file are checked first but it really isn't as necessary any more.
 
lrgche
Old
#4  
Junior Member
Thanks Meter 0
Posts: 7
Join Date: Apr 2011
Default Need Help

Tried both methods above but either way I get to the viewsonic splash with the message "Booting recovery kernel image" in the upper left and it just stays there, stuck there, I left it for a long time to see and it never leaves that screen.

Any ideas?
 
Loukoebel
Old
#5  
Junior Member
Thanks Meter 0
Posts: 1
Join Date: Apr 2011
Default Me too

I can't get into clockworkmod either. My machine is running faster. I almost hate to mess it more.
 
K J Rad
Old
(Last edited by K J Rad; 16th April 2011 at 11:51 PM.)
#6  
Senior Member - OP
Thanks Meter 97
Posts: 479
Join Date: Jan 2011
Quote:
Originally Posted by lrgche View Post
Tried both methods above but either way I get to the viewsonic splash with the message "Booting recovery kernel image" in the upper left and it just stays there, stuck there, I left it for a long time to see and it never leaves that screen.

Any ideas?
That's an indication that you may have more serious problems. nvflash will be required. http://forum.xda-developers.com/showthread.php?t=861950

Once done you will likely need to install ClockworkMod and repartition your internal storage.

Quote:
Originally Posted by Loukoebel View Post
I can't get into clockworkmod either. My machine is running faster. I almost hate to mess it more.
If your tablet boots properly but you can't get into CWM then it probably isn't installed properly (or at all). http://forum.xda-developers.com/showthread.php?t=865245

Keep in mind that CWM is NOT compatible with all ROMs. Make sure the developer for your chosen ROM recommends it before installing it.
 
lsu205
Old
#7  
Senior Member
Thanks Meter 6
Posts: 150
Join Date: Dec 2010
Does your method in opening post have to be run from external micro sdcard?
 
K J Rad
Old
#8  
Senior Member - OP
Thanks Meter 97
Posts: 479
Join Date: Jan 2011
Both methods are performed with an external MicroSD card. They will work from internal also but it is a little more difficult to get the files in place if your tablet is not booting properly.
 
lsu205
Old
#9  
Senior Member
Thanks Meter 6
Posts: 150
Join Date: Dec 2010
Quote:
Originally Posted by K J Rad View Post
Both methods are performed with an external MicroSD card. They will work from internal also but it is a little more difficult to get the files in place if your tablet is not booting properly.
so your method is a simple way to replace one of the main uses of Clockword MOD?--Plus you stay stock more or less.
 
K J Rad
Old
#10  
Senior Member - OP
Thanks Meter 97
Posts: 479
Join Date: Jan 2011
That is correct. Method II can also be modified to be less intrusive (leave user apps installed) or embedded into update scripts to perform a wipe during new ROM installs.

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


XDA PORTAL POSTS

Remove Unnecessary WhatsApp Elements with Xposed

In modern life, you can’t underestimate the power ofthe dark sidemessaging … more

MaR-V-iN to Talk Google and Android APIs at XDA:DevCon 2014

Our international xda:devcon 14in Manchester, UK on the weekend of September … more