AdbCommandRejectedException: insufficient permissions for device: user in plugdev group; are your udev rules wrong?

This procedure solves the problem for me:

  • On the Android device, drag the top menu and select "USB for file transfer"
  • Press "Run" again

It might be accidental, but it has always (about 50 times) worked so far.

In recent versions of Android, the name of the menu and choice item has changed a bit, but it still works for me.


In short: The group of the USB device is root, not plugdev.

Adding a file /etc/udev/rules.d/51-android.rules

SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="d002", MODE="0660", 
GROUP="plugdev", SYMLINK+="android%n"

(lsusb18d1:d002)

And plugging in and out did the work for me. Now, the device is in the plugdev group.

(source)


I was receiving a similar error due to udev rules not being configured:

kirk@laptop:~$ adb devices
List of devices attached
FA7240300631    device
FA7240300631    no permissions (user in plugdev group; are your udev rules wrong?); see [http://developer.android.com/tools/device.html]

I was able to work around this by running:

adb kill-server && adb start-server

but this was not at all ideal. I fixed it by installing:

sudo apt install android-tools-adb

Which is a community-maintained default set of udev rules.

source