Skip to main content

Debugging With an Android Hardware Device

Posted on March 8, 2013 by Richard LaytonRichard Layton

Hi again Android programmers!  I can call you that now since you have completed our first tutorial right?  In our first tutorial I picked you up off the bare floor, dusted you off a bit, and gave you to tools necessary to embark on our journey.  We installed the Android SDK, setup the virtual machine, and wrote our first Android app.
This time we are going to slow things down just a tad a focus on just one thing.  We are going to break out of the confines and slowness of the emulator and bring that app into reality.  And by that I mean running and debugging your applications on your own phone or tablet!  How else are you going to show off what you have done?  “Hey guys, come and look and what I made on my computer.”  WRONG!  That’s NOT how we do it.  You have to put it in their face!
You don’t have an app to show off?  You didn’t complete the first tutorial did you?  You don’t have an Android device?  Why don’t you take this coloring book and sit in the corner?.  The rest of us can get started.

The Android USB Driver

OK here’s how it goes Windows, Mac, and Linux users.  We have to make sure the proper driver is installed on your computer.  If you’re a Linux user, I can’t help you through this part.  Come on you’re a tough rebellious Linux user, get used to it.  Mac users, it just works!  You can skip to the next section.  If you’re a windows user it can go several ways… so I am going to help you get those pesky drivers installed.

Installing the Android USB Driver for Windows


Ok, did you see that warning?  Make sure you unplug your Android device from your computer before we proceed.  The first thing we have to do is hunt down the proper Android USB driver and install it.  You can usually find it on your device’s manufacturer page.  Luckily the Android Developer Website keeps a nice list of Android OEM drivers.  If you have a Google branded device, like a Nexus S, there is a different way of obtaining your driver.  I’ll show you Google branded users how to obtain the driver later.  The rest of you, go find and download your driver.   I’ll wait.
Ok. If you have downloaded an .exe or installer file, you are in luck.  Go ahead and give it a run and everything should be ok.  Here is what mine looks like:
Retail Driver Installation
If you’ve been given a zip file of a crappy file folder that looks like this:
Crappy file folder
You are going to have to hang tight for a bit.  I still need to help the Google device users get their crappy file folder.
Google device users need to use the Android SDK Manager to obtain their driver.  It’s located at:

C:androidSDK Manager.exe

Give it a run.  Then scroll down a bit to the ‘Extras’ folder.  Open it up and place a check mark next to ‘Google USB Driver’.  Here is what it looks like:
Installing Google USB Drivers
Then click ‘Install 1 package…
Go ahead and click ‘Accept License’ and then ‘Install’.  Once it’s done.  Close the SDK Manager.  That really didn’t install the driver for us.  It gives us a crappy driver folder located at


We can’t do anything with this files yet.  We are going to have to see what happens in the next step.

Enabling USB Debugging

Your Android device is still unplugged from your computer right?  Good.  Enabling USB Debugging will allow our Android device to talk to Eclipse or the Android Debug Bridge (ADB), thats the command line tool.  We’ll be avoiding the command line for now.
On your Android device.  Go to ‘Settings’ and then ‘Developer Options

Enable USB Debugging

Place a check in ‘USB debugging’ and accept the warning.  By enabling USB Debugging we can install and debug, or diagnose our apps.

Installing the Android USB Driver for Windows (Continued)

Now the moment of truth is upon us.  Connect your Android device to your computer with your USB cable.  An icon in the task tray will sneak in and start installing the windows drivers.  Windows might install everything without a hitch.  Or it might fail and complain like this:
Driver Fail
If you have downloaded a crappy driver folder you might be in this camp.  In this case we will have to force feed Windows that driver.  Open the device manager:
Start > Right Click on Computer > Properties > Device Manager
Device Manager No Driver
Expand ‘Other Devices’ and we should see the problem driver.
Right click hardware listed in ‘Other Devices’ > Choose ‘Update Driver Software’
Choose ‘Browse My Computer for Driver Software’ and then ‘Browse…
Google USB Driver Location
Google Branded users will find it at: C:androidsdkextrasgoogleusb_driver
If you have downloaded a crappy driver folder from another manufacturer, choose that folder instead.
Browse for driver software
Click ‘Next’ and the driver installation will complete.  Here is what our device manager should look like now:
Proper Device Manager

Android Device Chooser

Finally all of our hard work can be appreciated.  Load up Eclipse and open our HelloWorld project from the first tutorial.  Now choose ‘Run’ > ‘Run’ from the menu.  We will be presented with the Android Device Chooser:
Android Device Chooser
You will see your Android device listed.  Click it and choose ‘OK’.  Your app should now magically appear on your Android device!

Hello World

Now you can easily show your friends and family the accomplishments you have made!  You will resent the fact that they will never fully appreciate all the trouble we went through to get this far, but you will be proud to see your baby out in the wild.
Our development machine is finally all setup and the real work can begin!  Over the next series of tutorials, we are really going to get down to some Android coding goodness.  We will begin working on an app that will take us through many different aspects of coding for Android.  In each tutorial we will make it cooler and more awesome (oh and learn something on the way!).  When we are all done we will have a real world, fully functional app.  For now, go show off your first app!


Image of Lucile
7 years ago

Some tips i have seen in terms of pc memory is that there are specs such
as SDRAM, DDR and many others, that must match up the technical specs of the motherboard.
If the computer’s motherboard is fairly current and there are no operating system issues, modernizing the storage space literally usually takes under 1 hour. It’s one of
the easiest computer upgrade types of procedures one can visualize.
Thanks for revealing your ideas.

Leave a Reply

Your email address will not be published. Required fields are marked *