Skip to content

Posts tagged ‘user id’

One true adb_usb.ini to rule them all

August 21, 2012

jshmthws

We do a lot of work with adb here at Apkudo – obtaining and maintaining an adb connection to every Android device is no small task. We could go on and on about some of the more interesting trials and tribulations with adb – there are lots, but why not start with one of the the more boring (and most common) causes for problem? A missing USB vendor id in adb_usb.ini. You know the drill: you plug in a new Android device, run adb devices, and… crickets. Nothing. Then it’s a bit of messing with dmesg or lsusb to get the vendor id, an edit to your ~/.android/adb_usb.ini to add it in, and you’re off and running again. A little annoying.

Here’s a way to ensure you’ll never have the issue again: we’ve created an adb_usb.ini containing every known Android vendor id! For good measure, we then went and threw in every other USB vendor on the planet – perhaps it will inspire them to some day create an Android device 🙂

To clone into your .android directory (for easy updating via git):

$ cd ~/.android
$ rm adb_usb.ini
$ git init
$ git remote add origin git@github.com:apkudo/adbusbini.git
$ git pull origin master

Alternatively, to just copy the latest file directly into your .android:

$ curl -L http://raw.github.com/apkudo/adbusbini/master/adb_usb.ini \
 --O ~/.android/adb_usb.ini

A parseable listing, in case you have other uses for the data, is included in VENDORS, using the following format:

<vendor_id> <is_android_vendor> <vendor_name>

For data sources, we used every Android device that we have (which is, we believe, all of them), the Linux USB listing at http://www.linux-usb.org/usb.ids, and the USB listing at http://www.usb.org/developers/tools/comp_dump. If you’re interested, the tool used to scrape the web data sources is in adbusbini_scrape.py.

Updates are very much encouraged and appreciated – please either submit a pull request or email to josh@apkudo.com.

Happy hacking,

Josh