OSDN Git Service

Enable ADB by default when ro.adb.secure is not 1
authorScott Mertz <scott@cyngn.com>
Thu, 26 Feb 2015 18:51:44 +0000 (10:51 -0800)
committerSteve Kondik <steve@cyngn.com>
Sun, 4 Sep 2016 04:47:36 +0000 (21:47 -0700)
* Property ro.build.type is not part of the default.prop we can't
  use this to decide how to apply adb by default within this function

Change-Id: Ib3eb24c655353966d64c7148d7530244b628ce94

tools/post_process_props.py

index 55491d3..940dd9b 100755 (executable)
@@ -40,8 +40,9 @@ def mangle_build_prop(prop, overrides):
 # Put the modifications that you need to make into the /default.prop into this
 # function. The prop object has get(name) and put(name,value) methods.
 def mangle_default_prop(prop):
-  # If ro.build.type is eng, then enable adb on USB by default
-  if prop.get("ro.build.type") == "eng":
+  # If ro.adb.secure is not 1, then enable adb on USB by default
+  # (this is for eng builds)
+  if prop.get("ro.adb.secure") != "1":
     val = prop.get("persist.sys.usb.config")
     if "adb" not in val:
       if val == "":