Adb No Permissions On Ubuntu
This blog post explains how to fix the no permissions error the Android Debugger displays when running the adb devices command Linux. The solutions presented here have been tested and found working on Ubuntu Lucid, but they should also work on other Ubuntu and Linux versions as well.
This official help center page has many working and non-working answers to the problem, and many comments. The root cause of the problem is that the current user doesn’t have sufficient permissions to access the USB device file created when the phone was connected in USB debug mode.
Killing all running adb server instances with sudo killall adb, disconnecting the phone, reconnecting the phone, and then running sudo adb devices instead (so adb gets run as root) fixes the problem.
Alternatively, it is possible to implement a long-term fix which doesn’t require sudo, thus it works with e.g. IntelliJ IDE integration:
- Create a file named /tmp/android.rules with the following contents (hex vendor numbers were taken from the vendor list page):
|
- Run the following commands (without the leading $):
|
- Disconnect the USB cable between the phone and the computer.
- Reconnect the phone.
- Run adb devices to confirm that now it has permission to access the phone.
Please note that it’s possible to use , USER=“$LOGINNAME” instead of , MODE=“0666” in the .rules file, substituting $LOGINNAME for your login name, i.e. what id -nu prints.