After many searches, I finally finished downloading the source code for the Android recovery partition. It turns out you can send recovery commands.
* The arguments which may be supplied in the recovery.command file: * --send_intent=anystring - write the text out to recovery.intent * --update_package=path - verify install an OTA package file * --wipe_data - erase user data (and cache), then reboot * --wipe_cache - wipe cache (but not user data), then reboot * --set_encrypted_filesystem=on|off - enables / diasables encrypted fs
These are commands that you can use according to the one I found, but which may differ for modified files. Therefore, using adb, you can do this:
adb shell recovery --wipe_data
Using --wipe_data seemed to do what I was looking for, which was convenient, although I have not yet fully tested it at the moment.
EDIT:
For those still using this section, these commands may vary depending on which recovery you are using. If you use temporary word recovery, these commands should still work. Other commands can be found in / cache / recovery / command
For more information see here: https://github.com/CyanogenMod/android_bootable_recovery/blob/cm-10.2/recovery.c
Daniel Edwards May 31 '12 at 8:02 2012-05-31 08:02
source share