no permissions (user in plugdev group; are your udev rules wrong?)

37,182

Solution 1

With my Pixel phone plug into the computer, in the notification shade, I changed it from USB "Charge this phone" to "PTP" (Picture Transfer Protocol).

I then ran flutter doctor and my Pixel asked me to "Allow USB debugging" for my computer, I ticked the box to "Always allow from this computer".

I found the solution via https://github.com/flutter/flutter/issues/10330, which pointed to another Stack Overflow post.

Solution 2

change the usb connection options to PTP. That worked for me.

Solution 3

The best solution and what worked better for me is to install adb from the ubuntu package. This gives you a community-maintained default set of udev rules for all Android devices.

example:

 sudo apt-get install adb

Solution 4

Error 1 retrieving device properties for ro.product.cpu.abi: error: insufficient permissions for device: user deepanshu is not in the plugdev group See [http://developer.android.com/tools/device.html] for more information

This Error may be changed when you change your USB mode from "Charge Only" to "Files". Thank you.

Solution 5

I know you may have solved the problem/issue by now but I would just have to post this here for linux guys that may need help.

one thing I really love is a complete guide.

  1. Open terminal and type
    sudo apt update
  1. After the update is done, you would need to install adb
    sudo apt-get install adb
  1. Then you would have to run this last command
    sudo usermod -aG plugdev $LOGNAME
  1. Invalidate cache and restart android studio

If you are done with this four steps the permission issue would have been solved but you may still need to change the USB connection port to another port. Thanks.

Share:
37,182
sebe
Author by

sebe

Updated on December 13, 2021

Comments

  • sebe
    sebe over 1 year

    The commands flutter devices and adb devices are giving me the same error:

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

    flutter doctor detects my old Nexus 5, but, with my Pixel phone, I get the permission error. Pixel phone is in debug mode. The output from flutter doctor on Ubuntu 7.10 is

    flutter doctor
    Doctor summary (to see all details, run flutter doctor -v):
    [✓] Flutter (Channel beta, v0.1.5, on Linux, locale en_AU.UTF-8)
    [✓] Android toolchain - develop for Android devices (Android SDK 27.0.3)
    [✓] Android Studio (version 3.0)
    [✓] VS Code (version 1.21.0)
    Error retrieving device properties for ro.product.cpu.abi:
    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
    [✓] Connected devices (1 available)
    

    How can I enable my computer to access my Pixel phone?

  • nbro
    nbro over 4 years
  • Anton
    Anton over 3 years
    I also had to restart ubuntu for the error to disappear.
  • Meetai.com
    Meetai.com over 3 years
    This is also in the Android Studio User Guide. See: developer.android.com/studio/run/device#setting-up
  • Indacochea Wachín
    Indacochea Wachín about 3 years
    You are Great, Working fine when I send files between Android to Linux with adb
  • dan-gph
    dan-gph 11 months
    On my Moto G22 phone, Android 12, I had to set Use USB for to File transfer (under USB Preferences). For some reason it was set to No data transfer on my phone.