USB连接默认更改为传输文件

commit 3984753ab195cacfd3a6ba11b8fb28b54fd12faf
Author: ozh [email protected]
Date: Fri Jun 28 14:17:40 2019 +0800

Revert "将USB连接默认更改为传输文件,这个问题在7.1上更改起来非常麻烦"

This reverts commit e9c3203b08e32f6859855d33477648674b0e16e1.

diff --git a/build/tools/post_process_props.py b/build/tools/post_process_props.py
index dca963a…9dcaadf 100755
— a/build/tools/post_process_props.py
+++ b/build/tools/post_process_props.py
@@ -39,16 +39,15 @@ def mangle_default_prop(prop):
val = prop.get(“persist.sys.usb.config”)
if “adb” not in val:
if val == “”:

  •    val = "mtp"
    
  •    val = "adb"
     else:
    
  •    val = val
    
  •    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.

    if not prop.get(“persist.sys.usb.config”):
  • prop.put(“persist.sys.usb.config”, “mtp”);
  • prop.put(“persist.sys.usb.config”, “none”);

def validate(prop):
“”"Validate the properties.
diff --git a/device/rockchip/common/device.mk b/device/rockchip/common/device.mk
index f44d24d…5ab80ab 100755
— a/device/rockchip/common/device.mk
+++ b/device/rockchip/common/device.mk
@@ -375,7 +375,7 @@ PRODUCT_TAGS += dalvik.gc.type-precise
ifeq ($(strip $(BUILD_WITH_UMS)),true)
PRODUCT_PROPERTY_OVERRIDES +=
ro.factory.hasUMS=true \

  • persist.sys.usb.config=mpt
  • persist.sys.usb.config=mass_storage,adb

PRODUCT_COPY_FILES +=
( L O C A L P A T H ) / i n i t . r o c k c h i p . h a s U M S . t r u e . r c : r o o t / i n i t . (LOCAL_PATH)/init.rockchip.hasUMS.true.rc:root/init. (LOCALP

你可能感兴趣的:(Android,framework,adb,android)