Showing posts with label udev. Show all posts
Showing posts with label udev. Show all posts

Wednesday, July 10, 2013

Installing Android platform tools (ADB) on Ubuntu and Debian systems

Here is a short script I use to install the latest version of Android platform tools on those of my systems I do not need full blown Android SDK on:




The script requires root permissions to install prerequisite packages. It downloads and unpacks adb and fastboot binaries into $ANDROID_SDK_HOME/platform-tools/ folder (or into ~/android/platform-tools/ if $ANDROID_SDK_HOME is not defined). The folder will be added to the current $PATH. And finally the script will create a universal udev rule to take care of device permissions for all Android devices regardless of their VendorID.

The script has been tested on 32 and 64-bit versions of Ubuntu 12.04, 12.10, 13.04, 13.10 and Debian 7.0, 7.1, 7.2.

Saturday, April 27, 2013

Universal udev rule for all Android devices

When an Android device is plugged in to a linux system, by default only root has access to the device. In order for regular users to be able to access the device - the device permissions need to be changed. To automate this, Google recommends  adding Vendor ID of every Android device as a separate line per ID.
I thought that there has to be a better way to do it. Here is the rule I came up with:

ACTION=="add", SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ENV{ID_USB_INTERFACES}=="*:ff420?:*", MODE="0666"


This rule matches all adb and fastboot interfaces for any android device, no matter the Vendor ID.