Introduction: Android adb and fastboot
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
Installing adb and fastboot
The last official package is for openSUSE Leap 42.3 and you can use zypper to install the tools on this edition:
sudo zypper install android-tools
Alternatively for all openSUSE editions beyond 42.3: Google is hosting a zip file with adb and fastboot for GNU/Linux:
- Download the Linux zip from Google.
- Extract it somewhere, e.g. ~/adb-fastboot.
- Add the following to ~/.profile:
if [ -d "$HOME/adb-fastboot/platform-tools" ] ; then export PATH="$HOME/adb-fastboot/platform-tools:$PATH" fi
Now you should log out and back in again. If you want to set up udev rules you can go to this repository for more info.
Setting up adb
On your Android device you have to enable developer options and USB debugging :
- Open Settings, and select "About".
- Tap seven times on "Build number".
- Than select "Developer options".
- Check the "Android debugging" entry under "Debugging".
- Plug your Android device to your computer.
- Open up a command line on your PC and type adb devices as root or use sudo.
- 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
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:
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: