If you are like me and like developing in Linux, then you will find this guide useful. When I was setting up everything for my Android development, I ran into the problem that Linux was not recognizing my Android phone, and took me some time figuring out how to make Linux recognize my phone. Finally, after some research I was able to put this little guide together and decided to share it with the rest of the world.
ADB (Android Debug Bridge) is a handy tool that comes with Android SDK that allows you to control and interface with your Android device.
[topads][/topads]
Update: 06/23/17 – Updated steps in How To
Update: 07/29/13 – In step 4, Android 4.2.x and up has Developer Options hidden. Added steps to make it visible
Update: 05/27/13 – Updated platform-tools (ADB) to latest version (Revision 17)
Update: 02/04/11 – HTC changed its Vendor ID, older phones have different ID than newer phones. Refer to USB Vendor IDs table at the bottom of this tutorial to see the change.
Update: 01/02/11 – By mistake I had linked the ADB tool for OSX in step 3.1. Now it should be the correct one for Linux.
IMPORTANT Update 12/11/10 – There has been a change to the new Android SDK. ADB Tool has been moved to /android-sdk-linux_x86/plataform-tools, so if you have the old SDK, please download the new one and update your path (Step 9.2 of this tutorial). If this is your first time doing this, then disregard the update and continue with the tutorial.
Update: 09/21/10 – Working code with Ubuntu Lucid Lynx and added more USB vendor IDs.
Download the latest Android SDK from Google: Android SDKExtract the TGZ file to your home/YOUR-USERNAME directoryTo get ADB, you need to install the SDK: Installing the SDKIf you are not a developer and not planning to develop, then just download the following zip file containing only the ADB tool and proceed with the tutorial: ADB
- Download the SDK Platform Tools for Linux and extract the zip file.
- On your phone, click Settings > Developer Options and make sure Android Debugging is on.
- In Android 4.2.x and up Developer Options is hidden, to make it visible, do the following
- Tap seven times in Build Number: Settings > About Phone > Build Number
- You will get a message saying you have enabled Developer Options or something like that, go back to Settings and you will see Developer Options in there.
- Login as root and create this file: /etc/udev/rules.d/##-android.rules
NOTE: In the above file replace ## with the number 50 if you are running Gusty/Hardy/Dapper (50-android.rules) or with the number 70 if you are running Karmic Koala/Lucid Lynx/Maverick Meerkat(70-android.rules)- Or simply type in terminal sudo gedit /etc/udev/rules.d/##-android.rules then enter your password
- The file should read:
- For Gusty/Hardy: SUBSYSTEM==”usb”, SYSFS{idVendor}==”0bb4″, MODE=”0666″
- For Dapper: SUBSYSTEM==”usb_device”, SYSFS{idVendor}==”0bb4″, MODE=”0666″
- For Karmic Koala: SUBSYSTEM==”usb”, SYSFS{idVendor}==”0bb4″, MODE=”0666″
- For Lucid Lynx: SUBSYSTEM==”usb”, SYSFS{idVendor}==”0bb4″, MODE=”0666″
- For Maverick Meerkat: SUBSYSTEM==”usb”, ATTR{idVendor}==”0bb4″, MODE=”0666″
NOTE: In the above lines the code ”0bb4″ refers to a HTC device. If your phone is from a different manufacturer, replace the code with the appropriate from the table below.
NOTE: If you copy one of the lines mentioned above, make sure you replace the quotation marks with the ones in your keyboard, as these have different display code and it might give you a “no permissions” error.
- Execute: sudo chmod a+rx /etc/udev/rules.d/70-android.rules
- Reboot
- To run ADB you need to add an environment variable to your bashrc file:
- Open a terminal window and type: sudo gedit .bashrc
- Add the following line at the end: export PATH=${PATH}:/home/YOUR-USERNAME/android-sdk-linux_x86/platform-tools
- Save and close
- You should be ready to go, type adb devices in a terminal window with your phone plugged in.
If you see a serial number pop up that means you are done. Should look something like this:
List of devices attached HT99PHF02521 deviceIf for some reasons when running adb devices gives you a “no permissions” error, try typing the following in terminal
- db kill-server
- adb start-server
USB Vendor IDs
Manufacturer | USB Vendor ID |
---|---|
Acer | 0502 |
Dell | 413c |
Foxconn | 0489 |
Garmin-Asus | 091E |
HTC (Older Phones) | 0bb4 |
HTC (Newer phones) | 18d1 |
Huawei | 12d1 |
Kyocera | 0482 |
LG | 1004 |
Motorola | 22b8 |
Nexus One/S | 18d1 |
Nvidia | 0955 |
Pantech | 10A9 |
Samsung | 04e8 |
Sharp | 04dd |
Sony Ericsson | 0fce |
ZTE | 19D2 |
Common ADB Commands
– Lists which devices are currently attached to your computer
adb devices
– Drops you into a basic linux command shell on your phone with no parameters, or lets you run commands directly
adb shell
– Lets you install an Android application on your phone
adb install
– Remounts your system in write mode – this lets you alter system files on your phone using ADB
adb remount
– Rets you upload files to your phones filesystem
adb push
– Lets you download files off your phones filesystem
adb pull
– Starts dumping debugging information from your handset to the console – useful for debugging your apps
adb logcat
If you liked this tutorial, please retweet and/or share 🙂
Consider giving back by getting me a coffee (or a couple) by clicking the following button:
[bottomads][/bottomads]
[…] This post was mentioned on Twitter by Esau Silva. Esau Silva said: My Newest Blog Post: Setting Up ADB/USB Drivers for Android Devices in Linux (Ubuntu) http://bit.ly/90OPsE #android #linux #ubuntu #adb […]
I followed your instructions and all worked well. I am using Ubuntu 10.10 and I am developing on a COBY MID7015 tablet. The vendor code is “COBY”. I found the vendor code on this page
http://www.t10.org/ftp/t10/vendorid.txt
This is what i ran to connect:
$ adb devices
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
List of devices attached
0123456789ABCDEF device
so 0123456789ABCDEF is how the COBY identifies itself. I uploaded an app through the USB cable, and all is well!! Huzzah! Good luck all!
My Newest Blog Post: Setting Up ADB/USB Drivers for Android Devices in Linux (Ubuntu) http://bit.ly/90OPsE #android #linux #ubuntu #adb
Amazing tutorial! I will try it tonight. The Unlockrs’ tutorial for Windows was a great guide as well. A+
Thanks. Let me know how it goes, and if you encounter any trouble.
[…] Setting Up ADB/USB Drivers for Android Devices in Linux (Ubuntu) […]
wow??great!!
Thanks very much!
Good lookin’ out! This is perfect. Lots of thanks and much appreciation for this guide. Very clear and concise, well formatted.
[…] well the reboot didn't work. I also went through and tried this https://esausilva.com/2010/05/13/setting-up-adbusb-drivers-for-android-devices-in-linux-ubuntu/ Still […]
works for lucid (10.04) too. thanks a lot!
btw, you can do “/etc/init.d/udev restart”, then re-plug device and it works without restart. also, remember that you have to enable “USB debugging” in settings!
Thanks for the info!!
It’s nice to know that also works for the newer version of Ubuntu. Thanks!!
So this didn’t work in maverick 10.10. I type sudo gedit /etc/udev/rules.d/##-android.rules and the text editor was empty. So what do I do?
you should replace the ‘##’ for the number 70, the name of the file should be ’70-android.rules’ … and yes, the text editor should be empty since you are creating a new file. Once the text editor opens, type
SUBSYSTEM==”usb”, SYSFS{idVendor}==”0bb4?, MODE=”0666?
replacing “0bb4” with the code corresponding to your phone. If that does not work, try changing the file name to ’80-android.rules’ or to a higher number.
with the question marks included?
oh, sorry, I didn’t notice the question marks. They should be quotations marks ( ” )
SUBSYSTEM==”usb”, SYSFS{idVendor}==”0bb4″, MODE=”0666″
So I tried this on 10.10 and didn’t work? Any advise?
when I run sudo chmod a+rx /etc/udev/rules.d/80-android.rules I keep getting chmod: cannot access `/etc/udev/rules.d/80-android.rules’: No such file or directory “what am I doing wrong here?
This is probably because you haven’t created the file yet. Run this command first:
sudo gedit /etc/udev/rules.d/70-android.rules
to create the file, then do the chmod command
After I run sudo chmod a+rx /etc/udev/rules.d/70-android.rules how long should I wait to reboot the PC?
you can reboot the PC right away
After I run abd devices I get adb devices
No command ‘adb’ found, did you mean:
Command ‘cdb’ from package ‘tinycdb’ (main)
Command ‘gdb’ from package ‘gdb’ (main)
Command ‘dab’ from package ‘bsdgames’ (universe)
Command ‘zdb’ from package ‘zfs-fuse’ (universe)
Command ‘mdb’ from package ‘mono-debugger’ (universe)
Command ‘tdb’ from package ‘tads2-dev’ (multiverse)
Command ‘pdb’ from package ‘python’ (main)
Command ‘jdb’ from package ‘openjdk-6-jdk’ (main)
Command ‘ab’ from package ‘apache2-utils’ (main)
Command ‘ad’ from package ‘netatalk’ (universe)
adb: command not found
Did you create the environment variable? (Step number 8). If not, then navigate to this directory ‘android-sdk-linux_86/tools’ then type ./adb devices
Thanks! Works great on Hardy with HTC Desire.
Glad to hear that 🙂
I appreciate your help but I’m sorry this is not working for me. I know for sure I created the file in and saved it using gedit. But for some reason it can’t find the file. This really sucks because I want to over-lock my G2.
Thank you! Been trying to get adb to run on my laptop..someone at the CyanogenMod forums linked me here..worked like a charm
Glad it worked for ya!!
Finally i read this…. thanks
Setting Up ADB/USB Drivers for Android Devices in Linux (Ubuntu): http://bit.ly/9GRINJ #androiddev #ubuntu #linux
Setting Up ADB/USB Drivers for #Android Devices in #Linux (#Ubuntu): http://bit.ly/9GRINJ #androiddev
I’m having the same issue as Speedy. I am a nOOb so it’s likely due to a step I missed, but I’d love to get this working . . .
What Ubuntu version are you using?
Not working on maverick. Keep getting: adb command not found. Basically the same as Speedy….
OK I found solution to the “adb command not found”
http://androidforbeginners.blogspot.com/2010/01/errors-trying-to-run-adb-android-debug.html
Well, that is basically Step 8 in my tutorial, just another way of doing it, but thanks for posting it though
I still haven’t got it working. I’m going to upload a video on youtube and I want you to tell me what am I doing wrong.
Try the method Jerry posted two posts above yours and see if that works.
speedy, try doing Step 8 once more. Keith found a typo. Sorry
[…] […]
There is a big error (two of them) in 8.2. It should read:
Add the following line at the end: export PATH=${PATH}:/home/user/android-sdk-linux_x86/tools
NOTE that in the original instructions, the path is ~/home/user (which translates to /home/user/home/user, which of course does not exist). NOTE also that in the original instructions, the directory is listed as android-sdk-linux_86, not linux_x86.
Thanks a lot man. I overlooked that typo. It should be the way you said it. Just updated the tutorial 🙂
[…] […]
[…] […]
[…] […]
está com problemas com o combo "adb + variável de ambiente" no Android 2.3 no Linux? http://bit.ly/9GRINJ
Worked with my HTC on Ubuntu 10.10 with minor changes:
SUBSYSTEM==”usb”, ATTR{idVendor}==”0bb4?, MODE=”0666?
Hi,
I can’t make it work with Maverick 10.10 64Bit….. 🙁
I tryed many solutions…
Last thing that I did is:
sudo gedit /etc/udev/rules.d/90-android.rules
I added:
SUBSYSTEM==”usb”, ATTR{idVendor}==”0bb4″, MODE=”0666″
then I did
Setting Up ADB/USB Drivers for Android Devices in Linux (Ubuntu) http://j.mp/eahI5g via @AddToAny This helped me !
I can’t get it to work. I followed your instructions (using Ubuntu 10.10) and it won’t find my phone.
It keeps giving me the no permissions message.
Have you tried rebooting your computer? What about adb kill-server and adb start-server?
After following the instructions and then typing adb devices, i kept getting ????????? no permissions…. And then I just figured out what the issue was. I copied and pasted the values that go in the android-rules file… It turns out the quotation marks were messed up from doing a copy/paste from the web page. I retyped all the quotes, making sure they were the straight up and down kind…. And now it works.
Thanks for the input
Thank you for the fantastic tutorial! Really helped me out. 🙂
RT @TopsyRT: Setting Up ADB/USB Drivers for Android Devices in Linux (Ubuntu) http://bit.ly/hup2PV – this is absolutely awesome – respect!
Good times man! : D
Hi,
I have no success with Maverick 64 Bit and Nexus One… 🙁
I tried many combinations but neither worked for me…
This is the last I tryed:
$ sudo gedit /etc/udev/rules.d/90-android.rules
There I put:
SUBSYSTEM==”usb”, ATTR{idVendor}==”0bb4″, MODE=”0666″
$ sudo chmod a+r /etc/udev/rules.d/90-android.rules
$ sudo restart udev
then I plugged my phone in (USB debug is active and I had success with OSX)
then I moved to platform-tools
$ ./adb kill-server
$ ./adb devices
and this is what I get:
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
List of devices attached
???????????? no permissions
What am I doing wrong?
Thanks
Ok,
I just Googled around and found the solution here:
https://gist.github.com/646236/8e50fc576c6a76df026fc32589ac1cd3c4a73f81
It look like that Nexus One, although it comes form HTC has a different vendor ID.
The strage thing is that this is not listed on Android SDK site too…
oh wow, that was unexpected. Thanks for letting me know
same thing for the nexus s
Thanks a lot! Got my G2 up and running on Maverick with these instructions.
but my vendor id is not in the id tables, and this way is not work
what device do you have?
it’s a android device still in manufacturers (OEMs), and the vendor id is applied last year
I meant what phone you have
I have followed the instructions, (huawei 8110), but don’t work. adb devices, return a black line.
Using ubuntu 10.04 (
I think there is a problem in udev rules…
91-android.rules: SUBSYSTEM==”usb”, ATTR{idVendor}==”12d1″, MODE=”0666″
Thank
did you copy and paste this? SUBSYSTEM==”usb”, ATTR{idVendor}==”12d1?, MODE=”0666? …. try replacing the quotation marks with the ones from your keyboard
Yes. I ‘ve got a file named
90-android.rules containing this line:
SUBSYSTEM==”usb”, ATTR{idVendor}==”12d1?, MODE=”0666?
(replacin quotation marks). ¿Is therer any way to know if conf is OK? can you trace the udev
config?
I looked for Huawei terminal using a usb detection tool, and i found it.
Thanks for all,
In my computer,I must use root user to kill and start adb server,otherwise,it would not works,do you know why?
Excellent tutorial…..after hours of searching on web, unsuccessfully, I came across your site. Thank you for it. The fat lady has not sung for me yet. I am trying to
connect to SuperPad (epad from China). when I run the command “adb devices”
I get an empty device list. No “?????” marks but an empty list. I am following your instruction step-by-step. Not sure what vendor ID I should use… any idea? anyone.
Thanks a lot.
…jsayed
Thanks… Did you copy and paste this line? SUBSYSTEM==”usb”, ATTR{idVendor}==”12d1″, MODE=”0666″ Try deleting the quotation marks (these quotation marks have different ASCII code) and replacing them with the ones from your keyboard and see if that helps. To get the USB vendor id, use the following command ‘lsusb’ with your epad connected, this will give you a list of usb devices attached to the computer. Look for your epad and find this “ID: 04e8:681c” the first four characters is your vendor id. 😉
Thanks for the email.
I am still stuck as I am unable to see my Apad on my ubuntu 10.04 laptop.
Followed your instruction on 70-android.rules with above data & all steps in your article. step-by-step.
Forgetting about adb for now.. and focusing on just to recognise my Apad as a device on my host using the command “lsusb” first.
a. I have attach a USB A (4pin) between apad-USB port and my Laptop USB port.
b. Set my Apad in USB debugging mode.
c. power-on the Apad.
d. open a terminal on my laptop & typed “lsusb”
e. Don’t see my apad on the list at-all.
f. tried the other USB port on my Apad. power up down etc…. still no luck.
f. Apad & PC USB ports are working as I can install a USB stick in it and read all the files.
What I am confuse now….. In USB world there is a host & a device. My Apad is a host as it can read my USB stick. My PC is a host too. so how does either my Apad or PC become a device. My Apad & PC have 4 pin USB connectors, thus not a OTG (on-the-go) USB. I though maybe when I put the Apad into USB debugging it will becomes a USB device. Did an experiment with the USB memory stick. with USB debugging on & off. No change. Maybe I am thinking
too much. but I can’t get it to work.
I will appreciate any answer, what/where to look next.
I believe you need a special host to host USB cable. This is a special cross over USB cable design specifically for PC-PC communication; very simialr to cross over ethernet cable for direct connection. You can find one here: http://www.datapro.net/products/usb-2-0-host-to-host-cable.html
It might be a problem with the aPad and Linux not playing nicely. Is the aPad recognized on a Windows machine?
I have the same problem as Jawed above. I have made all the changes to the files as described but my device does not show up in ADB DEVICES nor in LSUSB. If I insert a memory stick in the USB slot on my PC, LSUSB lists the device properly. This appears to be a client issue on the tablet side.
Thanks guys,
Today I attached a external USB sniffer to my apad & yes it operates in host mode only same as my PC. Thus this will not work as apad is not a USB OTG compliant.
Thanks Kane, I will try using a USB transfer cable. Upon reading on it. It is not a cross-over cable like Ethernet. USB does not have separate transmit & Receive wires pairs. It has just one single differential wire (D+/D~) for data transfer. Being Host/device architecture (client/server) it is a simplex communication. What this device does is act like a device for both hosts (apad & PC) & transfer data between them. This might work as long as I don’t need any driver for the apad. PC is okay.
On the hand I solved my problem a different way…all I wanted to do was to install my test program on the apad and run. I achieved this my installing 2 apps from the Android market…. “File Expert” and “Easy installer”. I use the HTTP server in the “File installer” and move my program into the SD card on the apad then use Easy Installer to install it. It worked for my problem. Down the road I want to do more than this…not sure how will I achieve that…
Thanks a lot for this tut! Works like charm. For ppl who get adb command not recognized, you must close shell window and open it again, to load new bash config 😉
awesome post it’s very useful for us, Thanks
https://esausilva.com/2010/05/13/setting-up-adbusb-drivers-for-android-devices-in-linux-ubuntu/
Thanks for your excellent guide. I was able to connect my Nexus S to Ubuntu 10.10.
Testing my app on actual device is so much faster than using the emulator.
Cheers.
[…] Setting Up ADB/USB Drivers for Android Devices in Linux (Ubuntu) […]
Hi I looked at your website and found it very useful..I followed the steps and my motorola droid phone shows up with the lsusb command and the adb devices also works, but then when I type adb devices it shows this on my screen
List of devices attached
???????????? no permissions
No matter what I do, the phone’s serial number is not showing up..Also I am not sure what category my ubuntu belongs to…whether it is lucid lynx or maverick etc…
Thanks in advance for the help….Would like to hear from you..
Thank you very much…I changed the quotation to the one on my keyboard and it worked…I really appreciate your help…
I can’t get this to work on Natty Narwhal. I’m not sure if I have to change the filename or the content itself?
##-android.rules
Anybody knows what this number should be for natty? This used to work before I did an upgrade on ubuntu ( the previous number was 51)
Well, I haven’t tried Natty Narwhal…try creating a different android rules file and with a higher value number, 71 maybe?? 80?, 90? and see if that works
Thank you very much ^^ this is very useful..
I’m using Natty and 70-android.rules works for me.
by the way I hope you don’t mind because I use this guide as the base to answer the topic in android-indonesia forum about how to setting up adb on linux, and I’ve translated it into Bahasa Indonesia
http://www.android-indonesia.com/home/15-developers/60129-menghubungkan-terminal-ubuntu-dengan-android#60193
Thanks for letting me know that 70 works for Natty….and don’t mind at all 😀
99.android.rules with
SUBSYSTEMS==”usb”, MODE=”0666″, SYSFS{idVendor}==”0502″
works for me in natty with adb
He sorry to bother you but I followed the guide to the letter and I still can’t get my adb commands to work in ubuntu. Here is my console,
diezel@ubuntu:~$ adb
bash: /usr/bin/adb: No such file or directory
diezel@ubuntu:~$
No matter what I do to configure adb this error shows up. I would appreciate any help available. Thanks for the guide!
Sorry for the double post that was an old console command heres whats happening,
diezel@ubuntu:~$ adb devices
bash: /home/diezel/android-sdk-linux_x86/platform-tools/adb: No such file or directory
Kk, Boleh numpang Co-Paste?
ane cantumkan Sumbernya Kk
Kk, boleh numpang Co-Paste ?
Ane cantumkan sumbernya Kk 😀
??????-??! ? ???????? ???? ?????? ???????? Android ?????????? ?? ???????? ????????! ??????????? ??? http://j.mp/ggLTdN!
??????-??! ? ???????? ???? ?????? ???????? Android ?????????? ?? ???????? ????????! ??????????? ??? http://j.mp/ggLTdN!
??????-??! ? ???????? ???? ?????? ???????? Android ?????????? ?? ???????? ????????! ??????????? ??? http://j.mp/ggLTdN!
Thx, worked perfectly on Natty with a Samsung Galaxy S.
I’m having trouble getting my Galaxy S (Fascinate) to register through adb devices.
central rules.d # adb start-server
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
central rules.d # adb devices
List of devices attached
I get blank. but my phone gets recognized by the system.
central rules.d # lsusb
Bus 004 Device 008: ID 04e8:681d Samsung Electronics Co., Ltd Galaxy Portal/Spica Android Phone
Any ideas?
Thanks for sharing this useful guide and the adb package. I didn’t wanted to install the entire SDK. Excuse my poor English.
SUBSYSTEM==”usb”, SYSFS{idVendor}==”0bb4?, MODE=”0666?
this driver is applicable for phone in operate condition, once phone set in FASTBOOT or HBOOT the driver will not recognized 🙂
@x1123
Thank you so much…! Finally got my Galaxy S talking to Natty 🙂
works for me in Natty 70-android.rules
SUBSYSTEM==”usb”, SYSFS{idVendor}==”04e8″, MODE=”0666″
only on-board USB detects the device. not able to get it work through my PCI USB card
[…] ???“USB Vendor ID”?USB?????????????????????????????????Setting Up ADB/USB Drivers for Android Devices in Linux (Ubuntu)?????? […]
?????????? ADB (Android Debug Bridge) ?? Linux http://t.co/nkIr0Xl
Thnx! great resource!
You almost never have to reboot a linux machine in order to install something, unless it has to do with the kernel itself.
Instead of step 8, use the following command:
sudo restart udev
For those on other distros that may not use upstart, the command is
sudo /etc/init.d/udev restart
Thank for the tip 🙂
Thanks ! Got worked in Maveric after your instructions. But need to sudo adb . doesn’t work without sudo …. Great Thanks a lot !
Hi, thanks for your help. I am trying to move apps from internal storage to SD card, and I need to use adb. After following the official dev guide and your post, I achieved my goal. There are two points that might help others.
1)
“lsusb” will show you connected USB devices, and it’s easier to check/confirm the vendor ID there.
2)
for “no permission”: if user is not the root, “adb start-server” won’t fix the permission. Make sure you execute this command with admin privilege.
Very cool, It help me a lot setting my Ubuntu and Fedora with Android
Thanks for the help.
Worked nicely!
Setting Up ADB/USB Drivers for Android Devices in Linux (Ubuntu) http://t.co/H42CZCjz via @AddToAny
[…] […]
Seems helpful up to a point. I note there are a few differences between debian/ubuntu and redhat/mandrake/mandriva/mageia type distros. Well, some help is better than none, and thanks for the pointers here, it still helped a little for my choice of distro. Thanks.
Thank you. I can use my kyros 7022 with eclipse now that I did your tutorial.
If someone need i used the id “18d1”.
[…] https://esausilva.com/2010/05/13/setting-up-adbusb-drivers-for-android-devices-in-linux-ubuntu/ […]
RT @TopsyRT: Setting Up ADB/USB Drivers for Android Devices in Linux (Ubuntu) http://t.co/V1owumZi
For Ubuntu Linux 64 bit machines you have to install the 32 bit libraries to get adb to run. From a terminal type: sudo apt-get install ia32-libs
thanks for the info
“type adb devices in a terminal window with your phone plugged in.”
tom@tom:~$ adb devices
No command ‘adb’ found, did you mean:
Command ‘cdb’ from package ‘tinycdb’ (main)
Command ‘gdb’ from package ‘gdb’ (main)
Command ‘aub’ from package ‘aub’ (universe)
Command ‘dab’ from package ‘bsdgames’ (universe)
Command ‘zdb’ from package ‘zfs-fuse’ (universe)
Command ‘mdb’ from package ‘mono-debugger’ (universe)
Command ‘tdb’ from package ‘tads2-dev’ (multiverse)
Command ‘pdb’ from package ‘python’ (main)
Command ‘jdb’ from package ‘openjdk-6-jdk’ (main)
Command ‘ab’ from package ‘apache2-utils’ (main)
adb: command not found
Sure thought I did it right
hello
i had the same problem
you cant use (“) you must use (‘)
enyway that was my keyboard’s system
Setting Up ADB/USB Drivers for Android Devices in Linux (Ubuntu) « Esau Silva http://t.co/qC2e5l5s
Great help, just wanted to thank you.
Cheers
Awesome writeup! 🙂
However, I can’t find my device by using lsusb even though I’ve enabled/re-enabled usb debugging. Don’t know what can be wrong. I’ve tried to follow all your steps. So, I have ADB up and running without any devices being listed.
Regardless. At the very least my device should show up with ‘lsusb’? What can be preventing me discovering the device through that command?
I’m on Oneiric Ocelot. 11.10.
Cheers,
Nils 🙂
what is your device?
maybe you can find your device listed here ids
i have the same problem as NilsNH =(
I’m on Oneiric Ocelot. 11.10.
my device is samsung galaxy s5670
so your device does not show up with lsusb? Can your computer read your device as external storage? try this ‘689e’ or this ’04e8′ as vendor id …. you can find your device listed here ids
Ubuntu + Android via ADB-Bridge. So gehts schnell und einfach. 🙂 http://t.co/wg7wrjQt
RT @TopsyRT: Setting Up ADB/USB Drivers for Android Devices in Linux (Ubuntu) http://t.co/qOC4ZZTQ
http://t.co/RrjzDAlL #adb #android
Same problem as Diezel –
$ adb
bash: /usr/bin/adb: No such file or directory
Ideas? Suggestions? Thanks!
Adb is not found under /usr/bin, it’s found under your Android SDK directory. Look at step 9 on my tutorial
I had the same problem.
What worked for me was this:
open the folder home/you/android-sdk-linux/tools
double click on “android”
This will start the sdk manager. Wait for it to load all files.
Under tools, you can install “platform-tools”
close
Finally, adb should work!
Thanks a lot buddy!! worked perfectly on Lucid..
Oh, and you have to change the udev rules for Debian, with appropriate vendor id:
SUBSYSTEM==”usb”, ENV{DEVTYPE}==”usb_device”, ATTRS{idVendor}==”0fce”, MODE=”066
6″
Setting Up ADB/USB Drivers for Android Devices in Linux (Ubuntu) « Esau Silva http://t.co/M05kZjjZ #android
both
SUBSYSTEM==”usb”, ATTR{idVendor}==”19d2″, MODE=”0666″
SUBSYSTEM==”usb”, SYSFS{idVendor}==”19d2″, MODE=”0666″
works for me(Lucid Lynx)
but replugin required.
$ adb devices
List of devices attached
N600PLUS_CHINATELECOM device
[…] device for debugging (ADB) does not work – Stack Overflow Found the vendor information here: Setting Up ADB/USB Drivers for Android Devices in Linux (Ubuntu) Esau Silva Also, there are a lot of useful adb commands on that page, makes a great […]
Definitely this blog is very informative and neatly designed. Really you’ve motivated me strongly in my new project by this article. As a constant reader of your blog I want to tell you that your writing skills are superb.
help plz, after running ‘adb devices’ in terminal, i get-
“List of devices attached
???????????? no permissions”
[…] 12d1 ????????????????? […]
This is a great post. Thank you and Google for chance to read it.
Amazing. I can’t thank you enough for putting something useful and correct onto the internet and so easy to follow.
Thank you man! Helped me very much. =D
I followed this guide ,and it works .But after I reboot the system ,the file ##-android.rules disappears ,and I have to do all again every time after I reboot the system .Can you please tell me how to fix it ?Thanks a lot !
Thank you!
Thanks! This gave me the nessessary hints to get it running. However, in debian squeeze (and possibly others) they changed the directory, so the file has to be
/lib/udev/rules.d/50-android.rules
and the content for a motorola defy should be
SUBSYSTEM==”usb”, ATTR{idVendor}==”22b8″, ATTR{idProduct}==”41db”, MODE:=”0666″
thanks for the contribution 🙂
someone know id for alcatel devices?
did a quick search…try the one listed here http://stackoverflow.com/questions/8729678/adding-vendor-id-on-linux-for-device-debugging-error-no-permissions
For linux, you have to do:chmod 755 *and you might have to use sudo or just do:sudo -iso you can run everything as root.Hope that helps.
Setting Up ADB/USB Drivers for Android Devices in Linux (Ubuntu) http://t.co/XEDpywf8
This aritcle went ahead and made my day.
Gw pke "Usus Buntu" msh ga bs boss RT @surobledug: Setting Up ADB/USB Drivers for Android Devices in Linux (Ubuntu) http://t.co/2PMMBk6t
Setting Up ADB/USB Drivers for Android Devices in Linux (Ubuntu) « Esau Silva – http://t.co/kzwX05HS
I created the file as 70-android.rules and all of my usb devices got disabled. As a solution i came up with 70-xdroid.rules so that it takes the last position alphabetically for execution as there was couple of other “rules” files tooking place. Guss what, its works. Thanks.
huawei phone u8800 not conet plles
[…] Thanks to Esau Silva for this post that helped get the drivers working for us. https://esausilva.com/2010/05/13/sett…-linux-ubuntu/ […]
what means number in 70-android.rules and 50-android.rules?
I might be beating a dead horse, but thank you for potisng this!
I found this link that helps if using Debian and Samsung Galaxy Prevail.
http://unforgivendevelopment.com/2011/05/20/udev-headaches-on-debian-testing-wheezy/
Does anyone know the product id and vendor id for milagrow?
Vendor id for milagrow :18D1
what is the milagrow product ur using??
Please go through the below solutions. it will solve your problem definitely.
http://androiddeveloperspot.blogspot.in/2013/01/usb-debugging-in-android-ubuntu.html
Hi, thanks for your tutorial. I have a Samsung GT-S7562 (Galaxy S Duos), which is not recognized by my computer running Linux (Ubuntu12). Unfortunately I had no success. I downloaded only the ADB stuff. I used the code for Maverick Meerkat and the Samsung ID: SUBSYSTEM==”usb”, ATTR{idVendor}==”04e8″, MODE=”0666″. I then edited the .bashrc as described, which resultetd in “PATH: unknown command”, and I could not sudo any more, so that I had to include the sudo directory to make changes back later. The device list was empty. Later, when the PATH was undone again, I changed to the platform-tools directory und used the ./adb command instead of adb. Device list empty again. What have I done wrong? I assume, the code for my version of ubuntu was not correct. What shall I do?
Thank you….
Thanks a lot. I was searching for this tutorial for months!
This post is great. I realy love it!
Just a note:
Please use lower case for Vendor Id while copying it to android rules file.
for example: if vendor id is -> 18D1
use 18d1
Thanks
Okay so I went through all this and at first I ended up with the NO permissions answers with ????????????? as my device serial. And then after following the link in the comments to: http://androiddeveloperspot.blogspot.in/2013/01/usb-debugging-in-android-ubuntu.html
and tweaking the permissions based on that. Now i just get nothing in the device list… any idea what i’ve done wrong?
I had the same problem– finally figured it out. I copied the rules code from above, but the web page creation changed the double quote ” into funny UTF quotes, so the rules file didn’t get set. Use “sudo service udev restart” to save reboots.
[…] For Linux : Just a Guide […]
Make your life more simple get the business loans and everything you want.
Very nice, very thank you.
If you want to find the vendor id.
you can use “lsusb” before plug android phone.
it like:
$ lsusb
Bus 001 Device 002: ID 80ee:0021
Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
And plug in the android phone and use “lsusb” again
Bus 001 Device 005: ID 0bb4:0c03 High Tech Computer Corp.
Bus 001 Device 002: ID 80ee:0021
Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
And will find the vendor id.
thanks for this simple and up to the mark guide 🙂
I’m a little confused at step 5, what does it mean to login as root? where to create that file? I’m totally new to ubuntu I’ve installed it only in order to run the Controlbear S-off software to S-off my htc amaze cell phone. i hope to get a respnse from you 🙂 Thanks for the guide and also thanks in advance for further help
1. In command line type the below and press enter, then type your password. This will log you in as super user (root privileges) and create the stated file.
$ su
2. You create the file here /etc/udev/
[…] was time to set it up for Android. I was expecting it to be something like what I did for Ubuntu (Setting Up ADB/USB Drivers for Android Devices in Linux Ubuntu), but it was much easier in Fedora. Just had to install two utilities and that was it. This was […]
I got stuck on step 10: “You should be ready to go, type adb devices in a terminal window”. I was getting this error message: “No such file or directory”. I’m running Ubuntu 13.04 64-bit. I found the solution here: (http://askubuntu.com/a/73497).
Goo job man, and plus: A) OEM (n0n-brand) Vendor ID (4-digit VID) HAVE TO (sometimes MUST TO) be put (manually) into ~/.android/adb_usb.ini (same and especcially for Windows, where ~ stands for $HOME in Linux and some /Documents and Settings/Admin in Windows – not My Documents!). For example 2207 refers to many RockChip 2918 China-made units etc. B) And little snoozing: 1. nobody have to sudo to break into own .bashrc (sudo gedit .bashrc => nano ~/.bashrc). 2. typo: (a)db kill-server) 3. while not strictly related, but $ADT/tools aslo good thing to PATH along with platform-tools
And well: some people ask for USB IDs. Just run lsusb and see into output. XXXX:YYYY means VID:UID (Vendor and Unit) IDs
Hi,
Now it’s good idea to use apt for adb installation. As for it’s a bit easier way for adb installation:)
sudo apt-get install android-tools-adb
Thanks for the tip. I do not use Ubuntu anymore, so I am not up to date with the newer methods, I will add this to the guide
On Ubuntu 13.04, the filename is 51-android.rules
SUBSYSTEM=”usb”
this from
http://forum.xda-developers.com/showthread.php?t=2302780
Awesome, worked perfectly
Thank you so much!! Exactly what I was looking for.
Now, how would I do this, the code for 12.04 Precise Palogin isnt listed.
Are you referring to step 5 or 6? I would say just try one, if it doesn’t work, try the other one. I haven’t used Ubuntu in years now
I tried a lot of advices to be my Android device visible by “adb devices” command but none worked. And finally I found. Just add your Android device vendor ID (like 0x1f3a) to
~/.android/adb_usb.ini
and then try other advices.
[…] you are using Ubuntu or Fedora, you need to set up some things for ADB to work. You can follow my Ubuntu or my Fedora guide to set up ADB. With Linux Mint you just plug and play, that is the beauty of […]
[…] first, I cannot see Developer Options in Settings. According to Setting Up ADB/USB Drivers for Android Devices in Linux (Ubuntu) by Esau Silva, you have to open Settings?About phone then click on Build number 7 times to make it […]
Fine!
hello…great tutorial..planning to compile rom from source…may need your assistance when hooked…can i chat u on hangouts?kolodanjuma@gmail.com
Thank you so much for this, I had to redo this idk how many times for different systems and worked like a charm each time!
14.04 Trusty Tahr isn’t listed.
At the time this article was written, Ubuntu 14.04 was not around. Have you tried the tutorial in 14.04? did it work?
@jgezau – Thank you so much ! You have simplified all my efforts in connecting my Sony Xperia LT30at with adb in Fedora 23.
btw in fedora, i have used this udev rule: SUBSYSTEM==”usb”, ATTR{idVendor}==”0182″, MODE=”0666″
Again thanks much for sharing this info.
Glad it still applies to modern Fedora versions!!
Hey Guy.
I’m from Brazil
and i dont know who i got here.
But thank for your help.
You are welcome!!
What is “Gusty/Hardy/Dapper… Karmic Koala/Lucid Lynx/Maverick Meerkat”? I’m just trying to figure out how to get adb to see my tablet in ubuntu
those are the Ubuntu distribution names, which by the way those are pretty old versions..the current version is Ubuntu 16.04.01 “Xenial Xerus”…you can follow these instructions, which I believe they still work with current Ubuntu version
Thank You Thank You Thank You Thank You Thank You Thank You Thank You Thank You Thank You Thank You Thank You Thank You Thank You Thank You Thank You Thank You Thank You Thank You Thank You Thank You Thank You Thank You Thank You Thank You Thank You Thank You Thank You Thank You Thank You Thank You Thank You Thank You Thank You Thank You Thank You Thank You Thank You Thank You Thank You Thank You Thank You Thank You Thank You Thank You Thank You Thank You Thank You Thank You Thank You Thank You Thank You Thank You Thank You Thank You
You are welcome!!
Any help for Elementary OS install. I extracted adb files to home.
I’ve created the file “##-android.rules, but without a number (as I am not sure what to put). When I try to edit the file by opening it. The file opens in scratch, and then just says I can not make changes to the file and I have to save it somewhere else. Elementary does not come with gedit.
Thank you for any help.
You can use Vim to open the file, it’s pretty much standard with all of the Linux distros. The installation might be different in Elementary OS than in Ubuntu, I know because when I set up the drivers in Fedora, it was much easier than in Ubuntu
Thanks for the answer, I noticed it has vim to edit the file a little after posting. It’s been awhile since I used fedora (first distro I was introduced to), was used to using gedit back in the day. Wanted to try out something new to me with elementary os, since my primary os is windows as an network admin. Working nicely.
Cool 🙂