37

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?

Zoe stands with Ukraine
  • 25,310
  • 18
  • 114
  • 149
sebe
  • 1,485
  • 2
  • 11
  • 10
  • If someone has the same problem and the below answers didn't work (as it not worked for me), try [this solution](https://stackoverflow.com/a/60604852/5023964) – leosbrf Mar 09 '20 at 16:38
  • Anyone google this title please refer [this question](https://stackoverflow.com/questions/28704636/insufficient-permissions-for-device-in-android-studio-workspace-running-in-opens) too. Basically get Pixel vendor id from `lsusb` is 18d1 then write `SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", MODE="0666", GROUP="plugdev"` into `/etc/udev/rules.d/22-android.rules`. – 林果皞 Jan 25 '22 at 04:36

8 Answers8

105

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.

nbro
  • 13,796
  • 25
  • 99
  • 185
sebe
  • 1,485
  • 2
  • 11
  • 10
16

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

7

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
Mayur Karmur
  • 1,990
  • 11
  • 32
alBaryonic
  • 79
  • 1
  • 1
3

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.

Deepanshu
  • 131
  • 6
3

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.

Rahul Bhobe
  • 3,566
  • 4
  • 14
  • 30
Nkenyor
  • 21
  • 4
0

I do not know the reason, but connecting my phone on the USB 3 port solved this for me.

i found this here: https://askubuntu.com/questions/376815/how-to-connect-mtp-android-device-to-ubuntu-13-10

Michael Wallace
  • 323
  • 1
  • 9
0

For me this helped: https://askubuntu.com/a/1182597 Basically had to assign a+r permission to .rules file

gsingh
  • 91
  • 1
  • 4
0

With my Vivo phone plugged into the laptop, in the notification shade, I changed it from USB "Charge Only" to "FTP" (File Transfer Protocol). You can use either "FTP" (File Transfer Protocol) or "PTP" (Photo Transfer Protocol).

Adie RT
  • 71
  • 8