Bubble Foundry

Installing Android Apps via USB using the Android SDK

by Peter.

I had some trouble installing an Android app I was testing today over the internet so I used the SDK. I’m working with a tester with a Windows machine who didn’t have the SDK, so I wrote up the steps so they could do the same. It’s essentially the same on OS X or Linux. Here is how to install the Android SDK so that you can install APKs over USB:

1. Go to http://developer.android.com/sdk/index.html and download the Windows version.
2. Unzip the android-sdk_r07-windows.zip and move the android-sdk-windows folder to somewhere easy to find.
3. Double click on SDK Manager to launch the application.
3a. If you get a message like “Warning: Java not found in your PATH,” go to http://www.oracle.com/technetwork/java/javase/downloads/index.html.
3b. Click on the left-most big Java button (the plain one). Select your platform (either Windows or Windows x64… probably the former). Click continue.
3c. The download should start. Once the installer is downloaded run it, choose all the default options.
3d. Now try SDK Manager again.
4. Now that you know you can open the SDK Manager, you don’t need to use it. ;-p Copy the APK file into the tools directory.
5. Click on Start, then Search for “Command Prompt” and open it.
6. type “cd Desktop” to move to the Desktop folder, assuming you unziped the Android SDK there.
7. Do the same for android-sdk-windows: “cd android-sdk-windows”
8. And now tools: “cd tools”
9. Finally, with the Android device connected via USB, install the APK with the adb tool: ‘adb -d install “My App.apk”‘ Here’s how I did it:

Microsoft Windows [Version 6.1.7600]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\Users\Peter Robinett>cd Desktop

C:\Users\Peter Robinett\Desktop>cd android-sdk-windows

C:\Users\Peter Robinett\Desktop\android-sdk-windows>cd tools

C:\Users\Peter Robinett\Desktop\android-sdk-windows\tools>adb -d install "My App.apk"
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
753 KB/s (3701434 bytes in 4.797s)
        pkg: /data/local/tmp/My App.apk

Ignore the INSTALL_FAILED message, I already have the app on my phone. ;-) If you ever want to reinstall an app, add the -r option: apk -d install -r "My App.apk".