TheEYL TheEYL - 1 year ago 137
Android Question

How to debug using an android phone on Ubuntu Linux?

I have a Haier phone model W716 and I'm using ubuntu to develop my android applications. The issue I have is that I Google USD Driver is not compatible with linux and thus eclipse doesn't detect my device.

Android Device Chooser

How do I proceed to make my device appear?

Answer Source
  1. Enable USB debugging on your device.

  2. Since development is on Ubuntu Linux, you need to add a udev rules file that contains a USB configuration for each type of device you want to use for development. In the rules file, each device manufacturer is identified by a unique vendor ID, as specified by the ATTR{idVendor} property.

    For a list of vendor IDs, see USB Vendor IDs,

  3. Now if you really ain't on the VIP list you'll have to write the udev rules yourself in order to access devices connected to USB via adb or fastboot on linux.

    • Verify your username is included in the plugdev group. Type

    • From a terminal and look for plugdev in the listed groups. If you do not see plugdev listed, you can add your username to the group with:

          sudo gpasswd -a username plugdev

      where username should be replaced with your linux username.

    • After setting the device in USB Debug mode and connecting it to a USB port, throw the command :


      You should get an output similar to this

          ...Bus 002 Device 034: ID 0bb4:0c03 High Tech Computer Corp.

      The number after ID and preceding the colon is the ATTR{idVendor}

    • Copy the set of rules listed here,, to a text file and save it as /etc/udev/rules.d/51-android.rules.You will need sudo/su to write to that directory. So, for instance:

          sudo nano /etc/udev/rules.d/51-android.rules

      Use this format to add new vendor to the file:

          SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", MODE="0666", GROUP="plugdev" 
    • If you cannot access your device via adb, even after adding your linux user to the plugdev group and restarting the computer, you can try starting the adb service as root. This is dangerous and not recommended but it worked for me:

           adb kill-server
           sudo $(which adb) start-server
           adb devices
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download