Skip to content

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

3 Comments

Post a comment
  1. Jake #
    October 23, 2012

    This is Awesome!! Thanks!

  2. orenl #
    April 11, 2013

    Note:

    By default ‘adb’ is compiled to consider at most 128 vendor IDs (VENDOR_COUNT_MAX), including the ~30-40 built-in vendors.

    This means that only the first ~90 vendor entries in adb_usb.ini will be visible, and the rest ~3000 will be ignored.

    To remedy, either make sure your desired vendor IDs appear at the top, or recompile ‘adb’ with the limit increased to e.g. 4096.

  3. April 9, 2014

    I create a comment when I like a post on a site or I have something to valuable to contribute to the discussion.
    Usually it’s caused by the fire communicated in the post
    I read. And after this post One true adb_usb.ini to rule them all |
    apkudo. I was actually moved enough to drop a commenta response ;-) I actually do have some questions for you if it’s okay.

    Is it simply me or do some of these responses appear as if they are coming from brain dead individuals? :-P And, if you are writing at other online social sites, I’d like to keep up with
    you. Could you list the complete urls of your public pages like
    your Facebook page, twitter feed, or linkedin
    profile?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 987 other followers

%d bloggers like this: