When you connect Android Pie or Android 9 (or older) devices, you might see the "Allow USB debugging" message on Developer Options which does not disappear even if you press the OK button: It keeps on prompting the user to allow the USB debugging mode.
When you connect a device and try to enable debugging in developer options, the device shows the "Allow USB debugging" message. You click on Connect or OK (to allow USB debugging), but the device shows the message again, creating a never-ending loop. There are two possible issues that might cause this behavior:
- MTP (file) USB option automatically switches to “Only Charge”.
- USB Debug Option automatically shuts off.
Before proceeding with the solution below, please ensure that you are not experiencing problems with the USB ports while reading or writing data.
To solve the issue described above, the user will have to perform the following configuration changes:
From Developer Mode: (To enable the developer mode, please check this video (from the 15th to 25th second).
- Enable the Developer option.
- Enable Stay awake.
- Enable USB Debugging.
- Disable Always prompt when connecting to USB.
- Enable Allow ADB debugging in charge only mode.
- Disable or Uncheck the Verify apps via USB checkbox.
From Phone General Settings:
- Disable Screen lock.
- Enable USB File Transfer mode by sliding the status bar down.
- Select “Files” under the USB symbol.
- Open Notification and change USB connection mode to Charging mode.
- Open Developer Mode and assure Developer Mode is enabled.
- Open Notification and change USB connection mode to MTP – USB file transfer.
After performing the steps above, the device should not be stuck at the Allow USB debugging screen anymore. You should be able to perform data transfers now.