|
发表于 2020-8-8 12:10:29
6775 浏览 0 回复
android user版本默认打开usbdebug
android user版本默认打开usbdebug
build/core/main.mk文件中
ADDITIONAL_DEFAULT_PROPERTIES += ro.adb.secure=0 值:1:开启,0:关闭
ADDITIONAL_DEFAULT_PROPERTIES += ro.debuggable=1 值:1:开启,0:关闭
对应没有屏的设备还需要关闭debug的授权弹窗
SystemUI下面的UsbDebugingActivity.java
onCreat();
//add by jyj
mAlwaysAllow.setChecked(true);
try {
IBinder b = ServiceManager.getService(USB_SERVICE);
IUsbManager service = IUsbManager.Stub.asInterface(b);
service.allowUsbDebugging(true, mKey);
finish();
} catch (Exception e) {
Log.e(TAG, "Unable to notify Usb service", e);
}
|
|
|
|
|
|
|
登录或注册
|