Android Tutorials - Herong's Tutorial Examples - Version 3.00, by Dr. Herong Yang

"adb push" and "adb pull" Commands

This section describes 'adb push' and 'adb pull' commands, which allows you to copy files to and from the remote Android emulator or device.

The "adb" tool also offers you commands to copy files into and from the connected Android emulator or devices.

The "adb push <local> <remote>" copies a file or folder from the local system to the remote emulator or device.

The "adb pull <remote> <local>" copies a file or folder from the remote emulator or device to the local system.

Example 1 - Copying "Silk-Road.jpg" to the /sdcard/Picture folder in the emulator:

C:\local\android-sdk-windows\platform-tools>adb push \ 
   \herong\Pictures\Silk-Road.jpg /storage/sdcard/Picture
258 KB/s (111019 bytes in 0.420s)

Example 2 - Copying "init.rc" from the / folder in the emulator:

C:\local\android-sdk-windows\platform-tools>adb pull \
   /init.rc \herong
573 KB/s (21728 bytes in 0.037s)

Example 3 - Copying all files from the /data/app folder in the emulator:

C:\local\android-sdk-windows\platform-tools>adb pull 
   /data/app \herong\app
pull: building file list...
pull: /data/app/ApiDemos/ApiDemos.apk 
   -> \herong\app/ApiDemos/ApiDemos.apk
pull: /data/app/CubeLiveWallpapers/CubeLiveWallpapers.apk 
   -> \herong\app/CubeLiveWallpapers/CubeLiveWallpapers.apk
pull: /data/app/GestureBuilder/GestureBuilder.apk 
   -> \herong\app/GestureBuilder/GestureBuilder.apk
pull: /data/app/SmokeTest/SmokeTest.apk 
   -> \herong\app/SmokeTest/SmokeTest.apk
pull: /data/app/SmokeTestApp/SmokeTestApp.apk 
   -> \herong\app/SmokeTestApp/SmokeTestApp.apk
pull: /data/app/SoftKeyboard/SoftKeyboard.apk 
   -> \herong\app/SoftKeyboard/SoftKeyboard.apk
pull: /data/app/WidgetPreview/WidgetPreview.apk 
   -> \herong\app/WidgetPreview/WidgetPreview.apk
pull: /data/app/com.herongyang-1/base.apk 
   -> \herong\app/com.herongyang-1/base.apk
pull: /data/app/net.sf.andpdf.pdfviewer-1/base.apk 
   -> \herong\app/net.sf.andpdf.pdfviewer-1/base.apk
pull: /data/app/com.adobe.reader-1/lib/arm/libAdobeReader.so 
   -> \herong\app/com.adobe.reader-1/lib/arm/libAdobeReader.so
pull: /data/app/com.adobe.reader-1/base.apk 
   -> \herong\app/com.adobe.reader-1/base.apk
11 files pulled. 0 files skipped.
1102 KB/s (11343777 bytes in 10.043s)

Last update: 2015.

Table of Contents

 About This Book

 Installing JDK 1.8 on Windows System

 Installation of Android SDK R24 and Emulator

 Installing Apache Ant 1.9 on Windows System

 Developing First Android Application - HelloAndroid

 Android Application Package (APK) Files

Android Debug Bridge (adb) Tool

 What Is Android Debug Bridge (adb)

 Commands and Options Supported by "adb"

 "adb install" and "adb uninstall" Commands

 "adb shell" - Remote Shell Interface

"adb push" and "adb pull" Commands

 Android File Systems

 Android 4.0.3 File Systems

 AboutAndroid - Application to Retrieve System Information

 android.app.Activity Class and Activity Lifecycle

 View Objects and Layout Resource Files

 Using "adb logcat" Command for Debugging

 Build Process and Package File Content

 Building Your Own Web Browser

 Android Command Line Shell

 Samsung Galaxy Tab 3 Mini Tablet

 USB Debugging Applications on Samsung Tablet

 Android Tablet - LG-V905R

 USB Debugging Applications on LG-V905R Tablet

 Android Phone - LG-P925g

 USB Debugging Applications on LG-P925g Phone

 Outdated Tutorials

 References

 PDF Printing Version

Android Debug Bridge (adb) Tool - Updated in 2015, by Dr. Herong Yang