Outdated: "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.

This tutorial was based on Android SDK R17 with Android 4.0.3 and left here as a reference.

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 /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
139 KB/s (17040 bytes in 0.119s)

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

C:\local\android-sdk-windows\platform-tools>adb pull
   /data/app \herong\app
pull: building file list...
pull: /data/app/GestureBuilder.apk -> \herong\app/GestureBuilder.apk
pull: /data/app/SoftKeyboard.apk -> \herong\app/SoftKeyboard.apk
pull: /data/app/ApiDemos.apk -> \herong\app/ApiDemos.apk
pull: /data/app/SoftKeyboard.odex -> \herong\app/SoftKeyboard.odex
pull: /data/app/CubeLiveWallpapers.apk -> \herong\app/CubeLiveWallp...
pull: /data/app/ApiDemos.odex -> \herong\app/ApiDemos.odex
pull: /data/app/GestureBuilder.odex -> \herong\app/GestureBuilder.odex
pull: /data/app/WidgetPreview.odex -> \herong\app/WidgetPreview.odex
pull: /data/app/CubeLiveWallpapers.odex -> \herong\app/CubeLiveWall...
pull: /data/app/WidgetPreview.apk -> \herong\app/WidgetPreview.apk
pull: /data/app/com.herongyang-1.apk -> \herong\app/com.herongyang-...
pull: /data/app/net.sf.andpdf.pdfviewer-1.apk -> \herong\app/net.sf...
pull: /data/app/com.adobe.reader-1.apk -> \herong\app/com.adobe.rea...
13 files pulled. 0 files skipped.
148 KB/s (7022410 bytes in 46.298s)

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

 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

 Outdated: Downloading and Installing JDK 1.7

 Outdated: Downloading and Installing Android SDK R17

 Outdated: Running Android SDK Manager

 Outdated: Installing Android Platform 4.0.3 and Libraries

 Outdated: Verifying Android Platform Installation

 Outdated: Creating Android Virtual Device (AVD)

 Outdated: Launching Android Emulator in AVD Manager

 Outdated: Android Emulator Built-in Applications

 Outdated: Android Emulator Built-in Web Browser

 Outdated: Downloading and Installing Apache Ant 1.8

 Outdated: "HelloAndroid" - First Android Project

 Outdated: Building the Debug Binary Package

 Outdated: Installing the Debug Binary Package

 Outdated: Running the Debug Binary Package

 Outdated: Rebuild the Debug Binary Package

 Outdated: Redefine Text in Resource Files

 Outdated: Installing Android PDF Viewer APK File

 Outdated: Copy PDF File to Android Emulator's File System

 Outdated: Installing Adobe Reader APK File

 Outdated: "adb shell" - Remote Shell Interface

Outdated: "adb push" and "adb pull" Commands

 References

 Full Version in PDF/EPUB