Essential ADB and Fastboot Commands Every Android Power User Should Know

fastboot android command

If you like tweaking, modifying, or recovering Android devices, ADB (Android Debug Bridge) and Fastboot are your best friends. These powerful tools allow you to control your device via USB from a PC. Here’s a complete guide to the most useful ADB and Fastboot commands.


🛠 What You Need

  • ADB & Fastboot tools installed (via Android SDK Platform Tools)
  • USB drivers (for your phone model)
  • USB debugging enabled (Settings > Developer Options)

📱 Useful ADB Commands

🔌 1. Connect & Detect Devices

adb devices

Shows a list of connected devices.

🔁 2. Reboot Device

adb reboot
adb reboot bootloader
adb reboot recovery

📂 3. File Transfers

adb push <local> <remote>
adb pull <remote> <local>

Example:

adb push update.zip /sdcard/

📸 4. Take Screenshot

adb shell screencap -p /sdcard/screen.png
adb pull /sdcard/screen.png

🐚 5. Open ADB Shell

adb shell

📋 6. Install or Uninstall APKs

adb install app.apk
adb uninstall com.example.app

🔍 7. Logcat for Debugging

adb logcat

📦 8. Backup or Restore

adb backup -apk -shared -all -f backup.ab
adb restore backup.ab

🔄 9. Sideload ZIP in Recovery

adb sideload update.zip

⚙️ Useful Fastboot Commands

🖥 1. Check Device

fastboot devices

🚀 2. Reboot from Fastboot

fastboot reboot
fastboot reboot recovery

📸 3. Flash Boot/Recovery/System Images

fastboot flash boot boot.img
fastboot flash recovery recovery.img
fastboot flash system system.img

🧹 4. Wipe Partitions

fastboot erase userdata
fastboot erase cache
fastboot format system

🧱 5. Unlock/Lock Bootloader

fastboot oem unlock
fastboot flashing unlock
fastboot flashing lock

⚠️ Unlocking wipes your data.

🔁 6. Manage A/B Slots

fastboot getvar current-slot
fastboot set_active a
fastboot set_active b

📦 7. Flashing Factory Images (Example)

fastboot flash bootloader bootloader.img
fastboot flash radio radio.img
fastboot flash boot boot.img
fastboot flash system system.img
fastboot flash vendor vendor.img
fastboot flash recovery recovery.img

📌 Extra Tips

  • To reboot into fastboot: adb reboot bootloader
  • To reboot into recovery: adb reboot recovery
  • To check partition info: fastboot getvar all

🤔 Final Thoughts

ADB and Fastboot are indispensable tools for Android enthusiasts, especially when installing custom ROMs, recovering bricked phones, or just debugging. Make sure you understand what each command does — a wrong command could wipe your data or brick your device.


If you found this post helpful, stay tuned for more Android and ham radio tech content here at hamradio.my!

Post Comment

You May Have Missed