Ramblings Of a Madman

Yeah, like i would know a good description…

Android development

Being the android emulator slow as it is, I decided to give it a try running it from the command line. This is just a mental guide, so bear with me. The first thing we should do is adding the android SDK tools folder to our path, so we can run the required commands from anywhere. On my Ubuntu I added the following to my ~/.bashrc file:

export PATH=$PATH:/home/{user}/development/android/sdk/android-sdk-linux_x86-1.0_r1/tools

Next, we can query the emulators running by issuing the following command:

adb devices

There should be none, so far. Now let's start the emulator. I pass some extra arguments to be able to make it boot a bit faster (remove the nojni parameter if you required jni stuff ;)):

emulator -nojni -netfast -no_boot_anim

If you query for devices you should get one on the list returned by adb.

Once the emulator is up and running, we can install our previously built application (if you used the default skeleton, created with activitycreator (google, google), then after using ant to build the app, go to the bin folder in the project). Issue the following command:

adb install {project name}.apk

Now the project is available on the emulator, under the menu.

Easy, uh? Posted by email from nocivus (posterous)