Running Your Android Applications on Your Phone Instead of the Emulator

-By Travis

A common question I have been asked is, “How do I run my application on my actual phone?”

Now, it’s cool to install your own application on your phone so you can show all your friends, but the best benefit is the fact you also won’t have to deal with the emulator acting like a sloth.  You will also be able to test your applications that use the accelerometer (yea, I’m sure there  is a way you can on the emulator, but have never taken the time to care).   It was fun while it lasted you dirty emulator, but your time has come…

  • The first thing you want to do is set your application to debuggable (I don’t know if I have ever done this, but the Android Developers site tells you to, so I’m just going to go with it).  So open up the Android Manifest  of your project package in Eclipse and you can set it to debuggable two ways:
  1. Through the Application tab and set Debuggable to true like in this picture:
  2. Or you can open up the XML of the Manifest can declare it in code by adding android:debuggable="true" to the <application>:
  • After you have done that, you will set your phone up to USB Debugging mode, to do that you can either:
  1. On the device, go to the home screen, press MENU, select ApplicationsDevelopment, then enable USB debugging.
  2. Or if you have the Settings option in your list of apps, you can go to SettingApplicationsDevelopment, then enable USB debugging.

  • Lastly, you want to make sure you computer recognizes your android phone.  This is probably the trickiest part (its not that tricky though),  If you have a Mac you won’t have to even worry about this step and you can just skip it all together.  As for Windows, you might already be able to run your app on your phone as well, but if not follow this steps:
  1. Make sure you know where you install the SDK (in the picture you can see it is named android-sdk-windows), if you followed along with my Youtube series to the t, you should have extracted it to the C:/ drive, or whatever you main drive is, here is a picture of what we are looking for:
  2. Once you have located where your SDK is located, start up the command prompt by going to your Windows Start button and typing in “cmd” in the search and hit enter like this:
  3. That should open up the Command Prompt, now make sure you have your phone plugged into your computer and type something like this (assuming your sdk is in C:/ drive) :
  4. After you hit Enter, you should see a serial number of some sort and you are good to go.

 

If you are still have trouble, you may want to try this additional step (because most likely you don’t have the driver you need):

  • try to find you specific driver for your phone, but if you can’t find it, just try installing the Google USB Driver (I know it says it’s only for ADP, Nexus One, or Nexus S, but I have been told it works for other devices as well).  You want to install the driver from the AVD and SDK Manager in Eclipse, Here is a picture of what you are looking for:


Well, I hope that helps/works for you to start using your phone instead of that dang emulator.

For more information, you can check out the Android developer site, here are a couple of links related to this topic:

http://developer.android.com/guide/developing/device.html

http://developer.android.com/sdk/win-usb.html

Peace bringers.

Author: trav

I'm just an average guy that love programming.

Share This Post On

7 Comments

  1. Hello Travis,

    your tutorials are awesome. I just wanted to mention that finally that post belov solved my problem after I have tried all those steps before

    http://www.flashrealtime.com/android-empty-list-of-devices/

    nevertheless great job! Im tired now and keep going on your series tomorrow, best regards
    Ducci :D

    Post a Reply
    • i have too same prob while running in android phone,m not able to get get sms from phone.its not storing in database..pl help

      Post a Reply
  2. Awesome man, thanks a bunch. Works like a charm, its fantastic and instant, no bloaty slowness anymore. :D

    The sdk/tools folder is, at least for me, now sdk/platform-tools in order to get the adb, but it was a simple fix.

    Post a Reply
  3. Wonderful tutorials, thank you, man!

    Just this information regarding this blog post:

    Google says:
    “Declare your application as “debuggable” in your Android Manifest -
    When using Eclipse, you can skip this step, because running your app directly from the Eclipse IDE automatically enables debugging.”

    Post a Reply
  4. [2012-12-21 11:12:43 - 1stProject] Installation failed due to invalid APK file!
    [2012-12-21 11:12:43 - 1stProject] Please check logcat output for more details.
    [2012-12-21 11:12:43 - 1stProject] Launch canceled!

    Please help!!!
    i am unable to run the application on my device getting the above error when tried to run

    Post a Reply
    • Hey buddy, what does the logcat say? There should be a logcat tab next to the Console tab.

      Post a Reply
  5. i’m using windows 7 and still getting problem after following these steps…..

    i’m not able to follow step 3&4 as i’m using adt bundle…

    Post a Reply

Submit a Comment

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


*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>