ADB

ADB is Android Debug Bridge, a protocol over USB (OTG) to provide many necessary system access services.

A full explanation on how to use ADB is provided at the android developer website.

= Common pitfalls =

No devices found
If you run adb devices, and it shows no devices: List of devices attached

Then verify that your device is present on the usb bus, by running lsusb: Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub Bus 002 Device 032: ID abcd:1234

You then need to make sure that adb knows about this new vendor id: mkdir ~/.android/ echo "0xabcd" > ~/.android/adb_usb.ini

You need to restart adb for this to take effect: adb kill-server

Only root has access
You need to alter the permissions of your usb device through udev.

Add a file 51-android.rules in /etc/udev/rules.d/ with the following content (with the ID matching what lsusb says).

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

When you now update udev, you should be able to access the device as a user:

udevadm trigger