diff options
Diffstat (limited to 'adb_install.cpp')
-rw-r--r-- | adb_install.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/adb_install.cpp b/adb_install.cpp index be3b9a063..ebd4cac00 100644 --- a/adb_install.cpp +++ b/adb_install.cpp @@ -30,10 +30,8 @@ #include "install.h" #include "common.h" #include "adb_install.h" -extern "C" { #include "minadbd/fuse_adb_provider.h" #include "fuse_sideload.h" -} static RecoveryUI* ui = NULL; @@ -61,9 +59,7 @@ stop_adbd() { static void maybe_restart_adbd() { - char value[PROPERTY_VALUE_MAX+1]; - int len = property_get("ro.debuggable", value, NULL); - if (len == 1 && value[0] == '1') { + if (is_ro_debuggable()) { ui->Print("Restarting adbd...\n"); set_usb_driver(true); property_set("ctl.start", "adbd"); @@ -75,7 +71,9 @@ maybe_restart_adbd() { #define ADB_INSTALL_TIMEOUT 300 int -apply_from_adb(RecoveryUI* ui_, int* wipe_cache, const char* install_file) { +apply_from_adb(RecoveryUI* ui_, bool* wipe_cache, const char* install_file) { + modified_flash = true; + ui = ui_; stop_adbd(); @@ -109,7 +107,7 @@ apply_from_adb(RecoveryUI* ui_, int* wipe_cache, const char* install_file) { sleep(1); continue; } else { - ui->Print("\nTimed out waiting for package.\n\n", strerror(errno)); + ui->Print("\nTimed out waiting for package.\n\n"); result = INSTALL_ERROR; kill(child, SIGKILL); break; |