When I tried to push my apk file into a tablet, I got this error, please help me out.
adb server is out of date. killing...
* daemon started successfully *
error: insufficient permissions for device.
Thanks in advance for the help.
When I tried to push my apk file into a tablet, I got this error, please help me out.
adb server is out of date. killing...
* daemon started successfully *
error: insufficient permissions for device.
Thanks in advance for the help.
I ran into this same problem. Adding a udev rule as indicated here did the trick:
Log in as root, create a file /etc/udev/rules.d/51-android.rules
and add a line like this to give permissions to anyone in the plugdev
group:
SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", MODE="0666", GROUP="plugdev"
In this example, the vendor ID is HTC. You need to use the vendor ID for your device, which can be obtained by running lsusb
and searching for a line like
Bus 002 Device 009: ID 2a47:9e18
In this example your vendor ID would be 2a47
, so you would have to replace 0bb4
with 2a47
. The correct line would thus read:
SUBSYSTEM=="usb", ATTR{idVendor}=="2a47", MODE="0666", GROUP="plugdev"
Now assign read permissions on the files, reload udev and reload the adb daemon:
sudo chmod a+r /etc/udev/rules.d/51-android.rules
sudo udevadm control --reload-rules
adb kill-server
adb start-server
You may have to disconnect and connect again your device to the USB port.
plugdev
group. Run id
to find out.
Jorch914's answer on Stack Overflow solved this issue for me:
Ok So I finally found the problem, apparently on this device you have to set to connect as camera(even after usb debugging is already enabled)
Also this link describes the setting up process
I've seen this same error sometimes on Ubuntu. A working workaround for this is running adb with sudo
command. For example, if you're pushing app.apk
on sdcard the command would be
sudo adb push app.apk /mnt/sdcard
Also, be sure you selected "USB debugging" mode in the Application settings (in GingerBread) or in Development section ( in IceCream Sandwich and above). If adb is already running, you should first kill it with the command sudo adb kill-server
Hope this will help.
sudo
finds a different installed version of adb
than non-sudo. That's why this works, not because adb
itself requires more privilege.
Nov 5, 2018 at 3:00
These two simple commands solved the problem for me:
adb kill-server
adb start-server
Note that unlike semi-newbie's answer I don't need sudo
.
adb shell ls
.
May 13, 2017 at 0:22
I just run through the same issue but here is how i was able to go through it:
adb kill-server
(it may be wrong, but i issued it with AND without sudosudo adb start-server
Not sure if you know, but there is a package that includes adb. I mention this because i noticed that you are getting a reference to an older version of adb. You may install by issuing the following in your command line: sudo apt-get install android-tools-adb
I hope this helps.
Today I encountered the insufficient permissions for device
error, even though adb
had been working as expected just a few minutes before. Now I get:
$ adb devices
List of devices attached
???????????? no permissions
$ adb shell
error: insufficient permissions for device
Shortly before encountering the error, I had disabled Media device (MTP)
, as I figured I would not need to use MTP
. However, it appears that USB debugging, or at least some adb
commands, require that Media device (MTP)
be enabled.
To enable Media device (MTP)
on Android 4.4, go to:
Settings
Storage
The "..." menu (in the upper right corner)
USB computer connection
Media device (MTP)
When MTP
is disabled, lsusb
shows the following:
Bus 002 Device 071: ID [idVendor1]:[idProduct1] Google Inc.
After enabling MTP
, lsusb shows the following:
Bus 002 Device 072: ID [idVendor2]:[idProduct2] [idVendor string]
The idVendor and idProduct do change, based on whether or not MTP
is enabled or disabled.
I am not an Android expert, so it is possible that the above behavior is specific to my particular model of phone.
It could be from another reason. I just get this error trying to install an apk on device:
$ adb install platforms/android/build/outputs/apk/android-armv7-release.apk
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
error: insufficient permissions for device
- waiting for device -
It happened because the device was not ready on the correct mode. The device was sharing its 4G connexion via USB.
It can be known like that :
$ adb devices -l
List of devices attached
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
33332EF19F3D00EC no permissions usb:1-1.2
So it was enough to disable the connexion sharing on the phone and start again.
In general, make sure having the following result via the adb device
command before trying to push files on the device
$ adb devices -l
List of devices attached
33332EF19F3D00EC device usb:1-1.2
In these cases, no need to kill or restart the adb server.
It probably would be the same situation if you've mounted the device for data transfer via USB
I had the same issue and received that insufficient permissions. What I did was revoke the USB authorities for my laptop. Then stopped and started USB debugging. Plugged it back into the laptop and granted usb debugging authorities.
I have face the same problem and i have resolved this by Adding the path of your_android_sdk_path to the environment variable like
sudo export $PATH:/your_android_sdk_path/platform-tools/adb
its your wish how you want to add this to your account or system wide by editing these file ~/.bashrc
file or ~/.profile
or
/etc/profile, /etc/bash.bashrc, or /etc/environment
if u want to add to system wide access.
and then create the link of that in bin
sudo ln -s /your_android_sdk_path/platform-tools/adb /bin/adb
if you have used adb devices or any command then first kill the server like
adb kill-server
then start the server like
adb start-server
adb devices
now you can see your devices are listed properly without an issue
The answer to this problem is here : https://github.com/snowdream/51-android
As an Android developer i suggest you do NOT use "sudo" to force the use of adb anywhere. It's not what we should do. Rules, policies and restrictions are there for our own safety.
Yet another possibility: USB tethering also conflicts with adb. Disabling it solves the problem for me.
There are some specific things to do for Ubuntu to make USB debugging work, described in this page on developer.android.com about setting up a device for development.
What it suggests is to run these two commands in terminal:
sudo usermod -aG plugdev $LOGNAME
sudo apt-get install android-sdk-platform-tools-common
The above package contains udev rules for Android devices.
Rebooting may be needed for the changes to take effect.