I’ve been searching around the forums,the stickies and Google on how to install ADB in Ubuntu from scratch but I wasn’t able to get a guide anywhere. What I found mostly are for Windows or little bits and pieces of info which did not cover the whole thing. Which is when I decided to grab some Tab and Mountain Dew, and Google my way through to make it work and share it to those who had trouble or no idea how to install it on Ubuntu
Step 1:
- Install JDK or Ubuntu
- In Terminal, do the following
$ sudo add-apt-repository ppa:sun-java-community-team/sun-java6 $ sudo apt-get update $ sudo apt-get install sun-java6-jre sun-java6-bin sun-java6-jdk
- Edit: If you want or need to use Eclipse, here’s a simple installation command
$ sudo apt-get install eclipse ruby rubygems ruby-dev libxml2 libxml2-dev libxslt-dev openjdk-6-jdk ant git $ sudo gem install nokogiri
Step 2:
- Download and intsall SDK
- Extract the android-sdk-linux_x86 folder from android-sdk_r10-linux_x86.tgz. Just double click the tgz file, and drag-n-drop the that lone folder to your desired location. In my case, I extracted the files to my Home Folder, which I highly recommend. I’ll also advice to not renaming the folder.
Step 3:
- In Terminal, type the following -
$ cd ~/android-sdk-linux_x86/tools $ ./android update sdk
- The ‘Android SDK and AVD Manager’ window will appear (screencap below). You can choose to accept all of them or just install all except for Android 1.5 and 1.6. Once installation is finished, it will prompt you to restart the manager. Just click ‘Yes’ and close the manager

- Now head over to the platform-tools directory and type this
$ cd ~/android-sdk-linux_x86/platform-tools
- Check if you have permission for your device
$ ./adb device
- If you get message something like this List of devices attached
???????????? no permissions. Then go on to fourth step.
- If you are getting random numbers with the word next to it it then you are done go to step 6th then.
Step 4:
- You’ll need to create a certain udev rule. First off type the following in Terminal:
$ sudo gedit /etc/udev/rules.d/99-android.rules
- Once the gedit window pops-up, type the following line
SUBSYSTEM=="usb", ATTRS{idVendor}=="####",SYMLINK+="android_adb", MODE="0666" GROUP="plugdev"
- Take note of ATTRS{idVendor}==”####”. Replace #### to the correct Vendor
ID of your device. If you’re using Acer, then it’s 0502, for HTC it’s
0bb4. ADB might not be able to detect your device if you use the wrong
ID. - Vendor ID:
Manufacturer USB Vendor ID Acer -0502 Dell -413c Foxconn -0489 Garmin-Asus -091E HTC -0bb4 Huawei -12d1 Kyocera -0482 LG -1004 Motorola -22b8 Nvidia -0955 Pantech -10A9 Samsung -04e8 Sharp -04dd Sony Ericsson -0fce ZTE -19D2
- Save the file and exit out of gedit. Back in Terminal execute the following
$ sudo chmod a+rx /etc/udev/rules.d/99-android.rules $ sudo restart udev
- Now to check if it works
$ ./adb devices
- You should be getting the following line or something similar.
List of devices attached 0123456789ABCDEF device
- Congrats you are done, if still fails try to restart the adb server, Most likely you have put in the wrong Vendor ID.
Step 5:
Here are some examples on running adb if you don’t create a path.
- To get into the phone
kay@millelune-~/android-sdk-linux_x86/platform-tools:~$ ./adb shell
- To grab files from phone
kay@millelune-~/android-sdk-linux_x86/platform-tools:~$ ./adb pull /system/etc/file.txt file.txt
- To send file to phone
kay@millelune-~/android-sdk-linux_x86/platform-tools:~$ ./adb push this.txt /sdcard/this.tx
Step 6:
- Create path for adb how follow the following steps type code
$ sudo gedit ~/.bashrc
- Add the following line at the very end of the file. Once you’re done, save and exit.
# Android tools
export PATH=${PATH}: ~/android-sdk-linux_x86/tools
export PATH=${PATH}: ~/android-sdk-linux_x86/platform-tools
- Now you can just run adb like it’s a command.
Via : Xda



Awesome write up. Still trying it out…the line $ sudo gem install nokogiri gives me an error msg