Home | History | Annotate | Download | only in recovery

Lines Matching full:recovery

98 static const char *CACHE_LOG_DIR = "/cache/recovery";
99 static const char *COMMAND_FILE = "/cache/recovery/command";
100 static const char *INTENT_FILE = "/cache/recovery/intent";
101 static const char *LOG_FILE = "/cache/recovery/log";
102 static const char *LAST_INSTALL_FILE = "/cache/recovery/last_install";
103 static const char *LOCALE_FILE = "/cache/recovery/last_locale";
109 static const char *TEMPORARY_LOG_FILE = "/tmp/recovery.log";
111 static const char *LAST_KMSG_FILE = "/cache/recovery/last_kmsg";
112 static const char *LAST_LOG_FILE = "/cache/recovery/last_log";
117 // GmsCore enters recovery mode to install package when having enough battery
122 constexpr const char* RECOVERY_WIPE = "/etc/recovery.wipe";
132 * The recovery tool communicates with the main system through /cache files.
133 * /cache/recovery/command - INPUT - command line for tool, one arg per line
134 * /cache/recovery/log - OUTPUT - combined log file from recovery run(s)
135 * /cache/recovery/intent - OUTPUT - intent that was passed in
137 * The arguments which may be supplied in the recovery.command file:
138 * --send_intent=anystring - write the text out to recovery.intent
145 * After completing, we remove /cache/recovery/command and reboot.
151 * 2. main system writes "--wipe_data" to /cache/recovery/command
152 * 3. main system reboots into recovery
153 * 4. get_args() writes BCB with "boot-recovery" and "--wipe_data"
164 * 3. main system reboots into recovery
165 * 4. get_args() writes BCB with "boot-recovery" and "--update_package=..."
176 * 8a. m_i_f_u() writes BCB with "boot-recovery" and "--wipe_cache"
182 * 8e. bootloader writes BCB with "boot-recovery" (keeping "--wipe_cache")
308 // - the bootloader control block (one per line, after "recovery")
331 boot.recovery[sizeof(boot.recovery) - 1] = '\0'; // Ensure termination
332 const char *arg = strtok(boot.recovery, "\n");
333 if (arg != NULL && !strcmp(arg, "recovery")) {
341 } else if (boot.recovery[0] != 0 && boot.recovery[0] != 255) {
342 LOGE("Bad boot message\n\"%.20s\"\n", boot.recovery);
372 // always boot into recovery after this (until finish_recovery() is called)
373 strlcpy(boot.command, "boot-recovery", sizeof(boot.command));
374 strlcpy(boot.recovery, "recovery\n", sizeof(boot.recovery));
377 strlcat(boot.recovery, (*argv)[i], sizeof(boot.recovery));
378 strlcat(boot.recovery, "\n", sizeof(boot.recovery));
388 strlcpy(boot.command, "boot-recovery", sizeof(boot.command));
389 strlcpy(boot.recovery, "recovery\n", sizeof(boot.recovery));
518 // clear the recovery command and prepare to boot a (hopefully working) system,
535 // Save the locale to cache, so if recovery is next started up
553 // Reset to normal system boot so recovery won't cycle indefinitely.
560 // Remove the command file, so recovery won't repeat indefinitely.
589 // (i.e. "/cache/recovery/last_*") and the current log
590 // ("/cache/recovery/log") into memory, so we can restore them after
1055 // If cache partition is not found, view /tmp/recovery.log instead.
1192 // on if the --shutdown_after flag was passed to recovery.
1395 strlcpy(boot.command, "boot-recovery", sizeof(boot.command));
1396 strlcpy(boot.recovery, "recovery\n", sizeof(boot.recovery));
1400 strlcat(boot.recovery, argv[i], sizeof(boot.recovery));
1401 strlcat(boot.recovery, "\n", sizeof(boot.recovery));
1407 strlcat(boot.recovery, "--retry_count=1\n", sizeof(boot.recovery));
1411 strlcat(boot.recovery, buffer, sizeof(boot.recovery));
1498 static const char filter[] = "recovery/";
1510 // instead of being the normal recovery binary, it turns into kind
1514 // only way recovery should be run with this argument is when it
1527 printf("Starting recovery (pid %d) on %s", getpid(), ctime(&start));
1693 int ret = property_set(ANDROID_RB_PROPERTY, "reboot,recovery");