
Android Fastboot
- 68 installs
- 30 repo stars
- Updated January 28, 2026
- hyperb1iss/hyperdroid-skill
Runs fastboot operations: flashing partitions, unlocking bootloaders, recovery/sideload, TWRP and Magisk, and A/B slot management.
About
Covers fastboot partition flashing, bootloader unlocking, and recovery operations, with brick-avoidance safety checks. A developer uses it to flash boot images, unlock a bootloader, or manage device partitions.
- Safety checks: verify device, images, unlock state, battery
- Entering fastboot and core flashing/partition commands
Android Fastboot by the numbers
- 68 all-time installs (skills.sh)
- +4 installs in the week ending Aug 2, 2026 (Skillselion tracking)
- Ranked #573 of 1,039 Mobile Development skills by installs in the Skillselion catalog
- Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/hyperb1iss/hyperdroid-skill --skill android-fastbootAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 68 |
|---|---|
| repo stars | ★ 30 |
| Last updated | January 28, 2026 |
| Repository | hyperb1iss/hyperdroid-skill ↗ |
What it does
Runs fastboot operations: flashing partitions, unlocking bootloaders, recovery/sideload, TWRP and Magisk, and A/B slot management.
Files
Android Fastboot Operations
⚠️ DANGER ZONE - Fastboot operations write directly to device partitions. Wrong images or interrupted operations can brick devices. Always verify:
1. Correct device (check fastboot getvar product) 2. Correct images for exact device model 3. Bootloader is unlocked (for flashing) 4. Battery > 50%
---
Entering Fastboot Mode
# From ADB (device running)
adb reboot bootloader
# Hardware buttons (most devices)
# Power + Volume Down (hold until fastboot screen)Basic Commands
fastboot devices # List connected devices
fastboot getvar all # All device variables
fastboot reboot # Reboot to system
fastboot reboot bootloader # Stay in bootloader
fastboot reboot recovery # Boot to recovery
fastboot reboot fastboot # Boot to fastbootd (Android 10+)Check Before Flashing
# ALWAYS run these first
fastboot devices # Verify connection
fastboot getvar product # Verify device model
fastboot getvar unlocked # Must be "yes" for flashing
fastboot getvar current-slot # Know current A/B slot
fastboot getvar battery-level # Should be > 50---
Bootloader Unlocking
Google Pixel
# 1. Enable OEM unlocking in Developer Options
# 2. Boot to fastboot
adb reboot bootloader
# 3. Unlock
fastboot flashing unlock
# 4. Confirm on device with volume keys + power
# WARNING: This wipes all data!Other Manufacturers
| Brand | Process |
|---|---|
| OnePlus | fastboot oem unlock |
| Xiaomi | Mi Unlock Tool (waiting period) |
| Samsung | Uses Odin, not fastboot |
| Motorola | Request code from website, fastboot oem unlock <code> |
| Sony | Request code from website |
Check Unlock Status
fastboot getvar unlocked # yes/no
fastboot getvar device-state # locked/unlocked
fastboot getvar unlock_ability # Can be unlocked?---
Flashing Partitions
Individual Partitions
fastboot flash boot boot.img
fastboot flash recovery recovery.img # Non-A/B only
fastboot flash dtbo dtbo.img
fastboot flash vbmeta vbmeta.img
# Disable verification (for custom ROMs)
fastboot flash --disable-verity --disable-verification vbmeta vbmeta.imgBootloader & Radio (Extra Careful!)
# These can hard-brick if wrong!
fastboot flash bootloader bootloader.img
fastboot reboot bootloader # REQUIRED after bootloader flash
fastboot flash radio radio.img
fastboot reboot bootloader # Recommended after radio flashTemporary Boot (No Flash)
# Test before committing - reboots to normal after restart
fastboot boot recovery.img
fastboot boot patched_boot.img---
A/B Slot Devices
Modern devices have two copies of each partition (A and B).
# Check current slot
fastboot getvar current-slot # Returns: a or b
# Set active slot
fastboot set_active a
fastboot set_active b
# Flash to specific slot
fastboot flash boot_a boot.img
fastboot flash boot_b boot.img
# Flash to both slots
fastboot --slot=all flash boot boot.img---
Dynamic Partitions (Android 10+)
Large partitions (system, vendor, product) live inside a "super" partition.
Fastbootd Mode
# Enter userspace fastboot
fastboot reboot fastboot
# Check if in fastbootd
fastboot getvar is-userspace # Should return: yesFlash Dynamic Partitions
# Must be in fastbootd mode!
fastboot reboot fastboot
fastboot flash system system.img
fastboot flash vendor vendor.img
fastboot flash product product.imgVirtual A/B Snapshots
# Check snapshot status
fastboot getvar snapshot-update-status
# Cancel stuck update (CAREFUL!)
fastboot snapshot-update cancel---
Recovery Operations
Enter Recovery
adb reboot recovery
# Or: Power + Volume Up (varies by device)ADB Sideload
# 1. In recovery, select "Apply update from ADB"
# 2. Run:
adb sideload update.zipFlash Custom Recovery (TWRP)
# Test first (temporary boot)
fastboot boot twrp.img
# If it works, flash permanently
# Non-A/B devices:
fastboot flash recovery twrp.img
# A/B devices (recovery in boot):
fastboot flash boot twrp.img---
Magisk (Root)
Installation
# 1. Extract boot.img from your firmware
# 2. Transfer to device, patch with Magisk app
# 3. Pull patched image
adb pull /sdcard/Download/magisk_patched_*.img
# 4. Flash patched boot
fastboot flash boot magisk_patched_*.img
# 5. Reboot
fastboot rebootUseful Magisk Commands (after rooted)
adb shell su -c "magisk --version"
adb shell su -c "resetprop ro.debuggable 1"---
Factory Reset / Wipe
fastboot erase userdata # Wipe user data
fastboot erase cache # Wipe cache (if exists)
fastboot -w # Format data + cache
# Full flash with wipe
fastboot -w flashall
fastboot -w update image.zip---
Danger Levels
| Level | Operations |
|---|---|
| ✅ SAFE | devices, getvar, reboot, boot (temp) |
| ⚠️ MEDIUM | flash boot/recovery/dtbo, set_active |
| 🔴 HIGH | flash system/vendor, erase, -w |
| ☠️ CRITICAL | flash bootloader, flash radio, flashing lock with custom OS |
---
Brick Prevention
Never:
- Flash images from different device models
- Interrupt a flash operation
- Lock bootloader with custom ROM installed
- Flash bootloader/radio without matching versions
Always:
- Verify device with
fastboot getvar product - Keep stock images available for recovery
- Use
fastboot bootto test beforefastboot flash - Maintain battery > 50%
---
Recovery from Soft Brick
# 1. Enter fastboot (Power + Vol Down)
fastboot devices
# 2. Flash stock boot
fastboot flash boot boot.img
# 3. For dynamic partitions
fastboot reboot fastboot
fastboot flash system system.img
fastboot flash vendor vendor.img
# 4. Wipe if needed
fastboot -w
# 5. Reboot
fastboot rebootFor hard bricks (no fastboot access), you need EDL mode (Qualcomm) or manufacturer service tools.
---
Quick Reference
| Task | Command |
|---|---|
| Check connection | fastboot devices |
| Device info | fastboot getvar all |
| Unlock bootloader | fastboot flashing unlock |
| Flash boot | fastboot flash boot boot.img |
| Test recovery | fastboot boot twrp.img |
| Current slot | fastboot getvar current-slot |
| Switch slot | fastboot set_active a |
| Wipe data | fastboot -w |
| Reboot | fastboot reboot |
Android Partition Reference
Partition Types
Boot Partitions
| Partition | Purpose | A/B Naming |
|---|---|---|
boot | Kernel + ramdisk | boot_a, boot_b |
init_boot | Init ramdisk (Android 13+) | init_boot_a, init_boot_b |
vendor_boot | Vendor ramdisk (GKI) | vendor_boot_a, vendor_boot_b |
recovery | Recovery (non-A/B only) | N/A on A/B devices |
dtbo | Device tree overlay | dtbo_a, dtbo_b |
vbmeta | Verified boot metadata | vbmeta_a, vbmeta_b |
System Partitions (Dynamic on Android 10+)
| Partition | Purpose |
|---|---|
super | Container for dynamic partitions |
system | Android OS |
system_ext | System extensions |
vendor | Vendor HALs and binaries |
product | Product customizations |
odm | ODM customizations |
Data Partitions
| Partition | Purpose |
|---|---|
userdata | User data (apps, files) |
cache | Cache (non-A/B) |
metadata | Encryption metadata |
misc | Bootloader communication |
persist | Factory calibration data |
Critical Partitions (⚠️ Careful!)
| Partition | Purpose | Risk |
|---|---|---|
bootloader | Device bootloader | Hard brick if wrong |
radio / modem | Baseband firmware | Hard brick if wrong |
aboot | Bootloader (older) | Hard brick |
sbl | Secondary bootloader | Hard brick |
tz | TrustZone | Hard brick |
---
A/B (Seamless) Updates
Modern devices have two copies of key partitions for seamless updates.
How It Works
1. System runs from slot A 2. Update installs to slot B (in background) 3. Reboot switches to slot B 4. If B fails, automatically falls back to A
Commands
fastboot getvar current-slot # a or b
fastboot getvar slot-count # Usually 2
fastboot getvar slot-successful:a # yes/no
fastboot getvar slot-retry-count:a # Remaining attempts
fastboot set_active a # Switch to A
fastboot set_active b # Switch to B
fastboot --slot=all flash boot boot.img # Flash both slots
fastboot --slot=other flash boot boot.img # Flash inactive slotRecovery on A/B
On A/B devices, recovery is part of boot.img, not a separate partition. To install custom recovery:
fastboot flash boot twrp-boot.img
# Or boot temporarily:
fastboot boot twrp.img---
Dynamic Partitions
Android 10+ uses dynamic partitions with a "super" partition.
Architecture
super (physical partition)
├── system_a (logical)
├── system_b (logical)
├── vendor_a (logical)
├── vendor_b (logical)
├── product_a (logical)
├── product_b (logical)
└── (free space for resizing)Fastbootd Requirement
Regular fastboot (bootloader) cannot flash dynamic partitions. You must use fastbootd (userspace fastboot).
# Enter fastbootd
fastboot reboot fastboot
# Verify
fastboot getvar is-userspace # Should be: yes
# Now flash
fastboot flash system system.imgOperations
# Create partition
fastboot create-logical-partition mypart 1073741824 # 1GB
# Delete partition
fastboot delete-logical-partition mypart
# Resize partition
fastboot resize-logical-partition system 3221225472 # 3GB
# Reset super to empty
fastboot wipe-super super_empty.img---
Virtual A/B (Snapshots)
Android 11+ adds Virtual A/B with copy-on-write snapshots.
How It Works
1. OTA writes changes as snapshots (not full partition copies) 2. After reboot, snapshots are "merged" into new slot 3. Merge happens in background after boot
Snapshot States
fastboot getvar snapshot-update-status
# none - No pending update
# snapshotted - Snapshots created, waiting for merge
# merging - Merge in progressDealing with Stuck Snapshots
# Cancel snapshot (may cause boot issues!)
fastboot snapshot-update cancel
# Then flash normally
fastboot reboot fastboot
fastboot flash system system.img---
Partition Variables
# Get partition info
fastboot getvar partition-type:boot # raw, ext4, f2fs
fastboot getvar partition-size:boot # Size in bytes
fastboot getvar is-logical:system # yes/no
fastboot getvar has-slot:boot # yes/no
# All variables
fastboot getvar all---
Partition Layout by Device Type
Non-A/B (Legacy)
bootloader, radio, boot, recovery, system, vendor, cache, userdataA/B (Android 7+)
bootloader, radio, boot_a/b, system_a/b, vendor_a/b, userdataA/B + Dynamic (Android 10+)
bootloader, radio, boot_a/b, vbmeta_a/b, dtbo_a/b,
super (contains system_a/b, vendor_a/b, product_a/b),
userdata, metadataA/B + Virtual A/B + GKI (Android 13+)
bootloader, radio,
boot_a/b (kernel only),
init_boot_a/b (init ramdisk),
vendor_boot_a/b (vendor ramdisk),
vbmeta_a/b, dtbo_a/b,
super (system, vendor, product, system_ext, odm),
userdata, metadata---
Flashing Order
When flashing multiple partitions, order matters:
1. bootloader (reboot to bootloader after) 2. radio/modem (reboot to bootloader after) 3. vbmeta (disable verification if needed) 4. boot, dtbo, other boot partitions 5. super or individual dynamic partitions (in fastbootd) 6. userdata (wipe if needed)
# Example full flash
fastboot flash bootloader bootloader.img
fastboot reboot bootloader
fastboot flash radio radio.img
fastboot reboot bootloader
fastboot flash --disable-verity --disable-verification vbmeta vbmeta.img
fastboot flash boot boot.img
fastboot flash dtbo dtbo.img
fastboot reboot fastboot
fastboot flash system system.img
fastboot flash vendor vendor.img
fastboot -w
fastboot reboot---
GSI (Generic System Image)
GSI lets you run a generic Android build on any Treble-compatible device.
# 1. Unlock bootloader
# 2. Boot to fastbootd
adb reboot fastboot
# 3. Disable verification
fastboot flash vbmeta --disable-verity --disable-verification vbmeta.img
# 4. Optional: Delete product to make room
fastboot delete-logical-partition product_a
fastboot delete-logical-partition product_b
# 5. Flash GSI
fastboot flash system gsi-system.img
# 6. Wipe data (required!)
fastboot -w
# 7. Reboot
fastboot reboot