diff options
author | Bowgo Tsai <bowgotsai@google.com> | 2019-04-19 22:08:56 +0800 |
---|---|---|
committer | Bowgo Tsai <bowgotsai@google.com> | 2019-04-23 11:13:46 +0800 |
commit | 6386c3207b335bd587e145c231c38ee98135847e (patch) | |
tree | 5cba72431ac3ed7d29dbec5e36e7df5ecfc79af4 /rootdir | |
parent | 1b2d56be187d442cd5fe3f078183972069e3ca1b (diff) | |
download | system_core-6386c3207b335bd587e145c231c38ee98135847e.tar.gz system_core-6386c3207b335bd587e145c231c38ee98135847e.tar.bz2 system_core-6386c3207b335bd587e145c231c38ee98135847e.zip |
Adding adb_debug.prop into debug ramdisk
The debug ramdisk can only be used if the device is unlocked.
When it's used, init will load adb_debug.prop and the userdebug
sepolicy from the debug ramdisk, to allow adb root on a user build.
Bug: 126493225
Test: 'make' and checks the file is installed
Change-Id: Id6962414197fc8f47f7c07818e8fb16107dc17a3
Merged-In: Id6962414197fc8f47f7c07818e8fb16107dc17a3
(cherry picked from commit 05f07d89a6b44eef1fcec020bf9020a3429fc3ad)
Diffstat (limited to 'rootdir')
-rw-r--r-- | rootdir/Android.mk | 9 | ||||
-rw-r--r-- | rootdir/adb_debug.prop | 12 |
2 files changed, 21 insertions, 0 deletions
diff --git a/rootdir/Android.mk b/rootdir/Android.mk index a97858a93..7ff1588b2 100644 --- a/rootdir/Android.mk +++ b/rootdir/Android.mk @@ -377,4 +377,13 @@ $(LOCAL_BUILT_MODULE): $(hide) $(foreach lib,$(PRIVATE_VNDK_SAMEPROCESS_LIBRARIES), \ echo $(lib).so >> $@;) +####################################### +# adb_debug.prop in debug ramdisk +include $(CLEAR_VARS) +LOCAL_MODULE := adb_debug.prop +LOCAL_SRC_FILES := $(LOCAL_MODULE) +LOCAL_MODULE_CLASS := ETC +LOCAL_MODULE_PATH := $(TARGET_DEBUG_RAMDISK_OUT) +include $(BUILD_PREBUILT) + include $(call all-makefiles-under,$(LOCAL_PATH)) diff --git a/rootdir/adb_debug.prop b/rootdir/adb_debug.prop new file mode 100644 index 000000000..37e2f2d71 --- /dev/null +++ b/rootdir/adb_debug.prop @@ -0,0 +1,12 @@ +# Note: This file will be loaded with highest priority to override +# other system properties, if a special ramdisk with "/force_debuggable" +# is used and the device is unlocked. + +# Disable adb authentication to allow test automation on user build GSI +ro.adb.secure=0 + +# Allow 'adb root' on user build GSI +ro.debuggable=1 + +# Introduce this property to indicate that init has loaded adb_debug.prop +ro.force.debuggable=1 |