Skip to content

ADB and Fastboot commands are powerful tools for Android users to troubleshoot and fix common device issues. This guide provides a list of essential commands and tips to help you take control of your device.

Notifications You must be signed in to change notification settings

anbuinfosec/fastboot-cmds

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 

Repository files navigation

Essential ADB Fastboot Commands for Troubleshooting

ADB and Fastboot commands are powerful tools for Android users to troubleshoot and fix common device issues. This guide provides a list of essential commands and tips to help you take control of your device.

ADB Fastboot Commands

1. ADB Devices

The first command to check if your device is properly connected:

adb devices

This will list all connected devices. If your device appears, you’re good to go. Otherwise, you may need to troubleshoot your USB connection or drivers.

2. ADB Reboot

To reboot your Android device, use:

adb reboot

This is useful when your device is stuck or not responding. You can also reboot into recovery or bootloader mode with:

adb reboot recovery
adb reboot bootloader

3. ADB Push

To transfer files from your computer to your Android device:

adb push <local_file_path> <remote_file_path>

Example:

adb push myfile.zip /sdcard/myfile.zip

4. ADB Pull

To transfer files from your Android device to your computer:

adb pull <remote_file_path> <local_file_path>

Example:

adb pull /sdcard/myfile.zip ./myfile.zip

5. Fastboot Flash Recovery

To flash a custom recovery like TWRP:

fastboot flash recovery recovery.img

This command is essential for installing custom software on your Android device.

6. Fastboot Flash Boot

To flash a boot image:

fastboot flash boot boot.img

This is often used when installing a custom kernel or fixing boot issues.

7. Fastboot OEM Unlock

To unlock your bootloader for rooting or custom ROM installation:

fastboot oem unlock

Note: Unlocking the bootloader will wipe all data on your device. Back up important data before proceeding.

8. Fastboot OEM Lock

To relock the bootloader:

fastboot oem lock

This is useful if you want to restore your device to its original state.

9. ADB Sideload

For manually installing a software update:

  1. Boot into recovery mode.
  2. Use the following command:
    adb sideload update.zip

This command is particularly useful when OTA (Over-The-Air) updates fail to install.

10. Fastboot Erase

To erase specific partitions (e.g., cache, userdata):

fastboot erase <partition_name>

Example:

fastboot erase cache

11. Fastboot Format

To format a partition:

fastboot format <partition_name>

Example:

fastboot format userdata

12. Fastboot Reboot

To reboot the device from Fastboot mode:

fastboot reboot

You can also reboot into bootloader mode using:

fastboot reboot bootloader

13. Fastboot Flash System

To flash a system image:

fastboot flash system system.img

This is useful for restoring stock firmware.

14. ADB Shell

To open a shell on your Android device:

adb shell

You can execute commands directly on the device from the shell. Example:

adb shell ls /sdcard

15. ADB Install

To install an APK file on your device:

adb install <apk_file_path>

Example:

adb install app.apk

16. ADB Uninstall

To uninstall an app from your device:

adb uninstall <package_name>

Example:

adb uninstall com.example.app

Fixing Common Android Issues with ADB Fastboot Commands

1. Bootloop Issues

If your device is stuck in a bootloop, clear the cache partition with:

fastboot erase cache

2. Bricked Devices

For devices stuck in a "bricked" state (won’t boot at all), flash the stock firmware:

fastboot flash system system.img

Note: Ensure you download the correct firmware for your device model before flashing.

3. Unresponsive Devices

If your device becomes unresponsive, reboot it using:

fastboot reboot

This simple command often resolves issues.

4. Insufficient Storage

To clear space by removing unnecessary files:

adb shell rm -rf /sdcard/<folder_or_file_name>

5. Debugging App Issues

To view the logcat (system logs) for troubleshooting:

adb logcat

You can filter logs for specific tags or errors, for example:

adb logcat *:E

Safety Tips When Using ADB Fastboot Commands

  1. Backup Your Data: Always back up your data before using any ADB Fastboot commands that modify your system.
  2. Use Verified Firmware: Ensure you’re using the correct firmware files for your device model to avoid bricking your phone.
  3. Follow Instructions Carefully: If you’re unsure about a command, double-check the documentation or seek expert advice.
  4. Charge Your Device: Ensure your device has sufficient charge before performing operations to prevent interruptions.

Conclusion

ADB and Fastboot commands are essential tools for Android users who want to troubleshoot, customize, or fix their devices. Whether you’re fixing bootloop issues, flashing custom ROMs, or unlocking your device’s bootloader, these commands make the process quick and painless. With the right setup and some caution, you’ll be able to resolve common Android issues in just a few minutes.


References

About

ADB and Fastboot commands are powerful tools for Android users to troubleshoot and fix common device issues. This guide provides a list of essential commands and tips to help you take control of your device.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published