ADB Push and Pull | Use ADB Commands to Push or Pull Files on Android

by | 26 Jun 2020

ADB Push and ADB Pull can be very useful if you want to quickly copy a file to or from your Android device. ADB also called as Android Debug Bridge is a tiny yet powerful tool that is built right into the core of Android Operating system. You can perform a variety of operations by using the ADB Commands on your Android device. ADB comes in handy particularly when your device is non-responsive. In such cases, you can use the ADB command-line tool to take control of your device. You can take a screenshot, install an app, uninstall an app, reboot your device into bootloader mode or recovery mode and much more.

Similarly, you can use ADB commands to transfer files to and from your Android device. In this guide, we will tell you how you can use ADB Pull and ADB Push command to copy file to and from your Android device easily.

Push and Pull Files Using ADB Commands

Before you begin, please make sure you have are good with all the points mentioned below:

How to use ADB Pull Command to copy a file from Android

  1. Make sure you have installed ADB and Fastboot tools on your computer.
  2. Go to the folder where you have the ADB and Fastboot tools. Open a command prompt from inside this folder. To do this: Hold down Shift Key and Right-click on the empty space inside the folder and then select ‘Open command window here‘ or ‘Open PowerShell window here‘.
  3. To pull a file from your Android device, you need to give the FULL PATH of the file. You can use the following command to ADB Pull a file from an Android device:
    adb pull </path/filename>

    You need to give the filename with the extension.
    For example, let us say you are pulling a file called reddit.apk, then you need to have the command like:

    adb pull /system/app/Reddit.apk
    
  4. Once you execute the command, the file will be copied from your Android device and saved on the folder where ADB and Fastboot are installed.

How to use ADB Push Command to Copy a File to Android

  1. ake sure you have installed ADB and Fastboot tools on your computer.
  2. Go to the folder where you have the ADB and Fastboot tools. Open a command prompt from inside this folder. To do this: Hold down Shift Key and Right-click on the empty space inside the folder and then select ‘Open command window here‘ or ‘Open PowerShell window here‘.
  3. To push a file to your Android device, you need to give the FULL PATH of the file. You can use the following command to ADB Push a file to your Android device:
    adb push <source-path> <target-path>

    For example:

    adb push /local/path/Reddit.apk /sdcard/apps/

    Caution: If you are pushing files to your SD Card or Internal Storage, then the above command will work fine. But, if you are pushing files to the /system partition, then you need to system partition as writable first and then proceed. Also, to push files into /system partition, you need root access on your Android.

  4. To mount the system partition to Read-Write, execute the following commands one after another:
    adb shell
    su
    mount -o remount,rw /system
  5. When you execute the above command, you might get a prompt on your Android device asking for root permissions. Grant the same.
  6. After mounting the /system partition to read-write, you can use the following command to ADB Push a file to your Android device:
    adb push <source-path> <target-path>

    For example:

    adb push /local/path/Reddit.apk /system/apps/
  7. Once you are done, you need to remount with the system partition back to Read-Only.
    mount -o remount,ro /system
    
  8. Done!

Now you should have an idea on how to use the ADB Push and ADB Pull command to push and pull files to and from your Android device. If you have any doubts, let us know in the comments down below.

See more aboutTags

Leave a Comment