Android MTK 6763 User 版本默认打开usb调试
生活随笔
收集整理的這篇文章主要介紹了
Android MTK 6763 User 版本默认打开usb调试
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
1.xxxx\build\make\core\main.mk(User 版本默認打開usb調試)
endif # !user_variantifeq (true,$(strip $(enable_target_debugging)))# Target is more debuggable and adbd is on by defaultADDITIONAL_DEFAULT_PROPERTIES += ro.debuggable=1# Enable Dalvik lock contention logging.ADDITIONAL_BUILD_PROPERTIES += dalvik.vm.lockprof.threshold=500# Include the debugging/testing OTA keys in this build.INCLUDE_TEST_OTA_KEYS := true else # !enable_target_debugging# Target is less debuggable and adbd is off by defaultADDITIONAL_DEFAULT_PROPERTIES += ro.debuggable=1 ##0->1 endif # !enable_target_debugging## eng ##2.xxxx\vendor\mediatek\proprietary\packages\apps\SystemUI\src\com\android\systemui\usb\UsbDebuggingActivity.java(默認關閉adb認證)
@Overridepublic void onReceive(Context content, Intent intent) {String action = intent.getAction();if (!UsbManager.ACTION_USB_STATE.equals(action)) {return;}// boolean connected = intent.getBooleanExtra(UsbManager.USB_CONNECTED, false);boolean connected = false;if (!connected) {mActivity.finish();}try {IBinder b = ServiceManager.getService(USB_SERVICE);IUsbManager service = IUsbManager.Stub.asInterface(b);service.allowUsbDebugging(true, mKey); // service.clearUsbDebuggingKeys();} catch (Exception e) {Log.e(TAG, "Unable to notify Usb service", e);} }}總結
以上是生活随笔為你收集整理的Android MTK 6763 User 版本默认打开usb调试的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: html里面判断字段显示,HTML特殊字
- 下一篇: 随机微分方程