Difference between revisions of "Android Tools"
(add link to busybox) |
(document adb a little) |
||
| Line 3: | Line 3: | ||
== Android SDK == | == Android SDK == | ||
=== adb === | === adb === | ||
| − | * adb | + | adb is the android debugger - it also doubles as file transfer agent. |
| + | The setup consists of an <tt>adbd</tt> on the target in the <tt>/sbin</tt> directory. On the host two programs are run: the <tt>adb</tt> application (in the SDK's <tt>tools</tt> 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: http://developer.android.com/guide/developing/device.html#setting-up . | ||
| + | |||
| + | 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 <tt>init.rc</tt> 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. | ||
| + | * <tt>tools/adb devices</tt> should now list the device. | ||
| + | |||
=== fastboot === | === fastboot === | ||
* Fastboot - [[Android Fastboot]] is a tool to boot and manipulate the partitions on an Android development phone. | * Fastboot - [[Android Fastboot]] is a tool to boot and manipulate the partitions on an Android development phone. | ||
Revision as of 02:20, 1 May 2010
Here are some development tools useful for working with Android
Contents |
Android SDK
adb
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: http://developer.android.com/guide/developing/device.html#setting-up .
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.
fastboot
- Fastboot - Android Fastboot is a tool to boot and manipulate the partitions on an Android development phone.
- toolchains -
- logging system -
- Emulator - See http://developer.android.com/guide/developing/tools/emulator.html
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
other tools
agcc
- agcc - A wrapper tool for compiling native Android apps (linked directly to bionic)
bootchart
busybox
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
strace
- strace
- Statically linked binary available at: http://benno.id.au/blog/2007/11/18/android-runtime-strace
- Instructions for building Android strace - http://discuz-android.blogspot.com/2008/01/create-google-android-strace-tool.html
Eclipse
Hardware
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.
See http://www.instructables.com/id/Android_G1_Serial_Cable
Back to Android Portal