ADB and Fastboot Commands Cheat Sheet with Examples - falendra-sahu/rooting GitHub Wiki


โš™๏ธ ADB and Fastboot Commands Cheat Sheet with Examples

A complete cheat sheet for using ADB (Android Debug Bridge) and Fastboot to manage, debug, and modify your Android device. Ideal for rooters, developers, and modders.


๐Ÿ”น ADB (Android Debug Bridge)

โœ… Device should be powered ON with USB Debugging enabled.

๐Ÿ”ง Basic ADB Commands

Command Description Example
adb devices List connected devices adb devices
adb reboot Reboot device adb reboot
adb reboot recovery Boot into recovery adb reboot recovery
adb reboot bootloader Boot into fastboot/bootloader adb reboot bootloader
adb shell Open command shell on device adb shell
adb install <apk> Install an app adb install myapp.apk
adb uninstall <package> Uninstall an app adb uninstall com.android.chrome
adb push <local> <remote> Send file to device adb push magisk.zip /sdcard/
adb pull <remote> <local> Copy file from device adb pull /sdcard/file.txt D:/Backup/
adb sideload <file.zip> Flash ROM via recovery adb sideload lineageos.zip
adb logcat Show logs (for debugging) adb logcat > logs.txt
adb shell pm list packages List installed apps adb shell pm list packages
adb shell am start -n <package/activity> Start app activity adb shell am start -n com.android.settings/.Settings
adb backup / adb restore Backup/Restore (deprecated) adb backup -apk -shared -all -f backup.ab

๐Ÿ”น Fastboot

โœ… Device should be in Bootloader/Fastboot mode.

๐Ÿ”ง Basic Fastboot Commands

Command Description Example
fastboot devices List devices in fastboot mode fastboot devices
fastboot reboot Reboot device fastboot reboot
fastboot reboot bootloader Reboot back to bootloader fastboot reboot bootloader
fastboot flash <partition> <file> Flash partition fastboot flash recovery twrp.img
fastboot flash boot boot.img Flash boot partition fastboot flash boot magisk_patched.img
fastboot flash system system.img Flash system image fastboot flash system system.img
fastboot flash recovery recovery.img Flash custom recovery fastboot flash recovery twrp.img
fastboot erase <partition> Erase a partition fastboot erase userdata
fastboot format <partition> Format a partition fastboot format system
fastboot getvar all Get device info fastboot getvar all
fastboot oem unlock Unlock bootloader (older devices) fastboot oem unlock
fastboot flashing unlock Unlock bootloader (newer devices) fastboot flashing unlock
fastboot oem lock Re-lock bootloader fastboot oem lock
fastboot continue Resume after fastbootd fastboot continue
fastboot set_active a/b Set active slot (A/B devices) fastboot set_active a

๐Ÿง  Bonus Commands

Purpose Command Example
Check Android version adb shell getprop ro.build.version.release adb shell getprop ro.build.version.release
Remount system as RW adb remount adb remount
Take Screenshot adb shell screencap -p /sdcard/screen.png adb pull /sdcard/screen.png
Record screen adb shell screenrecord /sdcard/demo.mp4 adb pull /sdcard/demo.mp4

๐Ÿ”— Helpful Resources


โš ๏ธ **GitHub.com Fallback** โš ๏ธ