Merge "uncrypt: Retire pre-recovery service." into nyc-dev
am: 65f35b5c35
* commit '65f35b5c3513571c179974829eb93ba069693d2b':
uncrypt: Retire pre-recovery service.
This commit is contained in:
+1
-13
@@ -406,15 +406,6 @@ static int write_bootloader_message(const bootloader_message* in) {
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void reboot_to_recovery() {
|
|
||||||
ALOGI("rebooting to recovery");
|
|
||||||
property_set("sys.powerctl", "reboot,recovery");
|
|
||||||
while (true) {
|
|
||||||
pause();
|
|
||||||
}
|
|
||||||
ALOGE("reboot didn't succeed?");
|
|
||||||
}
|
|
||||||
|
|
||||||
static int uncrypt(const char* input_path, const char* map_file, int status_fd) {
|
static int uncrypt(const char* input_path, const char* map_file, int status_fd) {
|
||||||
|
|
||||||
ALOGI("update package is \"%s\"", input_path);
|
ALOGI("update package is \"%s\"", input_path);
|
||||||
@@ -543,7 +534,6 @@ static int read_bcb() {
|
|||||||
static void usage(const char* exename) {
|
static void usage(const char* exename) {
|
||||||
fprintf(stderr, "Usage of %s:\n", exename);
|
fprintf(stderr, "Usage of %s:\n", exename);
|
||||||
fprintf(stderr, "%s [<package_path> <map_file>] Uncrypt ota package.\n", exename);
|
fprintf(stderr, "%s [<package_path> <map_file>] Uncrypt ota package.\n", exename);
|
||||||
fprintf(stderr, "%s --reboot Clear BCB data and reboot to recovery.\n", exename);
|
|
||||||
fprintf(stderr, "%s --clear-bcb Clear BCB data in misc partition.\n", exename);
|
fprintf(stderr, "%s --clear-bcb Clear BCB data in misc partition.\n", exename);
|
||||||
fprintf(stderr, "%s --setup-bcb Setup BCB data by command file.\n", exename);
|
fprintf(stderr, "%s --setup-bcb Setup BCB data by command file.\n", exename);
|
||||||
fprintf(stderr, "%s --read-bcb Read BCB data from misc partition.\n", exename);
|
fprintf(stderr, "%s --read-bcb Read BCB data from misc partition.\n", exename);
|
||||||
@@ -551,9 +541,7 @@ static void usage(const char* exename) {
|
|||||||
|
|
||||||
int main(int argc, char** argv) {
|
int main(int argc, char** argv) {
|
||||||
if (argc == 2) {
|
if (argc == 2) {
|
||||||
if (strcmp(argv[1], "--reboot") == 0) {
|
if (strcmp(argv[1], "--clear-bcb") == 0) {
|
||||||
reboot_to_recovery();
|
|
||||||
} else if (strcmp(argv[1], "--clear-bcb") == 0) {
|
|
||||||
return clear_bcb(STATUS_FILE);
|
return clear_bcb(STATUS_FILE);
|
||||||
} else if (strcmp(argv[1], "--setup-bcb") == 0) {
|
} else if (strcmp(argv[1], "--setup-bcb") == 0) {
|
||||||
return setup_bcb(COMMAND_FILE, STATUS_FILE);
|
return setup_bcb(COMMAND_FILE, STATUS_FILE);
|
||||||
|
|||||||
+1
-6
@@ -3,11 +3,6 @@ service uncrypt /system/bin/uncrypt
|
|||||||
disabled
|
disabled
|
||||||
oneshot
|
oneshot
|
||||||
|
|
||||||
service pre-recovery /system/bin/uncrypt --reboot
|
|
||||||
class main
|
|
||||||
disabled
|
|
||||||
oneshot
|
|
||||||
|
|
||||||
service setup-bcb /system/bin/uncrypt --setup-bcb
|
service setup-bcb /system/bin/uncrypt --setup-bcb
|
||||||
class main
|
class main
|
||||||
disabled
|
disabled
|
||||||
@@ -16,4 +11,4 @@ service setup-bcb /system/bin/uncrypt --setup-bcb
|
|||||||
service clear-bcb /system/bin/uncrypt --clear-bcb
|
service clear-bcb /system/bin/uncrypt --clear-bcb
|
||||||
class main
|
class main
|
||||||
disabled
|
disabled
|
||||||
oneshot
|
oneshot
|
||||||
|
|||||||
Reference in New Issue
Block a user