Home | History | Annotate | Download | only in recovery

Lines Matching refs:recovery

68 #define LAST_LOG_FILE "/cache/recovery/last_log"
70 static const char *CACHE_LOG_DIR = "/cache/recovery";
71 static const char *COMMAND_FILE = "/cache/recovery/command";
72 static const char *INTENT_FILE = "/cache/recovery/intent";
73 static const char *LOG_FILE = "/cache/recovery/log";
74 static const char *LAST_INSTALL_FILE = "/cache/recovery/last_install";
75 static const char *LOCALE_FILE = "/cache/recovery/last_locale";
78 static const char *TEMPORARY_LOG_FILE = "/tmp/recovery.log";
80 static const char *LAST_KMSG_FILE = "/cache/recovery/last_kmsg";
95 * The recovery tool communicates with the main system through /cache files.
96 * /cache/recovery/command - INPUT - command line for tool, one arg per line
97 * /cache/recovery/log - OUTPUT - combined log file from recovery run(s)
98 * /cache/recovery/intent - OUTPUT - intent that was passed in
100 * The arguments which may be supplied in the recovery.command file:
101 * --send_intent=anystring - write the text out to recovery.intent
108 * After completing, we remove /cache/recovery/command and reboot.
114 * 2. main system writes "--wipe_data" to /cache/recovery/command
115 * 3. main system reboots into recovery
116 * 4. get_args() writes BCB with "boot-recovery" and "--wipe_data"
127 * 3. main system reboots into recovery
128 * 4. get_args() writes BCB with "boot-recovery" and "--update_package=..."
139 * 8a. m_i_f_u() writes BCB with "boot-recovery" and "--wipe_cache"
145 * 8e. bootloader writes BCB with "boot-recovery" (keeping "--wipe_cache")
188 // - the bootloader control block (one per line, after "recovery")
207 boot.recovery[sizeof(boot.recovery) - 1] = '\0'; // Ensure termination
208 const char *arg = strtok(boot.recovery, "\n");
209 if (arg != NULL && !strcmp(arg, "recovery")) {
217 } else if (boot.recovery[0] != 0 && boot.recovery[0] != 255) {
218 LOGE("Bad boot message\n\"%.20s\"\n", boot.recovery);
248 // always boot into recovery after this (until finish_recovery() is called)
249 strlcpy(boot.command, "boot-recovery", sizeof(boot.command));
250 strlcpy(boot.recovery, "recovery\n", sizeof(boot.recovery));
253 strlcat(boot.recovery, (*argv)[i], sizeof(boot.recovery));
254 strlcat(boot.recovery, "\n", sizeof(boot.recovery));
263 strlcpy(boot.command, "boot-recovery", sizeof(boot.command));
264 strlcpy(boot.recovery, "recovery\n", sizeof(boot.recovery));
363 // clear the recovery command and prepare to boot a (hopefully working) system,
380 // Save the locale to cache, so if recovery is next started up
394 // Reset to normal system boot so recovery won't cycle indefinitely.
399 // Remove the command file, so recovery won't repeat indefinitely.
427 // "/cache/recovery/last*" files into memory, so we can restore
510 *(h++) = "Android system recovery <" EXPAND(RECOVERY_API_VERSION) "e>";
824 // on if the --shutdown_after flag was passed to recovery.
988 // instead of being the normal recovery binary, it turns into kind
992 // only way recovery should be run with this argument is when it
999 printf("Starting recovery (pid %d) on %s", getpid(), ctime(&start));