Thursday, February 10, 2011

Android development cheatsheet

Here is a list of commands I find useful when developing applications. Do add to comments any commands that you use and find useful. I'll update accordingly. Also, I would be interested if anyone has any android UI related cheat sheets :)

-    Create/delete/view Android Virtual Devices
-    Create/update projects
-    Update the SDK with new platforms, addons and docs.

android list target
android list avd
android --help
android create avd –n <avd_name> -t <target_ID> -c <size>[K|M]
android create project --target <target_ID> --name <prjname> --path <where>
                       --activity <activityname> --package <package_namespace>

android update project [--name|-n] <prjname> [--target|-t] <target_ID>
                       [--path|-p] <thepath_to_prj>

android create lib-project --target <target_ID> --name <prjname> --path <where> 
                           --package <package_namespace>

adb [-d|-e] install <path_to_your_bin>.apk
adb push <local> <remote>    - copy file/dir to device
adb pull <remote> [<local>]  - copy file/dir from device
e.g : adb push foo.txt /sdcard/foo.txt
adb shell
adb devices
adb –s emulator-5554 shell

#sqlite3 /data/data/
adb logcat [<option> … [<filter-spec>] …
[V – Verbose, D – Debug, I – Info, W – Warning, E – Error, F – Fatal, S – Silent]

adb logcat <tag1>:<priority1> …..
e.g. : adb logcat ActivityMgr:I MyApp:D *:S

mksdcard [-l label] <size>[K|M] <file>
emulator –avd <avd_name> –sdcard <file>
telnet localhost <emulator-port>

#From inside telnet:

- sms send <sender phone number> <text message>
- geo fix <longitude> <latitude> [<altitude>]


  1. This is one of the helpful post.Your post is some what different compare to other post.
    Android app developers

  2. Thanks for sharing your info. I really appreciate your efforts and I will be waiting for your further write ups thanks once again.
    Avatar Html5 Player

  3. forcefully installing application by using -- adb install -r .apk