Monday, 10 May 2021

Allowing access to USB debugging authorization dialog when in Lock Task Mode

I'm using device owner to run an app in lock task mode.

However, when I connect a PC with adb, the USB Debugging Authorization permission dialog is never shown.After disabling lock task mode, the access request dialog appears as expected.

USB Debugging Authorization dialog

If I connect a PC that is already authorized its possible to use adb.

I'm aware there's the app whitelist for lock task mode, but I have no idea what package name for the USB Debugging Authorization permission would come under.

String[] whitelist = new String[]{getPackageName(),"com.android.systemui"};
mDevicePolicyManager.setLockTaskPackages(mAdminComponentName,active ? whitelist : new String[]{});

This question is very similar to Allowing access to USB device dialog when in Lock Task Mode and I've tried it - it works for other types of USB devices but not USB Debugging.



from Allowing access to USB debugging authorization dialog when in Lock Task Mode

No comments:

Post a Comment