Using ADB (Android Debug Bridge) commands for file management can greatly enhance your control over your Android device. Here’s a quick guide on how to use ADB commands for file management:
Setting Up ADB
-
Install ADB:
- Download ADB software (usually part of the Android SDK) and install it on your computer.
- Add ADB to your system's PATH environment variable so you can run it from the command line.
-
Enable USB Debugging:
- On your Android device, go to Settings > About Phone. Tap Build Number seven times to unlock developer options.
- Go to Settings > Developer Options, and enable USB Debugging.
-
Connect Your Device:
- Use a USB cable to connect your Android device to your computer.
- Launch a command terminal and run
adb devicesto ensure your device is listed.
Basic ADB File Management Commands
-
List Files: To see files in a directory on the device:
adb shell ls /sdcard/ -
Push Files: To transfer files from your computer to your Android device:
adb push <source-file-path> /sdcard/<destination-folder>Example:
adb push myfile.txt /sdcard/Documents/ -
Pull Files: To transfer files from your Android device to your computer:
adb pull /sdcard/<source-file> <destination-file-path>Example:
adb pull /sdcard/Documents/myfile.txt C:/Users/YourUsername/Documents/ -
Delete Files: To delete a file on your device:
adb shell rm /sdcard/<file-path>Example:
adb shell rm /sdcard/Documents/myfile.txt -
Make Directories: To create a new directory on your device:
adb shell mkdir /sdcard/<new-directory>Example:
adb shell mkdir /sdcard/NewFolder
Important Notes:
- Ensure that your device's storage is accessible, especially if you're working with external SD cards.
- Use caution when deleting files, as ADB commands don’t typically include undo options.
Additional Tips:
- Utilize
adb shellto drop into an interactive Linux command shell on your device for more complex operations. - Always test commands with non-critical data first to avoid accidental data loss.
By mastering ADB commands, you can efficiently manage files on your Android device beyond what's typically available through standard interfaces and apps.


