2

When I run adb shell, I get the following error

$> adb shell
* daemon not running; starting now at tcp:5037
* daemon started successfully
error: insufficient permissions for device: user in plugdev group; are your udev rules wrong?
See [http://developer.android.com/tools/device.html] for more information

The connection gets thus rejected without me getting any prompt on the phone's side. I have enabled the "USB debugging" option on the phone, which when connected correctly says "USB debugging connected".

5
  • 2
    When you plug the phone to the computer, choose to use the phone as a MTP device and then try adb shell again. – Grimoire Sep 14 '18 at 18:20
  • 1
    Define udev for device as explained here android.stackexchange.com/q/144966/131553 – beeshyams Sep 14 '18 at 18:26
  • @DeathMaskSalesman: I do not understand the logic of it, but what can I say: it worked! Thanks a lot! – Stefan Sep 14 '18 at 18:27
  • 1
    @Stefan I don't understand it as well, but the Galaxy S3 suffers from the same bug (?) and that workaround does the trick. – Grimoire Sep 14 '18 at 18:30
  • @Stefan the logic is that when MTP is enabled, Android device is exposed to the PC with diffetent USB PID (product ID). And a udev (or equivalent) rule already exists for that PID. So it just works. – Irfan Latif Nov 15 '20 at 11:48
1

This can be resolved by enabling ADB transfer in your USB Preferences.

  • Plug the phone into the USB
  • Drag the phone's top menu (the drawer) down
  • Click the notification that says "Android System: Charging this device via USB. Tap for more options."
  • Click "File Transfer" (newer devices) or "MTP" (older devices)

Note, if successful you may get a prompt asking you to accept the keys of the computer issuing the adb shell command.

4
  • Right. That's the workaround that @Grimoire (formerly DeathMaskSalesman, apparently) gave as well, indeed. I wouldn't say it "resolves" the problem, because you have to repeat that dance every time. – Stefan Nov 16 '20 at 14:24
  • BTW, I don't understand why you tagged my question with mtp and file-sharing: while the workaround uses MTP/file-sharing the question has nothing to do with either of those. – Stefan Nov 16 '20 at 14:27
  • @Stefan So anyone looking for questions pertaining to mtp and adb can find it? Since that seems pretty likely. However, it's your question, despite being the most popular problem with ADB it has less than 250 views in over 2 years. You do you. ;) – Evan Carroll Nov 16 '20 at 15:40
  • 1
    I see what you mean. But I think I still prefer "doing me", because I believe the tags should describe the subjects related to the question rather than those related to the answers. IOW, we'll agree to disagree. – Stefan Nov 16 '20 at 17:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.