Android Tools

Revision as of 11:36, 16 July 2010 by Tim Bird (Talk | contribs) (Android SDK: document ddms and service)

Jump to: navigation, search

Here are some development tools useful for working with Android

Android SDK

host-side tools


adb is the android debugger - it also doubles as file transfer agent. The setup consists of an adbd on the target in the /sbin directory. On the host two programs are run: the adb application (in the SDK's tools directory) and an adb server, started by the adb application.

For emulators, adb will usually run automagically.

For real boards - with debugging over USB, you might need to do work, as is documented here: .

For real boards that do not have a USB connection but have Ethernet instead, you might need to do a few tricks.

  • make sure that adbd runs on the board. If it doesn't run, you might want to check the init.rc file.
  • make sure that the network connection between host and the board is working - test pinging both ways.
  • on the host, type the following (and yes, you need to specify the board's IP address on the host):
  ADBHOST=<target-ip> tools/adb kill-server
  ADBHOST=<target-ip> tools/adb shell
  • you should now get a prompt on the board, you can exit the prompt if you want.
  • tools/adb devices should now list the device.


The Android Asset Packaging Tool is used to create, inspect and manage Android packages.

You can use this to see details about a package, it's resources, and xml information.

The Android developer page on aapt is somewhat meager.

See Android aapt for substantially more information.


The Dalvik Debug Monitor Server is a host-based tool which interacts with and Android target system and can show numerous bits of information, including the log, cpu and memory utilization, and lots of details about individual processes.

See the DDMS developer guide


  • Fastboot - Android Fastboot is a tool to boot and manipulate the partitions on an Android development phone.

The emulator is a version of QEMU, which mimics the instruction set of an ARM processor, and the hardware that one might find on a mobile phone. The emulator runs on an x86 system, but executes an ARM linux kernel and programs. The flow of control is:

    • application ->
    • dalvik VM ->
    • C/C++ libraries ->
    • ARM linux kernel ->
    • emulated instructions and hardware (QEMU)->
    • C libraries->
    • x86 kernel ->
    • real hardware


target-side tools


Activity Manager - can be used to start applications at the command line, or send intents to running applications.



This is the main See



Can be used to send an individual service message.

Usage: service [-h|-?]
       service list
       service check SERVICE
       service call SERVICE CODE [i32 INT | s16 STR] ...
   i32: Write the integer INT into the send parcel.
   s16: Write the UTF-16 string STR into the send parcel.

On one forum, I saw that you could switch between portrait and landscape with:

$ service call window 18 i32 1 # to set to landscape on the emulator
$ service call window 18 i32 0 # to set to portrait on the emulator

service list will show a list of different services that can be communicated with.


stop, start - commands to stop and start services on an Android system

other tools




Android ships with a utility suite (called 'toolbox') that is not busybox.

You can get a binary busybox for Android here The site includes instructions for easy installation on your device.


  • smem - smem is a tools for analyzing the memory usage on a system




Serial Cable for G1

You can build a serial cable to use with the G1, which is helpful to see kernel boot messages on the serial console.


Back to Android Portal