Installing the Debug Binary Package

This section provides a tutorial example on how to install the debug binary package to the Android emulator using the Apache Ant tool and the build file.

Now I need to install the debug build, HelloAndroid-debug-unaligned.apk, on the Android emulator. The Android documentation does not have detailed instructions on this step. But I did the following steps to make it happen:

1. Run the Android emulator, vTablet, through the AVD Manager and wait for the emulator to be fully booted.

2. Install HelloAndroid-debug-unaligned.apk to the Android emulator using the Ant tool:

C:\>cd \herong\HelloAndroid
C:\herong\HelloAndroid>\local\apache-ant-1.9.5\bin\ant installd

-set-mode-check:

-set-debug-files:

install:
     [echo] Installing
        C:\herong\HelloAndroid\bin\HelloAndroid-debug.apk onto default
        emulator or device...
     [exec] * daemon not running. starting it now on port 5037 *
     [exec] * daemon started successfully *
     [exec]     pkg: /data/local/tmp/HelloAndroid-debug.apk
     [exec] Success
     [exec] 385 KB/s (37850 bytes in 0.096s)

installd:

BUILD SUCCESSFUL
Total time: 12 seconds

3. Go to Android emulator, and click the "Apps" icon. The "HelloAndroid" application is listed on the screen!

HelloAndroid Application Installation - Android SDK R24
HelloAndroid Application Installation - Android SDK R24

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

 Creating Android Project with "android" Command

 Listing Target Android Platforms

 "HelloAndroid" - First Android Project

 "HelloAndroid.java" - First Android Java Code

 "ant debug" Command and Build Error

 Building the Debug Binary Package

Installing the Debug Binary Package

 Running the Debug Binary Package

 Android Application Package (APK) Files

 Android Debug Bridge (adb) Tool

 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

 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

 Archived Tutorials

 References

 Full Version in PDF/EPUB