• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

DroidViews

  • Apps
  • Downloads
    • Android Apps
    • Themes
  • Guides
    • Root
  • ROMs
  • Reviews
  • Wallpapers
  • About Us
  • Contact Us

How to Setup ADB and USB drivers on Ubuntu

Naveen Robsworth | 02 Feb 2015 | Guides

Android operating system is the most versatile and powerful mobile OS platform so far and the reason behind is simple – a huge developer network. Being an open source platform, development on Android is a breeze and one can explore even the hardware level functions of the device. Development flexibility on this scale is missing in iOS and Windows niche because of their proprietary nature which restricts developers from exploring and tweaking. Many developers across the world strive for the improvement of the OS as well as the development for individual devices which brings many mods and ROMs to the Android users.

Being a Linux based platform, many Android developers use Linux based PC’s for the development which as you can realize, is the worst nightmare for beginners. Most beginners struggle to get their device detected by the PC which is the first step in the process of development. Without a proper connection with the device, one cannot carry on live debugging and tests on smartphones. So, you need to install proper USB drivers and setup Android SDK to obtain ADB tools and development kit which is used for the Android development.

Android SDK is a development environment for the Android operating system which allows you to simulate apps and mods on the emulator and test them on live devices with careful debugging. Developers need to take proper logs during the test phase to understand and resolve the errors during the process. For this, you will need a working ADB and USB drivers on your PC. ADB is the acronym for the Android  Debug Bridge which is a versatile command line tool that acts as a bridge between the Android device and the PC allowing data to be transfer.

In this tutorial, we will show you how to setup Android SDK on Ubuntu and setup ADB/USB drivers compatible with your Android device. The process involves playing with a few Linux commands but you don’t need to have a prior knowledge of these as we laid them quite simply. However, we request you to understand the process for knowledge purpose which will improve your understanding towards Android development. Follow the tutorial carefully and avoid typos unless you want to face a lot of errors in the process. So, let’s jump into the tutorial without any further ado

Prepare your Device

  • Make sure to use a proper USB cable while connecting to your PC as faulty cables might not show your device on the PC.
  • Enable USB Debugging on your phone from Settings> Developer options. If you do not find Developer option under device settings, read the instructions given here.

How to Setup ADB/USB drivers on Ubuntu

Part 1: Installing SDK and ADB

  1. Download the latest Android SDK from the Google’s developers page → Click Here
  2. At the time of writing this tutorial, the SDK version is r24.0.2. So, we will use the SDK file name as android-sdk_r24.0.2-linux.tgz in this tutorial for convenience, you must change the name to the version you have downloaded.
  3. Extract the downloaded tgz package to your profile directory which will be /home/your-username. To do this, follow the below instructions:
    • First, navigate to the the home directory of your profile. Execute the following command in the command terminal (Modify it with your username):
      cd /home/your-username
    • Now run the following command to extract the tgz package (Replace file name with the version you have downloaded):
      tar -xvzf android-sdk_r24.0.2-linux.tgz

      Don’t close the command terminal yet.

  4. Navigate to the tools folder of the SDK package you have extracted. To do this run the following command.
    cd ~/android-sdk-linux/tools

    Here, ~ indicates the current directory which should be /home/your-username/ directory if you have continued in the same terminal as in step 3.

  5. Finally run the following command to launch the Android SDK manager:
    ./android
  6. This will open a GUI based Android SDK manager. Download the necessary packages from the tool.
  7. To run ADB commands, you need to edit the bashrc file to add the ADB path in the environment variables of your PC. To edit the bashrc file, use the following command (You can use any editor)
    sudo gedit .bashrc

    Using sudo command may ask for the Linux password, enter your user password. This will allow you to operate the command with superuser permissions for a short time as specified in the sudoers file.

  8. The previous command will open the bashrc file in the GNU editor, add the following lines at the end of the file and save it.
    export PATH=${PATH}:~/android-sdk-linux/tools
    export PATH=${PATH}:~/android-sdk-linux/platform-tools

This completes the SDK and ADB installation on your Ubuntu based PC. Now follow the below instructions to install USB drivers for your Android smartphone on your PC. Part 2: Installing USB drivers for your device

  1. Create an empty file in the /etc/udev/rules.d/ directory with the following name:
    • If you’re using the Ubuntu version Gusty/Hardy/Dapper, create the file with the name 50-android.rules. Execute the following command to do so:
      sudo gedit /etc/udev/rules.d/50-android.rules
    • If you’re using the Ubuntu version Karmic Koala/Lucid Lynx/Maverick Meerkat, create the file with the name 70-android.rules. Execute the following command to do so:
      sudo gedit /etc/udev/rules.d/70-android.rules
  2. Type the following content in the editor and save it.
    • For Gusty/Hardy: SUBSYSTEM==”usb”, SYSFS{idVendor}==”USB-VENDOR-ID”, MODE=”0666″
    • For Dapper: SUBSYSTEM==”usb_device”, SYSFS{idVendor}==”USB-VENDOR-ID”, MODE=”0666″
    • For Karmic Koala: SUBSYSTEM==”usb”, SYSFS{idVendor}==”USB-VENDOR-ID”, MODE=”0666″
    • For Lucid Lynx: SUBSYSTEM==”usb”, SYSFS{idVendor}==”USB-VENDOR-ID”, MODE=”0666″
    • For Maverick Meerkat: SUBSYSTEM==”usb”, ATTR{idVendor}==”USB-VENDOR-ID”, MODE=”0666″

    Change the USB-VENDOR-ID string with the USB vendor ID of your device. You can get it from the table below:

    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
  3. Now you have to append read permissions to the created file for all the profiles in the PC. Use one of the following command to do this:
    sudo chmod a+rx /etc/udev/rules.d/50-android.rules

    or

    sudo chmod a+rx /etc/udev/rules.d/70-android.rules
  4. Reboot your PC for the changes to take place.

That’s it. You have successfully installed ADB and USB drivers on your Ubuntu PC. Now connect your device to the PC using an USB cable and  execute the following command in the terminal to test whether the device is detected by your PC or not.

adb devices

If your device is detected by the PC, you will see a serial number similar to the one below in the terminal.

List of devices attached V00776140945011 device

Feel free to ask any queries in the comments section below.

Tags: ADB and Fastboot How to Guides Tips and Tricks

Related Posts

dual boot

How To Dual Boot Android and Windows

android versions

How to Downgrade Android Versions

lg

How to Add Any App to LG UX’s Dual App Feature

Reader Interactions

Discussion

  1. Sep 4, 2017 at 2:29 PM
    aodh says:
    Reply

    I tried all the above and “adb devices” still showed nothing. I’m also on 16.04.

    • Nov 9, 2017 at 7:42 PM
      pallav says:
      Reply

      Hey! I think using android sdk from bin is no longer allowed. 😀

  2. Sep 26, 2016 at 4:34 AM
    Vybhav Jannat says:
    Reply

    Anybody help me out in downloading drivers on ubuntu 16.04

  3. Jul 31, 2016 at 7:19 AM
    sushil says:
    Reply

    I don’t have 70-android.rules available under path.

  4. Jun 23, 2016 at 10:29 PM
    Philip KP says:
    Reply

    Just so you know, it is easier to just type “sudo apt-get install android-tools-adb” into terminal and press enter. It does it all for you. 🙂

    • Dec 27, 2016 at 10:15 AM
      Sana Qureshi says:
      Reply

      Thanks, worked for me. 🙂

  5. May 27, 2016 at 1:12 AM
    Yves G. says:
    Reply

    Same here, Trusty Tar, what should that use?

  6. May 25, 2016 at 2:58 AM
    Alynur says:
    Reply

    What should the android rules number be for Peppermint 6 running Ubuntu 14.04?

  7. Apr 12, 2016 at 5:29 AM
    Ed Grange says:
    Reply

    Do you have an update for Trusty Tahr?

  8. Jan 15, 2016 at 6:52 PM
    Joao Domingues says:
    Reply

    The first part was ok , I think….

    But the drivers parts, uuffff…
    This is guru level instructions… I cannot identify the version of Ubuntu you are talking about

    lsb_release -a output is
    Release: 14.04
    Codename Trusty

    what instructions should I follow for the drivers ?

    Thanks in advance.

    🙂

  9. Sep 22, 2015 at 5:12 PM
    BitporBit says:
    Reply

    easily??¿???¿¿?¿??¿¿¿? where is the easily part???????

    • Jun 4, 2016 at 2:30 AM
      jefersonxsilva says:
      Reply

      I am also waiting for him to show how easy it is kkkkkkk

  10. May 19, 2015 at 8:17 AM
    Gniewko Ostrowski says:
    Reply

    not working for me … I even added ~/.android/adb_usb.ini 0x1004 – stands for LG, stuck with this 🙁

Join The Discussion: Cancel reply

We never share our visitor/user details. For more info, Please read our privacy policy before submitting your comment.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Primary Sidebar

Footer

  • Apps
  • Downloads
    • Android Apps
    • Themes
  • Guides
    • Root
  • ROMs
  • Reviews
  • Wallpapers
  • About Us
  • Contact Us

Privacy Policy | Terms & Conditions
© 2025 · DroidViews