/bootable/recovery/ H A D recovery.cpp 96 { "prompt_and_wipe_data", no_argument, NULL, 0 }, 149 * --prompt_and_wipe_data - prompt the user that data is corrupt, 764 static bool prompt_and_wipe_data(Device* device) { function 1486 } else if (option == "prompt_and_wipe_data") { 1631 if (!prompt_and_wipe_data(device)) { /system/core/init/ H A D builtins.cpp 263 "--prompt_and_wipe_data", /frameworks/base/core/java/android/os/ H A D RecoverySystem.java 902 bootCommand(context, null, "--prompt_and_wipe_data", reasonArg, localeArg);
staticvoidcopy_logs(){ // Always write to pmsg, this allows the OTA logs to be caught in logcat -L copy_log_file_to_pmsg(TEMPORARY_LOG_FILE, LAST_LOG_FILE); copy_log_file_to_pmsg(TEMPORARY_INSTALL_FILE, LAST_INSTALL_FILE);
// We can do nothing for now if there's no /cache partition. if (!has_cache) { return; }
// Copy logs to cache so the system can find out what happened. copy_log_file(TEMPORARY_LOG_FILE, LOG_FILE, true); copy_log_file(TEMPORARY_LOG_FILE, LAST_LOG_FILE, false); copy_log_file(TEMPORARY_INSTALL_FILE, LAST_INSTALL_FILE, false); save_kernel_log(LAST_KMSG_FILE);
cache: The cache partition stores temporary data and is optional if a device uses A/B updates. The cache partition doesn’t need to be writable from the bootloader, only erasable. The size depends on the device type and the availability of space on userdata. Currently 50MB-100MB should be ok.
recovery-refresh and recovery-persist executables exist only on systems without /cache partition. And we need to follow special steps to run tests for them.