5月 262020
去除下图所示提示框:
修改文件:frameworks/base/services/usb/java/com/android/server/usb/UsbDebuggingManager.java
增加import头
1 2 3 4 5 |
import android.os.IBinder; import android.os.ServiceManager; import android.util.Log; import android.hardware.usb.IUsbManager; import android.hardware.usb.UsbManager; |
在处理MESSAGE_ADB_CONFIRM消息那一段,把startConfirmation(key, mFingerprints);去掉,改成如下代码
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
case MESSAGE_ADB_CONFIRM: { if ("trigger_restart_min_framework".equals( SystemProperties.get("vold.decrypt"))) { Slog.d(TAG, "Deferring adb confirmation until after vold decrypt"); if (mThread != null) { mThread.sendResponse("NO"); } break; } String key = (String)msg.obj; String fingerprints = getFingerprints(key); if ("".equals(fingerprints)) { if (mThread != null) { mThread.sendResponse("NO"); } break; } try { IBinder b = ServiceManager.getService(Context.USB_SERVICE); IUsbManager service = IUsbManager.Stub.asInterface(b); service.allowUsbDebugging(true, key); } catch (Exception e) { Log.e(TAG, "Unable to notify Usb service", e); } mFingerprints = fingerprints; //去掉startConfirmation函数 //startConfirmation(key, mFingerprints); break; } |
Sorry, the comment form is closed at this time.