https://github.com/anbuinfosec/fastboot-cmds
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.
https://github.com/anbuinfosec/fastboot-cmds
Last synced: about 2 months ago
JSON representation
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.
- Host: GitHub
- URL: https://github.com/anbuinfosec/fastboot-cmds
- Owner: anbuinfosec
- Created: 2025-01-28T20:10:09.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2025-01-28T20:14:31.000Z (4 months ago)
- Last Synced: 2025-01-28T21:24:56.447Z (4 months ago)
- Homepage:
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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:
```bash
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:
```bash
adb reboot
```
This is useful when your device is stuck or not responding. You can also reboot into recovery or bootloader mode with:
```bash
adb reboot recovery
adb reboot bootloader
```### 3. ADB Push
To transfer files from your computer to your Android device:
```bash
adb push
```
Example:
```bash
adb push myfile.zip /sdcard/myfile.zip
```### 4. ADB Pull
To transfer files from your Android device to your computer:
```bash
adb pull
```
Example:
```bash
adb pull /sdcard/myfile.zip ./myfile.zip
```### 5. Fastboot Flash Recovery
To flash a custom recovery like TWRP:
```bash
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:
```bash
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:
```bash
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:
```bash
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:
```bash
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):
```bash
fastboot erase
```
Example:
```bash
fastboot erase cache
```### 11. Fastboot Format
To format a partition:
```bash
fastboot format
```
Example:
```bash
fastboot format userdata
```### 12. Fastboot Reboot
To reboot the device from Fastboot mode:
```bash
fastboot reboot
```
You can also reboot into bootloader mode using:
```bash
fastboot reboot bootloader
```### 13. Fastboot Flash System
To flash a system image:
```bash
fastboot flash system system.img
```
This is useful for restoring stock firmware.### 14. ADB Shell
To open a shell on your Android device:
```bash
adb shell
```
You can execute commands directly on the device from the shell. Example:
```bash
adb shell ls /sdcard
```### 15. ADB Install
To install an APK file on your device:
```bash
adb install
```
Example:
```bash
adb install app.apk
```### 16. ADB Uninstall
To uninstall an app from your device:
```bash
adb uninstall
```
Example:
```bash
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:
```bash
fastboot erase cache
```### 2. Bricked Devices
For devices stuck in a "bricked" state (won’t boot at all), flash the stock firmware:
```bash
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:
```bash
fastboot reboot
```
This simple command often resolves issues.### 4. Insufficient Storage
To clear space by removing unnecessary files:
```bash
adb shell rm -rf /sdcard/
```### 5. Debugging App Issues
To view the logcat (system logs) for troubleshooting:
```bash
adb logcat
```
You can filter logs for specific tags or errors, for example:
```bash
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
- [Android Developer Documentation](https://developer.android.com/studio/command-line)
- [ADB and Fastboot Tools Download](https://developer.android.com/studio/releases/platform-tools)