aboutsummaryrefslogtreecommitdiffstats
path: root/tools/post_process_props.py
diff options
context:
space:
mode:
authorJerry Zhang <zhangjerry@google.com>2016-10-18 00:01:27 +0000
committerJerry Zhang <zhangjerry@google.com>2016-10-18 00:01:27 +0000
commit1695653bb2aa1acac3162a25b7df1cf0f8427546 (patch)
treefcbb25cad74c5bfa5b5e95b417819ea7907f8c84 /tools/post_process_props.py
parent3c51c2bc487e6dd68fe586aba01ceb5f55e44671 (diff)
downloadbuild_make-1695653bb2aa1acac3162a25b7df1cf0f8427546.tar.gz
build_make-1695653bb2aa1acac3162a25b7df1cf0f8427546.tar.bz2
build_make-1695653bb2aa1acac3162a25b7df1cf0f8427546.zip
Revert "Remove automatic adding of adb into default.prop"
This reverts commit 3c51c2bc487e6dd68fe586aba01ceb5f55e44671. Bug: 32223614 Change-Id: I1addc93b175e9442d9fc2f5e7a557fe818201a27
Diffstat (limited to 'tools/post_process_props.py')
-rwxr-xr-xtools/post_process_props.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/tools/post_process_props.py b/tools/post_process_props.py
index 6916faf1c3..9dcaadfd0d 100755
--- a/tools/post_process_props.py
+++ b/tools/post_process_props.py
@@ -33,6 +33,16 @@ def mangle_build_prop(prop):
# 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.debuggable is 1, then enable adb on USB by default
+ # (this is for userdebug builds)
+ if prop.get("ro.debuggable") == "1":
+ val = prop.get("persist.sys.usb.config")
+ if "adb" not in val:
+ if val == "":
+ val = "adb"
+ else:
+ val = val + ",adb"
+ prop.put("persist.sys.usb.config", val)
# UsbDeviceManager expects a value here. If it doesn't get it, it will
# default to "adb". That might not the right policy there, but it's better
# to be explicit.