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

"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 /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)

Last update: 2012.

Table of Contents

 About This Book

 Installation of Android SDK R17 and Emulator

 Installing JDK 1.7 on Windows System

 Installing Apache Ant 1.8 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

 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

 Android Phone - LG-P925g

 USB Debugging Applications on LG-P925g Phone

 Android Tablet - LG-V905R

 USB Debugging Applications on LG-V905R Tablet

 References

 PDF Printing Version

Dr. Herong Yang, updated in 2012
Android Debug Bridge (adb) Tool