Loading adb_install.cpp +1 −3 Original line number Diff line number Diff line Loading @@ -61,9 +61,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"); Loading common.h +3 −0 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ #ifndef RECOVERY_COMMON_H #define RECOVERY_COMMON_H #include <stdbool.h> #include <stdio.h> #include <stdarg.h> Loading Loading @@ -46,6 +47,8 @@ FILE* fopen_path(const char *path, const char *mode); void ui_print(const char* format, ...); bool is_ro_debuggable(); #ifdef __cplusplus } #endif Loading recovery.cpp +6 −3 Original line number Diff line number Diff line Loading @@ -161,6 +161,11 @@ fopen_path(const char *path, const char *mode) { return fp; } bool is_ro_debuggable() { char value[PROPERTY_VALUE_MAX+1]; return (property_get("ro.debuggable", value, NULL) == 1 && value[0] == '1'); } // close a file, log an error if the error indicator is set static void check_and_fclose(FILE *fp, const char *name) { Loading Loading @@ -954,9 +959,7 @@ main(int argc, char **argv) { // If this is an eng or userdebug build, then automatically // turn the text display on if the script fails so the error // message is visible. char buffer[PROPERTY_VALUE_MAX+1]; property_get("ro.build.fingerprint", buffer, ""); if (strstr(buffer, ":userdebug/") || strstr(buffer, ":eng/")) { if (is_ro_debuggable()) { ui->ShowText(true); } } Loading Loading
adb_install.cpp +1 −3 Original line number Diff line number Diff line Loading @@ -61,9 +61,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"); Loading
common.h +3 −0 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ #ifndef RECOVERY_COMMON_H #define RECOVERY_COMMON_H #include <stdbool.h> #include <stdio.h> #include <stdarg.h> Loading Loading @@ -46,6 +47,8 @@ FILE* fopen_path(const char *path, const char *mode); void ui_print(const char* format, ...); bool is_ro_debuggable(); #ifdef __cplusplus } #endif Loading
recovery.cpp +6 −3 Original line number Diff line number Diff line Loading @@ -161,6 +161,11 @@ fopen_path(const char *path, const char *mode) { return fp; } bool is_ro_debuggable() { char value[PROPERTY_VALUE_MAX+1]; return (property_get("ro.debuggable", value, NULL) == 1 && value[0] == '1'); } // close a file, log an error if the error indicator is set static void check_and_fclose(FILE *fp, const char *name) { Loading Loading @@ -954,9 +959,7 @@ main(int argc, char **argv) { // If this is an eng or userdebug build, then automatically // turn the text display on if the script fails so the error // message is visible. char buffer[PROPERTY_VALUE_MAX+1]; property_get("ro.build.fingerprint", buffer, ""); if (strstr(buffer, ":userdebug/") || strstr(buffer, ":eng/")) { if (is_ro_debuggable()) { ui->ShowText(true); } } Loading