rk3588s方案user版本默认开启usb调试

开启usb调试

/Android_12/frameworks/base/services/core/java/com/android/server/adb/AdbService.java

public void systemReady() {
    if (DEBUG) Slog.d(TAG, "systemReady");

    // make sure the ADB_ENABLED setting value matches the current state
    try {
        //pony 强制开启adb调试
        Settings.Global.putInt(mContentResolver,
                Settings.Global.ADB_ENABLED, 1);
        Settings.Global.putInt(mContentResolver,
                Settings.Global.ADB_WIFI_ENABLED, mIsAdbWifiEnabled ? 1 : 0);
    } catch (SecurityException e) {
        // If UserManager.DISALLOW_DEBUGGING_FEATURES is on, that this setting can't be changed.
        Slog.d(TAG, "ADB_ENABLED is restricted.");
    }
}

开启自动允许授权

/root/orangePi/Android_12/frameworks/base/packages/SystemUI/src/com/android/systemui/usb/UsbDebuggingActivity.java

public void onCreate(Bundle icicle) {
    //加到方法最下面
    //pony 默认允许usb调试
	notifyService(true, true);
    finish();
}

你可能感兴趣的:(rk3588)