Loading etc/init.rc +4 −0 Original line number Diff line number Diff line Loading @@ -99,6 +99,10 @@ on property:service.adb.root=1 on fs && property:ro.debuggable=1 setprop sys.usb.config adb # Also start adbd on user build with an unlocked bootloader on fs && property:ro.debuggable=0 && androidboot.verifiedbootstate=orange setprop sys.usb.config adb on fs && property:sys.usb.configfs=1 mount configfs none /config mkdir /config/usb_gadget/g1 0770 shell shell Loading recovery_main.cpp +7 −1 Original line number Diff line number Diff line Loading @@ -69,6 +69,10 @@ static bool IsRoDebuggable() { return android::base::GetBoolProperty("ro.debuggable", false); } static bool IsDeviceUnlocked() { return "orange" == android::base::GetProperty("ro.boot.verifiedbootstate", ""); } static void UiLogger(android::base::LogId /* id */, android::base::LogSeverity severity, const char* /* tag */, const char* /* file */, unsigned int /* line */, const char* message) { Loading Loading @@ -463,7 +467,9 @@ int main(int argc, char** argv) { listener_thread.detach(); while (true) { std::string usb_config = fastboot ? "fastboot" : IsRoDebuggable() ? "adb" : "none"; // We start adbd in recovery for the device with userdebug build or a unlocked bootloader. std::string usb_config = fastboot ? "fastboot" : IsRoDebuggable() || IsDeviceUnlocked() ? "adb" : "none"; std::string usb_state = android::base::GetProperty("sys.usb.state", "none"); if (usb_config != usb_state) { if (!SetUsbConfig("none")) { Loading Loading
etc/init.rc +4 −0 Original line number Diff line number Diff line Loading @@ -99,6 +99,10 @@ on property:service.adb.root=1 on fs && property:ro.debuggable=1 setprop sys.usb.config adb # Also start adbd on user build with an unlocked bootloader on fs && property:ro.debuggable=0 && androidboot.verifiedbootstate=orange setprop sys.usb.config adb on fs && property:sys.usb.configfs=1 mount configfs none /config mkdir /config/usb_gadget/g1 0770 shell shell Loading
recovery_main.cpp +7 −1 Original line number Diff line number Diff line Loading @@ -69,6 +69,10 @@ static bool IsRoDebuggable() { return android::base::GetBoolProperty("ro.debuggable", false); } static bool IsDeviceUnlocked() { return "orange" == android::base::GetProperty("ro.boot.verifiedbootstate", ""); } static void UiLogger(android::base::LogId /* id */, android::base::LogSeverity severity, const char* /* tag */, const char* /* file */, unsigned int /* line */, const char* message) { Loading Loading @@ -463,7 +467,9 @@ int main(int argc, char** argv) { listener_thread.detach(); while (true) { std::string usb_config = fastboot ? "fastboot" : IsRoDebuggable() ? "adb" : "none"; // We start adbd in recovery for the device with userdebug build or a unlocked bootloader. std::string usb_config = fastboot ? "fastboot" : IsRoDebuggable() || IsDeviceUnlocked() ? "adb" : "none"; std::string usb_state = android::base::GetProperty("sys.usb.state", "none"); if (usb_config != usb_state) { if (!SetUsbConfig("none")) { Loading