Skip to content

Fastboot & ADB

TL;DR

Fastboot is a protocol spoken with ABL (Android Boot Loader) for partition-level read/write: flash boot, vendor_boot, vbmeta, modem, wipe slots, switch A/B. ADB (Android Debug Bridge) is a protocol spoken with the running Android OS (or recovery) for shell access, logcat, file push/pull, and app debugging. On a hypervisor cockpit, your AAOS vCPU guest exposes ADB over USB or TCP; fastboot typically requires rebooting that guest into bootloader mode (or a dedicated fastboot path from the host). Fastboot changes what’s on disk. ADB inspects what’s in RAM and running processes. They’re complementary, not interchangeable.

You live in terminals. This page is the cheat sheet taped to your monitor: commands you’ll run ten times before lunch, and the vCPU context that explains why adb devices sometimes shows nothing while QNX shell works fine.

Fastboot is a text protocol over USB (or UDP on some setups). The device must be in fastboot mode, with ABL presenting a minimal command interface instead of booting the kernel.

flowchart LR
HOST["Host: fastboot CLI"] <-->|USB| ABL["ABL in fastboot mode"]
ABL --> UFS["Read/Write GPT partitions"]
ABL -->|"reboot"| OS["Boot kernel from slot"]
Method Command / Action
From running Android adb reboot bootloader
From serial / script fastboot reboot-bootloader (if already in fastboot)
Key combo / bench jumper Platform-specific hardware entry
From QNX host (some setups) Trigger guest reboot to bootloader via hypervisor policy
Common Gotcha

On multi-OS hypervisor platforms, rebooting AAOS to fastboot may not tear down QNX. The guest reboots while the host keeps running. Your serial console may still show QNX logs while fastboot is active on the USB gadget port. Know which USB port routes to the AAOS guest vs diagnostic bridge.

Command What It Does
fastboot devices List connected fastboot devices
fastboot getvar all Dump bootloader variables (slot, security, partition sizes)
fastboot flash boot boot.img Write boot.img to current slot’s boot partition
fastboot flash boot_a boot.img Write explicitly to slot A
fastboot flash boot_b boot.img Write explicitly to slot B
fastboot flash super super.img Flash dynamic partition container
fastboot flash vbmeta vbmeta.img Flash verified boot metadata
fastboot flash modem NON-HLOS.bin Flash AMSS/modem firmware
fastboot flash vendor_boot vendor_boot.img Flash vendor ramdisk (GKI)
fastboot erase userdata Wipe userdata (destructive)
fastboot -w Wipe userdata + cache (common in flash-all scripts)
fastboot reboot Reboot to OS
fastboot reboot recovery Reboot to recovery
fastboot set_active a Mark slot A as active for next boot
fastboot set_active b Mark slot B as active for next boot
fastboot update ota.zip Apply OTA package from fastboot (if supported)

Always know which slot you’re writing:

Terminal window
fastboot getvar current-slot
# current-slot: a
fastboot flash boot_b boot.img # write inactive slot for OTA-style test
fastboot set_active b # switch boot target
fastboot reboot

Flash the inactive slot to test safely. If the new boot fails, ABL falls back to the other slot (if verification and bootctrl allow).

ADB talks to adbd daemon in Android userspace (or recovery). Device must boot far enough for the daemon to start, or be in recovery mode.

flowchart LR
HOST["Host: adb CLI"] <-->|USB/TCP| ADBD["adbd in AAOS"]
ADBD --> SHELL["shell, logcat, install"]
ADBD --> FILES["push / pull"]
ADBD --> APPS["am, pm, dumpsys"]
Command What It Does
adb devices List connected devices (check authorization state)
adb shell Interactive shell on device
adb logcat Live log stream — filter by tag: adb logcat -s UpdateEngine
adb logcat -b all All buffers (main, system, crash, kernel if enabled)
adb push local remote Copy file to device
adb pull remote local Copy file from device
adb install app.apk Install APK
adb root Restart adbd as root (userdebug/eng builds only)
adb remount Remount system partitions rw (eng builds)
adb reboot bootloader Reboot to fastboot
adb reboot recovery Reboot to recovery
adb tcpip 5555 Enable ADB over network
adb connect 192.168.1.50:5555 Connect to device over TCP
adb shell bootctl get-current-slot Query active A/B slot from running OS
adb shell getprop ro.build.fingerprint Build identity
adb shell dumpsys package Package/service state
Task ADB Approach
UpdateEngine logs adb logcat -s update_engine UpdateEngine
Check OTA state adb shell dumpsys update_engine
Verify slot after OTA adb shell bootctl get-current-slot
HAL/service debug adb shell dumpsys android.automotive.* (service-dependent)
Pull tombstones adb pull /data/tombstones/
Property inspection adb shell getprop | grep ota
Mental Model

Fastboot is the loading dock — pallets (images) go directly into warehouse bays (partitions) through the freight door (ABL), no employees inside needed. ADB is the walkie-talkie to workers on the floor — you ask what’s happening, move small packages, read instrumentation — but you can’t rebuild the warehouse from inside. Need a new roof truss (boot image)? Use the loading dock.

On Qualcomm cockpit platforms, AAOS often runs as a guest VM under QHEE/QNX:

Aspect Implication
USB routing One physical USB port may map to AAOS guest only, host only, or switchable
ADB visibility Requires guest Android fully booted + adbd running + correct USB config
Fastboot Guest ABL must own the USB gadget — QNX host may need to release passthrough
Serial Often one UART multiplexes QNX + Android logs; use tags to filter
Network ADB Common on bench: adb connect over Ethernet VLAN to guest IP
Hypervisor policy Some partitions may be virtually mapped; fastboot still writes physical UFS seen by guest
  1. QNX host boots: cluster alive, serial shows QHEE + QNX
  2. AAOS guest starts: second boot chain in serial, Android animation
  3. ADB available: adb devices shows guest
  4. Need kernel test: adb reboot bootloaderfastboot flash bootfastboot reboot
  5. QNX unaffected, unless flash touched shared partitions or triggered full SoC reset
Userdebug vs User Builds

eng/userdebug builds allow adb root, adb remount, and verbose logging, standard for development. user builds (production-like) restrict root and disable many debug paths. If adb root returns “cannot run as root in production build,” you’re on a user build. Use logging APIs, bugreport (adb bugreport), or a debug-signed variant for deep inspection.

Goal Tool
Flash boot.img iteration fastboot
Flash full super.img fastboot (or QFIL for factory)
Read live logs during OTA ADB
Check active A/B slot from running OS ADB (bootctl)
Wipe bench unit userdata quickly fastboot -w
Install test APK ADB
Unbrick empty board QFIL (not fastboot)
Inspect partition sizes fastboot getvar all
Debug Android service state ADB (dumpsys)
Switch active slot without reflash fastboot set_active
Where You'll See This

Morning bench checklist:

Terminal window
# What's connected?
adb devices
fastboot devices
# What build is running?
adb shell getprop ro.build.display.id
# What slot?
adb shell bootctl get-current-slot
# About to flash: which slot am I targeting?
fastboot getvar current-slot

If the OS boots, use ADB. If you need to change what’s on UFS before OS boots, use fastboot. If fastboot doesn’t appear, use QFIL (Page 8.2).

When adb devices shows unauthorized, tap “Allow USB debugging” on the AAOS dev options screen, or check that USB routing targets the guest, not the QNX host’s empty gadget.

Connect the Dots

Page 8.1 names the partitions you pass to fastboot flash. Page 8.2 covers QFIL when fastboot isn’t available. Page 8.4 explains why flashing unsigned boot.img fails on user builds. Page 8.6 shows how OTA uses different paths than both fastboot and ADB.

  1. Fastboot = ABL partition I/O. ADB = running Android debug.
  2. Always check current slot before flashing. Protect your fallback.
  3. On vCPU cockpits, USB routing and guest boot state determine tool availability.
  4. eng/userdebug unlocks root/remount; user builds mirror production constraints.

Check Your Understanding

1. You need to flash a new boot.img without wiping userdata. Which tool and approach?

2. On a QNX + AAOS hypervisor bench, adb devices shows nothing but QNX is running. Most likely cause?

3. What is the primary difference between fastboot and ADB?