3

How can I have Ubuntu recognize my Android mobile device when it is connected via USB? (Analogous to the Windows action mycomputer-> manage->devices etc.)

2
  • Welcome to Ask Ubuntu. Please tell us what you tried to do until now, what worked and what didn't work.
    – MadMike
    Mar 20, 2015 at 12:37
  • this helped me understand the UDEV linux.com/news/…
    – llan yort
    May 22, 2017 at 22:26

2 Answers 2

2
  1. Enable USB debugging on your device.

On most devices running Android 3.2 or older, you can find the option under

Settings > Applications > Development.

On Android 4.0 and newer, it's in

Settings > Developer options.

Note: On Android 4.2 and newer, Developer options is hidden by default. To make it available, go to Settings > About phone and tap Build number seven times. Return to the previous screen to find Developer options.

  1. Set up your system to detect your device.

If you're developing on Windows, you need to install a USB driver for adb. For an installation guide and links to OEM drivers, see the OEM USB Drivers document.

If you're developing on Mac OS X, it just works. Skip this step.

If you're developing 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, below.

To set up device detection on Ubuntu Linux:

Log in as root and create this file:

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

Use this format to add each vendor to the file:

SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", MODE="0666", GROUP="plugdev" 

In this example, the vendor ID is for HTC. The MODE assignment specifies read/write permissions, and GROUP defines which Unix group owns the device node.

Vendor Ids:

  • Acer: 0502
  • ASUS: 0B05
  • Dell: 413C
  • Foxconn: 0489
  • Garmin-Asus: 091E
  • Google: 18D1
  • Hisense: 109B
  • HTC: 0BB4
  • Huawei: 12D1
  • K-Touch: 24E3
  • KT Tech: 2116
  • Kyocera: 0482
  • Lenevo: 17EF
  • LG: 1004
  • Motorola: 22B8
  • NEC: 0409
  • Nook: 2080
  • Nvidia: 0955
  • OTGV: 2257
  • Pantech: 10A9
  • Pegatron: 1D4D
  • Philips: 0471
  • PMC-Sierra: 04DA
  • Qualcomm: 05C6
  • SK Telesys: 1F53
  • Samsung: 04E8
  • Sharp: 04DD
  • Sony Ericsson: 0FCE
  • Toshiba: 0930
  • ZTE: 19D2

Note: The rule syntax may vary slightly depending on your environment. Consult the udev documentation for your system as needed. For an overview of rule syntax, see this guide to writing udev rules.

Now execute:

chmod a+r /etc/udev/rules.d/51-android.rules
0
0

You must add a .rules file to allow Ubuntu to recognize your device. Here is a summary of the process:

Make a udev file for the device that you are using. Each device manufacturer is identified by a unique vendor ID

Log in as root and create this file: /etc/udev/rules.d/51-android.rules

Use the following format to add each vendor to the file: SUBSYSTEM==\"usb\", ATTR{idVendor}==\"18D1\", MODE=\"0666\", GROUP=\"plugdev\"

Then execute chmod a+r /etc/udev/rules.d/51-android.rules.

Credit to, and more information (including a list of vendor ids), here.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .