From f14af80a1418acdc0ae6fea3da0285a357d57182 Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Tue, 10 Feb 2015 14:46:14 -0800 Subject: recovery: Properly detect userdebug or eng builds The recovery system behaves a little bit differently on userdebug or eng builds by presenting error reports to the user in the ui. This is controlled by checking the build fingerprint for the string :userdebug/ or :eng/. But with AOSP version numbers most AOSP builds blows the 92 char limit of ro.build.fingerprint and therefore the property is not set, so this condition will always be evaluated to false, for most builds. Instead of depending on the flaky ro.build.fingerprint this change uses ro.debuggable. Change-Id: I74bc00c655ac596aaf4b488ecea58f0a8de9c26b --- adb_install.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'adb_install.cpp') diff --git a/adb_install.cpp b/adb_install.cpp index be3b9a063..e3289608f 100644 --- a/adb_install.cpp +++ b/adb_install.cpp @@ -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"); -- cgit v1.2.3