How To Fix: error: insufficient permissions for device with ADB
Today I have installed Android studio on Ubuntu 14.04 and created a sample application. when i was trying to debug the sample code on Moto E (Motorola XT1022) , I encountered an error while using adb (Android Debug Bridge). When I was trying to debug using adb, it gave the following error:
error: insufficient permissions for device
Using sudo did not help. What helped me was to restart the adb server in sudo mode. I am going to show you how I fixed error: insufficient permissions for device error in Ubuntu 14.04.
Fix error: insufficient permissions for device error
First step is to stop the server:
1 |
adb kill-server |
Next step is to start the server with root privileges:
1 |
sudo adb start-server |
The output of this command will be like this:
mohan-a@mohan-a-desktop:~$ sudo adb start-server
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
One more thing you need to do is to detach the device attached to it and connect it again.
Here is the terminal Log
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
mohan-a@mohan-a-desktop:~$ adb kill-server mohan-a@mohan-a-desktop:~$ adb start-server * daemon not running. starting it now on port 5037 * * daemon started successfully * mohan-a@mohan-a-desktop:~$ adb devices List of devices attached ???????????? no permissions mohan-a@mohan-a-desktop:~$ adb devices List of devices attached ???????????? no permissions mohan-a@mohan-a-desktop:~$ adb kill-server mohan-a@mohan-a-desktop:~$ sudo adb start-server * daemon not running. starting it now on port 5037 * * daemon started successfully * <strong>mohan-a@mohan-a-desktop:~$ adb devices</strong> List of devices attached <strong>ZX1B325P7W device</strong> mohan-a@mohan-a-desktop:~$ adb kill-server mohan-a@mohan-a-desktop:~$ adb start-server * daemon not running. starting it now on port 5037 * * daemon started successfully * mohan-a@mohan-a-desktop:~$ |
Bingo! Here you go the device list successfully!
Now you can debug your Apps on your phones..Happy coding.