天天看點

Android 6.0 預設允許ADB

device/rockchip/rk312x/system.prop

ro.adb.secure =1      
--    //setupAlert();
    
++    try {
++            IBinder b = ServiceManager.getService(USB_SERVICE);
++          IUsbManager service = IUsbManager.Stub.asInterface(b);
++      service.allowUsbDebugging(true, mKey);      
++        } catch (Exception e) {
++            Log.e(TAG, "Unable to notify Usb service", e);
++        }
++        finish();