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

If you are trying to access your android devices shell using adb on a new ubuntu machine, there are higher chances that your may seen an error like below,

$ adb devices
List of devices attached
* daemon not running; starting now at tcp:5037
* daemon started successfully
B2NGAA8831702707	no permissions (user in plugdev group; are your udev rules wrong?); see []


error: insufficient permissions for device: user in plugdev group; are your udev rules wrong?
See [] for more information

This error is because, your Ubuntu machine user is not able to access adb shell due to some permission restrictions. As we have observed, there are 3 possible solutions for resolving this issue, either one of these should work for you.

Solution 1

In our case, if we use with sudo permissions i.e. “sudo adb devices” was working fine and we could access adb, but we were getting above errors with normal user. In our case, rest of 2 solutions didn’t worked because “our mobile was connected to laptop in “USB Tethering Mode” from Hotspot and Tethering settings options.

Till you access adb shell, switch USB to “File Transfer” mode

and try again, as,

$ adb kill-server 
$ adb devices 

Solution 2

As mentioned in Make sure that you are in the plugdev group. Add your user to playdev group as below,

$ sudo usermod -aG plugdev $LOGNAME 
$ adb kill-server 
$ adb devices 

Solution 3

Know the USB Vendor Id and Product Id of your android device using lsusb command as,

$ lsusb
Bus 001 Device 019: ID 2e04:c008   

As seen above, For Our mobile idVendor is 2e04 and idProduct is c008, add this details to udev rule as, [ Replace idVendor and idProduct as per your device ]

 $ sudo vim /etc/udev/rules.d/51-android.rules 
SUBSYSTEM=="usb", ATTR{idVendor}=="2e04", ATTR{idProduct}=="c008", MODE="0666", GROUP="plugdev"
$ sudo udevadm control --reload-rules 
$ adb kill-server 
$ adb devices 
Android Android Commands Android Java Applications Application Libraries Application Stack / User Interface Bash / Shell Scripts Commands and Packages Compilation Content Management System - CMS Core Kernel C Programs Development & Build Development Environment Setup Errors & Failures Flutter git Go Language Programs Hardware Platforms HTML JAVA Programs Kernel & Device Drivers Linux, OS Concepts and Networking Linux Device Drivers Linux Host, Ubuntu, SysAdmin Linux Kernel Linux Networking Middleware Libraries, HAL Monetization / Google AdSense Multimedia - Audio, Video, Images NDK / Middleware / HAL OS Concepts PHP Programming Languages RaspberryPi Scripting and Automation Search Engine Optimisation ( SEO ) Social Media Socurce Code Management ( SCM ) System Administration, Security Testing and Debugging Uncategorized User Interface Web design and development Wordpress Yocto / Bitbake / Openembedded

One Response

  1. alBaryonic June 6, 2019

Leave a Reply to alBaryonic Cancel reply