adb: Add ro.adb.secure.recovery handling
Change-Id: I9c68b70381c10fbec17363f4b0392c032d22dbe8
diff --git a/adb/daemon/main.cpp b/adb/daemon/main.cpp
index 7a0f7ff..1e33128 100644
--- a/adb/daemon/main.cpp
+++ b/adb/daemon/main.cpp
@@ -217,6 +217,12 @@
if (__android_log_is_debuggable() || device_unlocked) {
auth_required = android::base::GetBoolProperty("ro.adb.secure", false);
}
+#if defined(__ANDROID_RECOVERY__)
+ if (android::base::GetProperty("ro.build.type", "") == "userdebug") {
+ auth_required = auth_required &&
+ android::base::GetBoolProperty("ro.adb.secure.recovery", true);
+ }
+#endif
#endif
// Our external storage path may be different than apps, since