Revert "Remove automatic adding of adb into default.prop"
This reverts commit 3c51c2bc48
.
Bug: 32223614
Change-Id: I1addc93b175e9442d9fc2f5e7a557fe818201a27
This commit is contained in:
parent
3c51c2bc48
commit
1695653bb2
1 changed files with 10 additions and 0 deletions
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue