bigbaicai

芯方式是以半导体人、电子工程师等电子行业相关领域从业人员为核心的知识经验学习、分享、交流社群。 凭借开放、合作、共赢的运营理念,聚集了来自国内外知名院校和顶尖科技公司的半导体人、电子工程师。 我们致力于营造专业、认真、有温度的分享交流环境,将高质量的内容和方案成规模地生产和分享,帮助个人和团队在芯方式找到有价值的Key。 http://www.icfans.com/

如何默认打开user版本的adb授权

0
阅读(242) 评论(0)

如何默认打开user版本的adb授权

芯片: SC9830, SC7731G, SC7731G, SC9820, SC9832, SC9832, SC7731C, SC7731C, SC9860, SC9860, SC9850K, SC9853i, SC9861, SC9853I, SC9853I, SR3595A, SR3595A, SC2731G, SC2731G, SC2342B,
SC2342B
分支: sprdroid6.0_kaios_16c, sprdroid6.0_trunk, sprdroid7.0_trunk_k310, sprdroid7.0_trunk_k44, sprdroid6.0_trunk_16d, sprdroid6.0_trunk_k318_dev, sprdroid6.0_trunk_16a, sprdroid7.0_trunk_k310_17a,
sprdroid7.0_trunk_k310_17a_rls1, sprdroid7.0_trunk_k44_sharkl2_cmcc_dev, sprdroid6.0_trunk_sfphone_dev, sprdroid6.0_sfphone_16c, sprdroid6.0_trunk_16b, sprdroid6.0_trunk_16b_rls2
关键字: user版本 adb
[QUESTION]
如何默认打开user版本的adb授权?
[ANSWER]
修改文件:
device/sprd/scx35l/common/device.mk
device/sprd/scx35l/common/rootdir/root/init.sc8830.usb.rc
build/core/main.mk
packages/apps/Settings/src/com/android/settings/DeviceInfoSettings.java
packages/apps/Settings/src/com/android/settings/SettingsActivity.java
frameworks/base/services/usb/java/com/android/server/usb/UsbDeviceManager.java
system/core/adb/adb_main.cpp(6.0 在adb_main.cpp文件,7.0在system/core/adb/adb/daemon/main.cpp文件修改)
芯方式修改内容:
1.device/sprd/scx35l/common/device.mk
diff --git a/common/device.mk b/common/device.mk
in
dex e3831bc..81233d1 100644
--- a/common/device.mk
+++ b/common/device.mk
@@ -202,7 +202,7 @@ ifeq ($(TARGET_BUILD_VARIANT),user)
PRODUCT_PROPERTY_OVERRIDES += \
persist.sys.sprd.modemreset=1 \
- ro.adb.secure=1 \
+ ro.adb.secure=0 \
persist.sys.sprd.wcnreset=1 \
persist.sys.apr.enabled=0 \
persist.sys.engpc.disable=1
2.device/sprd/scx35l/common/rootdir/root/init.sc8830.usb.rc
diff --git a/common/rootdir/root/init.sc8830.usb.rc b/common/rootdir/root/init.sc8830.usb.rc
in
dex e0fa883..b3ace38 100644
--- a/common/rootdir/root/init.sc8830.usb.rc
+++ b/common/rootdir/root/init.sc8830.usb.rc
@@ -22,6 +22,9 @@ on property:ro.bootmode=iq
setprop persist.sys.modem.diag ${persist.sys.modem.diag},vser
rm data/property/persist.sys.modem.diag
+on property:persist.sys.usb.config=*
+ setprop sys.usb.config mtp,adb
+ o
n property:sys.usb.config=mtp
write /sys/class/android_usb/android0/enable 0
write /sys/class/android_usb/android0/idVendor 1782
3.build/core/main.mk
diff --git a/core/main.mk b/core/main.mk
in
dex bcd1446..f9c2f44 100644