$npx -y skills add hyperb1iss/hyperdroid-skill --skill android-fastbootUse for fastboot operations, flashing partitions, bootloader unlocking, recovery mode, or partition management. Triggers on "fastboot", "flash boot.img", "unlock bootloader", "recovery mode", "TWRP", "Magisk", "partition", "sideload", "A/B slots". WARNING - These operations can b
| 1 | # Android Fastboot Operations |
| 2 | |
| 3 | ⚠️ **DANGER ZONE** - Fastboot operations write directly to device partitions. Wrong images or interrupted operations can brick devices. Always verify: |
| 4 | |
| 5 | 1. Correct device (check `fastboot getvar product`) |
| 6 | 2. Correct images for exact device model |
| 7 | 3. Bootloader is unlocked (for flashing) |
| 8 | 4. Battery > 50% |
| 9 | |
| 10 | --- |
| 11 | |
| 12 | ## Entering Fastboot Mode |
| 13 | |
| 14 | ```bash |
| 15 | # From ADB (device running) |
| 16 | adb reboot bootloader |
| 17 | |
| 18 | # Hardware buttons (most devices) |
| 19 | # Power + Volume Down (hold until fastboot screen) |
| 20 | ``` |
| 21 | |
| 22 | ## Basic Commands |
| 23 | |
| 24 | ```bash |
| 25 | fastboot devices # List connected devices |
| 26 | fastboot getvar all # All device variables |
| 27 | fastboot reboot # Reboot to system |
| 28 | fastboot reboot bootloader # Stay in bootloader |
| 29 | fastboot reboot recovery # Boot to recovery |
| 30 | fastboot reboot fastboot # Boot to fastbootd (Android 10+) |
| 31 | ``` |
| 32 | |
| 33 | ## Check Before Flashing |
| 34 | |
| 35 | ```bash |
| 36 | # ALWAYS run these first |
| 37 | fastboot devices # Verify connection |
| 38 | fastboot getvar product # Verify device model |
| 39 | fastboot getvar unlocked # Must be "yes" for flashing |
| 40 | fastboot getvar current-slot # Know current A/B slot |
| 41 | fastboot getvar battery-level # Should be > 50 |
| 42 | ``` |
| 43 | |
| 44 | --- |
| 45 | |
| 46 | ## Bootloader Unlocking |
| 47 | |
| 48 | ### Google Pixel |
| 49 | |
| 50 | ```bash |
| 51 | # 1. Enable OEM unlocking in Developer Options |
| 52 | # 2. Boot to fastboot |
| 53 | adb reboot bootloader |
| 54 | |
| 55 | # 3. Unlock |
| 56 | fastboot flashing unlock |
| 57 | |
| 58 | # 4. Confirm on device with volume keys + power |
| 59 | # WARNING: This wipes all data! |
| 60 | ``` |
| 61 | |
| 62 | ### Other Manufacturers |
| 63 | |
| 64 | | Brand | Process | |
| 65 | | -------- | ------------------------------------------------------- | |
| 66 | | OnePlus | `fastboot oem unlock` | |
| 67 | | Xiaomi | Mi Unlock Tool (waiting period) | |
| 68 | | Samsung | Uses Odin, not fastboot | |
| 69 | | Motorola | Request code from website, `fastboot oem unlock <code>` | |
| 70 | | Sony | Request code from website | |
| 71 | |
| 72 | ### Check Unlock Status |
| 73 | |
| 74 | ```bash |
| 75 | fastboot getvar unlocked # yes/no |
| 76 | fastboot getvar device-state # locked/unlocked |
| 77 | fastboot getvar unlock_ability # Can be unlocked? |
| 78 | ``` |
| 79 | |
| 80 | --- |
| 81 | |
| 82 | ## Flashing Partitions |
| 83 | |
| 84 | ### Individual Partitions |
| 85 | |
| 86 | ```bash |
| 87 | fastboot flash boot boot.img |
| 88 | fastboot flash recovery recovery.img # Non-A/B only |
| 89 | fastboot flash dtbo dtbo.img |
| 90 | fastboot flash vbmeta vbmeta.img |
| 91 | |
| 92 | # Disable verification (for custom ROMs) |
| 93 | fastboot flash --disable-verity --disable-verification vbmeta vbmeta.img |
| 94 | ``` |
| 95 | |
| 96 | ### Bootloader & Radio (Extra Careful!) |
| 97 | |
| 98 | ```bash |
| 99 | # These can hard-brick if wrong! |
| 100 | fastboot flash bootloader bootloader.img |
| 101 | fastboot reboot bootloader # REQUIRED after bootloader flash |
| 102 | |
| 103 | fastboot flash radio radio.img |
| 104 | fastboot reboot bootloader # Recommended after radio flash |
| 105 | ``` |
| 106 | |
| 107 | ### Temporary Boot (No Flash) |
| 108 | |
| 109 | ```bash |
| 110 | # Test before committing - reboots to normal after restart |
| 111 | fastboot boot recovery.img |
| 112 | fastboot boot patched_boot.img |
| 113 | ``` |
| 114 | |
| 115 | --- |
| 116 | |
| 117 | ## A/B Slot Devices |
| 118 | |
| 119 | Modern devices have two copies of each partition (A and B). |
| 120 | |
| 121 | ```bash |
| 122 | # Check current slot |
| 123 | fastboot getvar current-slot # Returns: a or b |
| 124 | |
| 125 | # Set active slot |
| 126 | fastboot set_active a |
| 127 | fastboot set_active b |
| 128 | |
| 129 | # Flash to specific slot |
| 130 | fastboot flash boot_a boot.img |
| 131 | fastboot flash boot_b boot.img |
| 132 | |
| 133 | # Flash to both slots |
| 134 | fastboot --slot=all flash boot boot.img |
| 135 | ``` |
| 136 | |
| 137 | --- |
| 138 | |
| 139 | ## Dynamic Partitions (Android 10+) |
| 140 | |
| 141 | Large partitions (system, vendor, product) live inside a "super" partition. |
| 142 | |
| 143 | ### Fastbootd Mode |
| 144 | |
| 145 | ```bash |
| 146 | # Enter userspace fastboot |
| 147 | fastboot reboot fastboot |
| 148 | |
| 149 | # Check if in fastbootd |
| 150 | fastboot getvar is-userspace # Should return: yes |
| 151 | ``` |
| 152 | |
| 153 | ### Flash Dynamic Partitions |
| 154 | |
| 155 | ```bash |
| 156 | # Must be in fastbootd mode! |
| 157 | fastboot reboot fastboot |
| 158 | |
| 159 | fastboot flash system system.img |
| 160 | fastboot flash vendor vendor.img |
| 161 | fastboot flash product product.img |
| 162 | ``` |
| 163 | |
| 164 | ### Virtual A/B Snapshots |
| 165 | |
| 166 | ```bash |
| 167 | # Check snapshot status |
| 168 | fastboot getvar snapshot-update-status |
| 169 | |
| 170 | # Cancel stuck update (CAREFUL!) |
| 171 | fastboot snapshot-update cancel |
| 172 | ``` |
| 173 | |
| 174 | --- |
| 175 | |
| 176 | ## Recovery Operations |
| 177 | |
| 178 | ### Enter Recovery |
| 179 | |
| 180 | ```bash |
| 181 | adb reboot recovery |
| 182 | # Or: Power + Volume Up (varies by device) |
| 183 | ``` |
| 184 | |
| 185 | ### ADB Sideload |
| 186 | |
| 187 | ```bash |
| 188 | # 1. In recovery, select "Apply update from ADB" |
| 189 | # 2. Run: |
| 190 | adb sideload update.zip |
| 191 | ``` |
| 192 | |
| 193 | ### Flash Custom Recovery (TWRP) |
| 194 | |
| 195 | ```bash |
| 196 | # Test first (temporary boot) |
| 197 | fastboot boot twrp.img |
| 198 | |
| 199 | # If it works, flash permanently |
| 200 | # Non-A/B devices: |
| 201 | fastboot flash recovery twrp.img |
| 202 | |
| 203 | # A/B devices (recovery in boot): |
| 204 | fastboot flash boot twrp.img |
| 205 | ``` |
| 206 | |
| 207 | --- |
| 208 | |
| 209 | ## Magisk (Root) |
| 210 | |
| 211 | ### Installation |
| 212 | |
| 213 | ```bash |
| 214 | # 1. Extract boot.img from your fi |