Android Tools

Jump to: navigation, search

The Android Debug Bridge (adb) and fastboot are tools from the Android tools suite. With a USB connection between a PC and a device (your ARM board, a mobile phone, a tablet, ...) they allows to:

  • load kernel/initrd from host PC to device RAM and boot them
  • create/erase and read/write flash partition
  • save and install Android apps
  • flash Android images
  • reboot the device from command line

Installation

Both commands come from package android-tools. The package is not available in official repositories. You can install it from OBS.

Setting up adb

On your Android device you have to enable developer options and USB debugging :

  1. Open Settings, and select "About".
  2. Tap seven times on "Build number".
  3. Than select "Developer options".
  4. Check the "Android debugging" entry under "Debugging".
  5. Plug your Android device to your computer.
  6. Open up a command line on your PC and type adb devices as root or use sudo.
  7. A dialog should shows up and it's asking you to allow USB debugging.

Setting up fastboot

Start your device in fastboot mode (special boot sequence for phone/tablet like pressing vol+ and power, for u-boot, just type fastboot command in u-boot prompt). Plug a USB cable between your host PC and your device.

While in fastboot mode, you can type fastboot on your command line as root (or use sudo) to verify that your phone or other device is being detected.

If you type

 fastboot devices

on your host PC it should list available devices.

Get the fastboot protocol version of your device with:

 fastboot getvar version

To reboot your device, just type:

 fastboot reboot

or

 fastboot reboot-bootloader

To load a kernel and boot it:

 fastboot boot <kernel> [ <ramdisk> ] 

Note: You may need to append the device tree to the kernel.

Fastboot on your ARM board

Fastboot is now included in uptream u-boot, but not all functions are available compared to Android (device) fastboot. You cannot flash your on board memory, for example.

Currently, upstream u-boot (2014.10) enables fastboot on the following boards:

See also

openSUSE:imx_usb_loader