[Q] How to install adb on linux??? (ubuntu)

Search This thread

jamizzal

Senior Member
Sep 29, 2007
610
5
NWK
Hey guys im pretty good with adb, not many problems at all but ive recently ditched windows for a real os Ubuntu but im not super familiar with the commands and how to do this and that. Can someone hep me with setting up adb in Linux the guide posted is really rough for noobs to linux.
 

rsfaze

Senior Member
Jan 14, 2007
1,149
59
Orlando, Fl
well if you using linux then you will be using terminal to type out the adb commands. once you installed adb into linux you can type adb /? and it will give you the list of commands. In most cases you have to use sudo when running adb commands, at least using sudo when starting the adb server.
 
  • Like
Reactions: _django_

jamizzal

Senior Member
Sep 29, 2007
610
5
NWK
no i have no problem using adb at all, i was asking how to install it i cant get it to run in the first place ?
 

sonikamd

Senior Member
Jan 7, 2008
236
6
you have to follow the steps for linux, they are mostly meant for ubuntu afaik. Download the special linux SDK, Eclipse etc. One thing you should do to make adb work is add your sdk/tools directory to linux's $PATH.

It should go something like this...

$ echo $PATH (should return the directories associated with $PATH)
$ export PATH=$PATH:/home/user/sdk/tools (replace with path to your tools directory, you may need to add 'sudo' to the beginning of this cmd)
$ echo $PATH (you should now see your tools directory added to the end of the $PATH variable)
$ adb devices (now adb should do something, if nothing else at least error, no devices)

Is this what you were looking for? or some other issue..
 
Last edited:

jamizzal

Senior Member
Sep 29, 2007
610
5
NWK
you have to follow the steps for linux, they are mostly meant for ubuntu afaik. Download the special linux SDK, Eclipse etc. One thing you should do to make adb work is add your sdk/tools directory to linux's $PATH.

It should go something like this...

$ echo $PATH (should return the directories associated with $PATH)
$ export PATH=$PATH:/home/user/sdk/tools (replace with path to your tools directory, you may need to add 'sudo' to the beginning of this cmd)
$ echo $PATH (you should now see your tools directory added to the end of the $PATH variable)
$ adb devices (now adb should do something, if nothing else at least error, no devices)

Is this what you were looking for? or some other issue..

thank you you are officially great
 

Cetin

Senior Member
Nov 6, 2007
245
21
you have to follow the steps for linux, they are mostly meant for ubuntu afaik. Download the special linux SDK, Eclipse etc. One thing you should do to make adb work is add your sdk/tools directory to linux's $PATH.

It should go something like this...

$ echo $PATH (should return the directories associated with $PATH)
$ export PATH=$PATH:/home/user/sdk/tools (replace with path to your tools directory, you may need to add 'sudo' to the beginning of this cmd)
$ echo $PATH (you should now see your tools directory added to the end of the $PATH variable)
$ adb devices (now adb should do something, if nothing else at least error, no devices)

Is this what you were looking for? or some other issue..

Thank youu a lot! It's working with this but everytime I am rebooting Ubunutu 9.04 I have to type in these commands again to get adb...
what can I do?
 

koala996

Senior Member
Sep 18, 2007
477
0
Bruxelles-Brussels
you have to put this command in your .bashrc file
$ sudo gedit ~/.bashrc

then you need to enter your password

in the file you just need to add that command at the end :

PATH=$PATH:/SDK_PATH/tools/
export PATH

SDK_PATH.. you need to put your path .. something like ~/android-sdk-linux/
then you need to reboot to see if it works ;-)

enjoy !
 

Karolis

Senior Member
Jan 2, 2008
795
15
This is how I did it on my machine:

1. Download this zip file
2. Extract the file and copy both files to /usr/bin/
3. In the terminal type lsusb and copy first 4 ID symbols for High Tech Computer Corp
4. In the terminal type sudo gedit /etc/udev/rules.d/51-android.rules and paste the following SUBSYSTEM=="usb",ATTRS(idVendor)=="0bb4",SYMLINK+="android_adb",MODE="0666" where the bold symbols are taken from step #3.
5. Save and close everything. Unplug your device and plug it back again. ADB should now work as supposed.
 

that.dude

Member
Oct 19, 2010
11
4
Thanks for this easy instruction and for the files Karolis. Everything works fine on Ubuntu 10.10 x64 :)
 

xgumbyx

Member
Jun 2, 2008
38
1
4. In the terminal type sudo gedit /etc/udev/rules.d/51-android.rules and paste the following SUBSYSTEM=="usb",ATTRS(idVendor)=="0bb4",SYMLINK+="android_adb",MODE="0666" where the bold symbols are taken from step #3.
Just in case anyone else runs across this, in Suse 11.3 I needed to replace the brackets around idVendor with curly braces.

Code:
SUBSYSTEM=="usb",ATTRS{idVendor}=="04e8",SYMLINK+="android_adb",MODE="0666"

Even after that, I don't seem to get any devices in adb

Code:
# adb devices
List of devices attached

Here is /var/log/messages when plugging the device in
Code:
Apr  8 16:40:38 vaio kernel: [362518.911578] usb 2-1.1: new high speed USB device using ehci_hcd and address 9
Apr  8 16:40:38 vaio kernel: [362518.997898] usb 2-1.1: New USB device found, idVendor=04e8, idProduct=681c
Apr  8 16:40:38 vaio kernel: [362518.997905] usb 2-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Apr  8 16:40:38 vaio kernel: [362518.997910] usb 2-1.1: Product: SAMSUNG_Android
Apr  8 16:40:38 vaio kernel: [362518.997914] usb 2-1.1: Manufacturer: SAMSUNG
Apr  8 16:40:38 vaio kernel: [362518.997918] usb 2-1.1: SerialNumber: 3030610AA1A700EC
Apr  8 16:40:38 vaio kernel: [362519.007324] cdc_acm 2-1.1:1.0: This device cannot do calls on its own. It is not a modem.
Apr  8 16:40:38 vaio kernel: [362519.007426] cdc_acm 2-1.1:1.0: ttyACM0: USB ACM device
Apr  8 16:40:38 vaio kernel: [362519.016244] scsi11 : usb-storage 2-1.1:1.2
Apr  8 16:40:38 vaio modem-manager: (ttyACM0) opening serial device...
Apr  8 16:40:38 vaio modem-manager: (ttyACM0): probe requested by plugin 'Generic'
Apr  8 16:40:39 vaio kernel: [362520.016848] scsi 11:0:0:0: Direct-Access     Android  UMS Composite    0001 PQ: 0 ANSI: 2
Apr  8 16:40:39 vaio kernel: [362520.017149] sd 11:0:0:0: Attached scsi generic sg2 type 0
Apr  8 16:40:39 vaio kernel: [362520.021880] scsi 11:0:0:1: Direct-Access     Android  UMS Composite    0001 PQ: 0 ANSI: 2
Apr  8 16:40:39 vaio kernel: [362520.022034] sd 11:0:0:1: Attached scsi generic sg3 type 0
Apr  8 16:40:39 vaio kernel: [362520.026214] sd 11:0:0:0: [sdc] Attached SCSI removable disk
Apr  8 16:40:39 vaio kernel: [362520.027091] sd 11:0:0:1: [sdd] Attached SCSI removable disk
Apr  8 16:40:42 vaio modem-manager: (ttyACM0) closing serial device...
Apr  8 16:40:42 vaio modem-manager: (Generic): GSM modem /sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.1 claimed port ttyACM0
Apr  8 16:40:42 vaio modem-manager: Added modem /sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.1
Apr  8 16:40:42 vaio modem-manager: Exported modem /sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.1 as /org/freedesktop/ModemManager/Modems/5

ls -al /dev/android_adb before plugging phone in
Code:
# ls -al /dev/android_adb 
ls: cannot access /dev/android_adb: No such file or directory

and after
Code:
ls -al /dev/android_adb
lrwxrwxrwx 1 root root 15 2011-04-08 16:35 /dev/android_adb -> bus/usb/002/008

Am I doing something wrong?
 
Last edited:

Jwtiyar

Senior Member
Nov 27, 2010
1,825
221
34
Sulaymaniyah
Google Pixel 7
Google Pixel 7 Pro
i did all thing but it stiil dont show this first in terminal
Code:
$ echo $PATH (should return the directories associated with $PATH)
$ export PATH=$PATH:/home/user/sdk/tools (replace with path to your tools directory, you may need to add 'sudo' to the beginning of this cmd)
$ echo $PATH (you should now see your tools directory added to the end of the $PATH variable)

thanks.
 

iAMsalm

Member
Dec 5, 2008
24
16
you have to put this command in your .bashrc file
$ sudo gedit ~/.bashrc

then you need to enter your password

in the file you just need to add that command at the end :

PATH=$PATH:/SDK_PATH/tools/
export PATH

SDK_PATH.. you need to put your path .. something like ~/android-sdk-linux/
then you need to reboot to see if it works ;-)

enjoy !

Thanks bud, this helped me out.. Recently installed Ubuntu back on my machine and could not remember for the life of me how to do this lol. So, thanks again. :D
 

abbas_ubuntu

New member
Feb 11, 2012
1
0
Hi My name is abbas, I followed the procedure to set the path in ubuntu for adb, however after setting the path: when I typed
$adb
the response was:
$ error while loading shared libraries: libncurses.so.5: wrong ELF class: CLASS64
 

HooLIMAN87

Senior Member
Jan 4, 2012
342
96
Novi Sad
Can someone help me, i'm using both Windows and Linux Ubuntu 11.10 OS, and i did manage to get adb to work on Windows, but now i prefer Linux and i can't manage adb to work. Downloaded sdk, proprietary platform etc. . . Exported path, installed lsusb-1.0.8, edited rules and inserted rules for Sony Ericsson etc. But when i type $ sudo adb start-server (then i type my password) it says that command is unknown. " sudo: adb: command not found " so my question is what the f**k i'm doing wrong? :(

EDIT: Changed location of sdk folder, eclipse. . . And it worked, tnx anyway. . .
 
Last edited:

TheRinseM

Senior Member
Jan 31, 2013
899
1,349
you have to follow the steps for linux, they are mostly meant for ubuntu afaik. Download the special linux SDK, Eclipse etc. One thing you should do to make adb work is add your sdk/tools directory to linux's $PATH.

It should go something like this...

$ echo $PATH (should return the directories associated with $PATH)
$ export PATH=$PATH:/home/user/sdk/tools (replace with path to your tools directory, you may need to add 'sudo' to the beginning of this cmd)
$ echo $PATH (you should now see your tools directory added to the end of the $PATH variable)
$ adb devices (now adb should do something, if nothing else at least error, no devices)

Is this what you were looking for? or some other issue..

Thanks alot!
 

Top Liked Posts

  • There are no posts matching your filters.
  • 5
    you have to follow the steps for linux, they are mostly meant for ubuntu afaik. Download the special linux SDK, Eclipse etc. One thing you should do to make adb work is add your sdk/tools directory to linux's $PATH.

    It should go something like this...

    $ echo $PATH (should return the directories associated with $PATH)
    $ export PATH=$PATH:/home/user/sdk/tools (replace with path to your tools directory, you may need to add 'sudo' to the beginning of this cmd)
    $ echo $PATH (you should now see your tools directory added to the end of the $PATH variable)
    $ adb devices (now adb should do something, if nothing else at least error, no devices)

    Is this what you were looking for? or some other issue..
    2
    This is how I did it on my machine:

    1. Download this zip file
    2. Extract the file and copy both files to /usr/bin/
    3. In the terminal type lsusb and copy first 4 ID symbols for High Tech Computer Corp
    4. In the terminal type sudo gedit /etc/udev/rules.d/51-android.rules and paste the following SUBSYSTEM=="usb",ATTRS(idVendor)=="0bb4",SYMLINK+="android_adb",MODE="0666" where the bold symbols are taken from step #3.
    5. Save and close everything. Unplug your device and plug it back again. ADB should now work as supposed.
    1
    well if you using linux then you will be using terminal to type out the adb commands. once you installed adb into linux you can type adb /? and it will give you the list of commands. In most cases you have to use sudo when running adb commands, at least using sudo when starting the adb server.