Mobile Development 4 min read

Using ADB to Push, Pull, and Manage Files on Android Devices

This guide explains how to use the Android Debug Bridge (ADB) to push files from a computer to a device, pull files from the device, and perform basic file system operations such as listing directories, creating and deleting folders, moving files, and viewing file contents.

Test Development Learning Exchange
Test Development Learning Exchange
Test Development Learning Exchange
Using ADB to Push, Pull, and Manage Files on Android Devices

File Push (adb push)

The adb push command allows you to transfer a file or directory from your computer to a connected Android device, which is useful for quickly deploying resources, configuration files, or other data.

Command format: adb push <local_path> <remote_path>

Example: to push a file named example.txt from the desktop to the device’s /sdcard/ directory, run adb push C:\Users\YourUsername\Desktop\example.txt /sdcard/ .

File Pull (adb pull)

The adb pull command works in the opposite direction, extracting a file or directory from the device to your computer, which is handy for backups or log analysis.

Command format: adb pull <remote_path> [<local_path>]

Example: to pull logcat_output.txt from the device’s /sdcard/ directory to the desktop, run adb pull /sdcard/logcat_output.txt C:\Users\YourUsername\Desktop\ .

Managing the Device File System

List directory contents

Use the ls command to list files in a directory: adb shell ls /path/to/directory .

Create a new directory

Use mkdir to create a folder: adb shell mkdir /path/to/new_directory .

Delete files or directories

Delete a single file with adb shell rm /path/to/file.txt . Delete a directory (empty or not) with adb shell rm -r /path/to/directory .

Move or rename files

Use mv to move or rename: adb shell mv /old/path/file.txt /new/path/file.txt .

View file contents

Use cat to display a file’s content: adb shell cat /path/to/file.txt .

Conclusion

After this tutorial you should be able to push and pull files with ADB and perform basic file‑system operations, skills that are essential for everyday development and debugging on Android devices. Future articles will cover ADB application management.

Mobile Developmentfile transfer
Test Development Learning Exchange
Written by

Test Development Learning Exchange

Test Development Learning Exchange

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.