I had my first little Android App written, but for the life of me, I couldn't figure out how to get it to run on my phone instead of the emulator.
Poking around, I found this article, which gave me some initial insight. But still, I was left scratching my head.
Turns out, it's not hard at all. I just needed to:
- On the phone handset, go to the Home > Settings screen and insure:
Applications > Unknown Sources is checked
Applications > Development > USB Debugging is checked
- Next time you plug in your phone, your Windows box will complain it can't find the driver to use. Good. From the device manager, choose to update to the drivers that come with the Android SDK, they are found in ANDROID_SDK_HOME/usb_driver
- Once the phone is properly detected, run the adb command to confirm the device is present:
ANDROID_SDK_HOME/tools/adb.exe devices List of devices attached emulator-5554 device HT851GZ89495 deviceIn this case, I have both the emulator and my real phone available.
- To install an application, run:
ANDROID_SDK_HOME/tools/adb.exe install foo.apk