I am trying to connect my android phone (Qmobile) with Linux mint but its not appearing in eclipse.. Actually i was appearing as unknown device before but i tried some commands from internet it is disappeared now :( can anyone help me how to connect Android phone with Linux for debugging with eclipse.
i used following commands in terminal before:
adb kill-server
sudo adb start-server
sudo gedit /etc/udev/rules.d/51-android.rules.
chmod a+r /etc/udev/rules.d/51-android.rules
Kindly Answer me if you can Thanks.
I'm running adb on ubuntu, and my app (that I'd like to test) on a Galaxy S3. Got my S3 in debugging mode, I've edited /lib/udev/rules.d/51.android and .android files, restarted adb, and my laptop, but no luck. Any ideas what I might be doing wrong?
Try this on command prompt:
sudo -s
adb kill-server
adb start-server
Some more things you can try as I often find this helpful.
Check the Data Card, it might have problem.
Plug the data card to another port on the system.
I bought a new Samsung Galaxy Tab GT-P6200 for developing android application. When I connect my tablet device to the system(with Ubuntu 11.04 OS and with Eclipse ), it doesn't recognize debugging mode even I enable debugging mode in the settings. It automatically connects to MTP-mode(Media Transfer Protocol), and I cannot view the folders in the sdcard. Someone please help me to connect my device in debugging mode.
Have you try restarting the adb server?
Open a Terminal, go to your android-sdk/platform-tools folder and execute:
./adb kill-server
then start it again with root access
sudo ./adb start-server
I remember I faced this problem before. You should try to following:
Check if you have install driver for it(in Help/Software Updates of eclispe)
Also, sudo ./adb kill-server sudo ./adb start-server check if it connected by sudo ./adb devices
Try with other USB port.
Hope it helps
I followed the tutorial to set up ZTE tablet device for development. I am developing under Ubuntu 10.04.
After create the rules file: /etc/udev/rules.d/51-android.rules
SUBSYSTEM=="usb", SYSFS{idVendor}=="19D2", MODE="0666"
After I plug in the ZTE tablet device with debugging enabled. I run command:
adb kill-server
adb start-server
adb devices
I got :
List of devices attached
???????????? no permissions
I thought may be it is because I did not restart adb as root. SO, I tried to restart adb as root, and I entered the command in my terminal:
sudo adb kill-server , but I got the message in terminal that "sudo: adb: command not found"
But if I enter command without "sudo", that's "adb kill-server" it works.
Is it because my path setting is wrong?????
I set the path under HOME/.bashrc, with :
export PATH=$PATH{}:/home/user/android-sdk-linux_x86/platform-tools:/home/user/android-sdk-linux_x86/platform-tools
Conclude all above, I got two problems:
the adb listed device has no permissions
I can not run adb as root
My questions:
Are the problems all because of my path setting is wrong?
Is it because ZTE tablet device is different from mobile device? Some tricks need to be done for tablet??
something else?
Where am I wrong?
P.S. Since I lost the USB cable shipped with the ZTE tablet, I use a NOKIA USB cable to connect the ZTE tablet with my development Ubuntu machine, could this also cause the above problems???? (With Nokia USB cable, I can still access the ZTE tablet file system anyhow)
Every thing goes fine after I run the command:
sudo -s
adb kill-server
adb start-server
adb devices
Then my ZTE tablet is shown.
I'm running Ubuntu 10.10 64 bit. I have ia32-libs installed along with Android Debug Bridge version 1.0.26.
My problem(s):
adb devices >>> ???????????? no permissions
sudo adb devices >>>> sudo: adb: command not found
adb shell >>> error: insufficient permissions for device
I guess these are all related. Here's the relevant info.
$ echo $PATH
/home/me/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/opt/android-sdk-linux_x86/tools:/opt/android-sdk-linux_x86/platform-tools
$ which adb
/opt/android-sdk-linux_x86/platform-tools/adb
$ adb devices
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
List of devices attached
???????????? no permissions
$ sudo adb devices
sudo: adb: command not found
$ adb shell
error: insufficient permissions for device
I get the same results with a rooted Moto Droid running CM6.1 and a rooted G-Tab running a CM7-based ROM.
I have reviewed the following related posts:
http://forum.xda-developers.com/archive/index.php/t-522827.html
http://ubuntuforums.org/archive/index.php/t-1164359.html
adb command not found in linux environment
I tried most (not all) of the suggestions and I have not been able to resolve my issue. The things I didn't try seemed inappropriate. I would appreciate a few more tips and I'll keep troubleshooting.
One thing I didn't try was editing /etc/udev/rules.d/70-android.rules. Is that likely to be the issue? I can't see how that would cause "sudo: adb: command not found". Maybe my problems are not all related. Anyway, at this point I think I need some input from other people because I don't believe I have a path problem or the other common problems discussed in those other posts.
EDIT: SOLVED thanks to EboMike and RivieraKid. This was actually two different problems:
Item #2 above (sudo: adb: command not found) was solved by making a symlink as follows:
$ sudo ln -s /opt/android-sdk-linux_x86/platform-tools/adb /usr/local/sbin/adb
That allowed me to then do as EboMike suggested and use this solution. Doing that was required for my Moto Droid. (Running adb as sudo was not required for my Viewsonic G-Tablet, however.)
My other two items were resolved by implementing the udev rule as RivieraKid suggested (from this link).
One thing I didn't try was editing
/etc/udev/rules.d/70-android.rules. Is
that likely to be the issue?
Any particular reason why you didn't do that? To answer the question - YES! The udev rules are what informs Ubuntu what your device is and allows user-space tools to therefore access it.
You will not be able to use adb without correctly following the instructions.
With that in mind however, you don't say what version of Ubuntu you're using but I had issues with 10.10 - let me know if you need me to post the contents of my rules file.
Don't worry about running adb via sudo, you don't need it. The MODE="0666" from the udev rule allows you to access the device as any user.
EDIT:
Don't forget to reload the rules:
sudo udevadm control --reload-rules
EDIT #2:
As #Jesse Glick correctly points out, if adb is already running in daemon mode, you'll also need to restart it for this to work:
sudo adb kill-server
I've used sudo here, since that will guarantee that adb will be killed , and it's the officially supported method to stop the server. It will be automatically restarted the next time adb is used, but this time with the correct environment.
You need to restart the adb server as root. See here.
On my Gentoo/Funtoo linux system I am having similar problems:
I gotting always not the correct device description and insufficient permissions:
# sudo ./adb devices
List of devices attached
???????????? no permissions
# ./adb usb
error: insufficient permissions for device
For me helps the howto from Google.
In my case I needed to add the udev rule:
# cat /etc/udev/rules.d/51-android.rules
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", MODE="0666", GROUP="plugdev"
and setting up the filesystem rights
# chmod a+r /etc/udev/rules.d/51-android.rules
After replugging my smartphone the access to the phone was successful, it also appears now in Eclipse' Android Device Chooser:
# sudo ./adb devices
List of devices attached
3XXXXXXXXXXXXXC device
# sudo ./adb usb
restarting in USB mode
You also have to check the membership of your user to the plugdev-group.
Every answer I've read indicates the SUBSYSTEM=="usb". However, my (perhaps ancient) udev needed this to be changed to DRIVER=="usb". At last I can run the adb server as a non-root user... yay.
It can be instructive to look at the output of udevmonitor --env, followed by the output of
udevinfo -a -p <DEVICE_PATH_AS_REPORTED_BY-udevmonitor>
Please note that IDEs like IntelliJ IDEA tend to start their own adb-server.
Even manually killing the server and running an new instance with sudo won't help here until you make your IDE kill the server itself.
restarting the adb server as root worked for me. see:
derek#zoe:~/Downloads$ adb sideload angler-ota-mtc20f-5a1e93e9.zip
loading: 'angler-ota-mtc20f-5a1e93e9.zip'
error: insufficient permissions for device
derek#zoe:~/Downloads$ adb devices
List of devices attached
XXXXXXXXXXXXXXXX no permissions
derek#zoe:~/Downloads$ adb kill-server
derek#zoe:~/Downloads$ sudo adb start-server
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
derek#zoe:~/Downloads$ adb devices
List of devices attached
XXXXXXXXXXXXXXXX sideload
I fixed this issue on my debian GNU/Linux system by overiding system rules that way :
mv /etc/udev/rules.d/51-android.rules /etc/udev/rules.d/99-android.rules
I used contents from files linked at :
http://rootzwiki.com/topic/258-udev-rules-for-any-device-no-more-starting-adb-with-sudo/
HTC One m7 running fresh Cyanogenmod 11.
Phone is connected USB and tethering my data connection.
Then I get this surprise:
cinder#ultrabook:~/temp/htc_m7/2015-11-11$ adb shell
error: insufficient permissions for device
cinder#ultrabook:~/temp/htc_m7/2015-11-11$ adb devices
List of devices attached
???????????? no permissions
SOLUTION: Turn tethering OFF on phone.
cinder#ultrabook:~/temp/htc_m7/2015-11-11$ adb devices
List of devices attached
HT36AW908858 device
I just got the same situation, Factory data reset worked well for me.