Installing Application to Phone using "adb -d install" Command

This section provides a tutorial example on how to install the debug package of my 'HelloAndroid' application to my LG-P925g phone using the 'adb -d install' command through the USB debugging interface.

The Android SDK document also mentions another way to install application packages to the USB connected phone device using the "adb -d install path/to/your/app.apk" command.

1. Go to LG-P925g phone. Tap on "Home", "Applications", then "HelloAndroid". You will see "Hello, Android" displayed on the screen.

2. Tap on "Home", "Settings", "Applications", then "Managing applications". You will see "HelloAndroid" displayed in the application list.

3. Tap on "HelloAndroid" and "Uninstall" to uninstall "HelloAndroid".

4. Go to Windows computer, try to install the "HelloAndroid" debug package to my phone again using the "adb -d install" command.

C:\herong\HelloAndroid>\local\android-sdk-windows\platform-tools\adb 
   -d install bin\HelloAndroid-debug.apk

731 KB/s (14980 bytes in 0.020s)
        pkg: /data/local/tmp/HelloAndroid-debug.apk
Success
^C

Note that for some reason the "adb -d install" command does exit by itself. I need to press "<Ctrl>-C" to break it.

5. Go to the phone again. You will see "HelloAndoird" is ready to run again.

6. You can uninstall "HelloAndroid" using the "adb -d uninstall" command:

C:\herong\HelloAndroid>\local\android-sdk-windows\platform-tools\adb 
   -d uninstall com.herongyang
Success
^C

Note that the "adb -d uninstall" command takes the Java class package name as the argument. "com.herongyang" is the package name for my "HelloAndroid" application.

Last update: 2012.

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

 Installing LG USB Device Driver on Windows

 Viewing LG Android USB Device in Control Panel

 Turning on USB Debugging on LG-P925g

 Viewing USB Debugging Devices in Control Panel

 Running "adb" on LG-P925g USB Debugging Interface

 Installing Application to Phone using "ant installd" Command

Installing Application to Phone using "adb -d install" Command

 "adb -d install" Command Options

 Installing "AboutAndroid" to LG-P925g Phone

 Developing Applications with Android API Level 7

 Outdated Tutorials

 References

 PDF Printing Version