Merge "Grant adb auth under recovery for unlocked & userdebug devices"

This commit is contained in:
Tianjie Xu 2019-11-05 21:37:07 +00:00 committed by Gerrit Code Review
commit 7cfb77ed8d

View file

@ -205,7 +205,11 @@ int adbd_main(int server_port) {
// descriptor will always be open.
adbd_cloexec_auth_socket();
#if defined(ALLOW_ADBD_NO_AUTH)
#if defined(__ANDROID_RECOVERY__)
if (is_device_unlocked() || __android_log_is_debuggable()) {
auth_required = false;
}
#elif defined(ALLOW_ADBD_NO_AUTH)
// If ro.adb.secure is unset, default to no authentication required.
auth_required = android::base::GetBoolProperty("ro.adb.secure", false);
#elif defined(__ANDROID__)