http://www.kernel.org/
Kernel Patch work Project List -
http://www.kernel.org/pub/software/scm/git/
Android Glossary -
http://elinux.org/Android_Glossary
There are (as of September 2009) 4 main separate kernel repositories at that site:
You can use repo, following the instructions at http://source.android.com/download, to pull down the entire Android source. However, when you download the rest of the Android source code, using the 'repo' command, you do NOT automatically get a kernel tree included. That is, a kernel git tree is not referenced in the default Android manifest file,
To add projects, such as the kernel, to your overall Android repository scheme, you add the appropriate kernel repository to your local manifest.xml file. This file is located in the .repo directory.
To include the kernel/common tree, include a line like this in .repo/manifest.xml:
Note that the default revision for git repositories is specified in the <default> tag in manifest.xml as "revision=master" but the kernel/common repository may not have a head called "master". In that case if you just type "repo sync kernel/common" you may see the message:
For more about repo, see http://source.android.com/download/using-repo
Here is a way of extracting raw Android patches at a certain point in time, though this may be dated:
If anyone knows where raw android kernel patches are available, please add a link here. See also the Android Kernel Features page for more information about individual kernel features.
The Android build system may or may not automatically rebuild a kernel for you.
This page documents how to build an Android kernel, independent of the regular Android "distribution" build system.
[FIXTHIS - nothing here yet.]
Here are some development tools useful for working with Android
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.
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.
See the DDMS developer guide
As of NDK version r5 (December 2010), the toolchains can now be used in standalone cross-compiler mode. See docs/STANDALONE-TOOLCHAIN.html in the NDK for information about this. Previously, the toolchains could be used within the build system, but it was difficult and error prone to compile native programs outside the Android build system with them.
You can find lots of information about logcat on the Android logger page, and at http://developer.android.com/guide/developing/tools/adb.html#logcat
You can get a binary busybox for Android here The site includes instructions for easy installation on your device.
See http://www.instructables.com/id/Android_G1_Serial_Cable
Back to Android Portal
Kernel Patch work Project List -
http://www.kernel.org/pub/software/scm/git/
Android Glossary -
http://elinux.org/Android_Glossary
Android Kernel Download From eLinux.orgJump to: navigation, search
[edit] Main Google Android Kernels
The main Google repository with Android source code is at: http://android.git.kernel.org/There are (as of September 2009) 4 main separate kernel repositories at that site:
- common
- experimental
- msm
- omap
git clone git://android.git.kernel.org/kernel/common.git kernelTo preserve your sanity, it's probably worth downloading this into a 'kernel' directory in your overall Android source directory scheme
You can use repo, following the instructions at http://source.android.com/download, to pull down the entire Android source. However, when you download the rest of the Android source code, using the 'repo' command, you do NOT automatically get a kernel tree included. That is, a kernel git tree is not referenced in the default Android manifest file,
To add projects, such as the kernel, to your overall Android repository scheme, you add the appropriate kernel repository to your local manifest.xml file. This file is located in the .repo directory.
To include the kernel/common tree, include a line like this in .repo/manifest.xml:
<project path="kernel/common" name="kernel/common" />The complete list of projects (including other kernel options besides kernel/common) is listed on http://android.git.kernel.org/.
Note that the default revision for git repositories is specified in the <default> tag in manifest.xml as "revision=master" but the kernel/common repository may not have a head called "master". In that case if you just type "repo sync kernel/common" you may see the message:
error: revision master in kernel/common not foundTypically the heads in the kernel/common repository will be called android-2.6.x (where x is the kernel number); specifying this number in the manifest should allow repo to sync properly, i.e.:
<project path="kernel/common" name="kernel/common" revision="android-2.6.27"/>You can view the heads by clicking on the project link from http://android.git.kernel.org/.
For more about repo, see http://source.android.com/download/using-repo
[edit] Other Repositories with Android-specific changes
- Linux kernel for omap and beagle-board, by Embinux: http://labs.embinux.org/git/cgit.cgi/repo/kernel.git
- clone with: git clone git://labs.embinux.org/repo/kernel.git kernel
[edit] 'Raw' Android kernel patches
I do not know of any freely available patches for the Linux kernel with the Android fixes, as of November 2009. I have, however, heard of multiple efforts to extract the patches to make it easier to port the Android kernel features onto newer Linux kernels.Here is a way of extracting raw Android patches at a certain point in time, though this may be dated:
git clone git://android.git.kernel.org/kernel/common.git android-kernel cd android-kernel git checkout --track -b android-2.6.32 origin/android-2.6.32 git fetch --tags git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-2.6.32.y.git git shortlog v2.6.32.9..HEAD git format-patch v2.6.32.9..HEADSum total 173 patches for the 2.6.32.9 kernel as of writing.
If anyone knows where raw android kernel patches are available, please add a link here. See also the Android Kernel Features page for more information about individual kernel features.
Android Kernel Build
From eLinux.org
How to build an Android kernel.The Android build system may or may not automatically rebuild a kernel for you.
This page documents how to build an Android kernel, independent of the regular Android "distribution" build system.
[FIXTHIS - nothing here yet.]
[edit] Building an Individual application
Steps required to compile individual application package in Android SDK.- Go to build directory under Android sdk directory
- Execute source source envsetup.sh
- Go to corresponding application directory
- Issue mm command to build the application only
Here are some development tools useful for working with Android
Contents[hide] |
[edit] Android SDK
[edit] host-side tools
[edit] 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.
[edit] aapt
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.
[edit] ddms
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
[edit] Fastboot
Android Fastboot is a tool to boot and manipulate the partitions on an Android development phone.[edit] Toolchains
Android provides pre-built toolchains (C/C++ compilers and linkers), but requires the installation of a java compiler (JDK) from an external source.As of NDK version r5 (December 2010), the toolchains can now be used in standalone cross-compiler mode. See docs/STANDALONE-TOOLCHAIN.html in the NDK for information about this. Previously, the toolchains could be used within the build system, but it was difficult and error prone to compile native programs outside the Android build system with them.
[edit] Emulator
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
[edit] traceview
- Google's main page describing traceview: http://developer.android.com/guide/developing/tools/traceview.html
- http://www.bottomlesspit.org/file_download/2/Android_SDK_Traceview_tool.pdf - good overview presentation by Olivier Bilodeau
- presentation with speaker notes: http://www.bottomlesspit.org/file_download/3/Android_SDK_Traceview_tool_w_speakernotes.pdf
- Performance Tuning Android Applications - straightforward article discussing traceview use to find an application bottleneck. April 2009.
[edit] target-side tools
[edit] am
Activity Manager - can be used to start applications at the command line, or send intents to running applications.[edit] dumpstate
[edit] logcat
This is the user tool for accessing the Android system log. This is implemented at a special option in adb (I'm not sure what the difference is between "adb logcat" and "adb shell logcat")You can find lots of information about logcat on the Android logger page, and at http://developer.android.com/guide/developing/tools/adb.html#logcat
[edit] monkey
[edit] procrank
procrank shows a listing of processes on the system, sorted by one of the memory utilization metrics. See Android Memory Usage#procrank[edit] service
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] ...
Options:
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 emulatorservice list will show a list of different services that can be communicated with.
[edit] toolbox
stop, start - commands to stop and start services on an Android system[edit] other tools
[edit] agcc
- agcc - A wrapper tool for compiling native Android apps (linked directly to bionic)
[edit] bootchart
[edit] 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.
[edit] smem
- smem - smem is a tools for analyzing the memory usage on a system
- See Using smem on Android for more information
[edit] 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
[edit] Eclipse
The officially supported integrated development environment (IDE) is Eclipse (currently 3.4 or 3.5) using the Android Development Tools (ADT) Plugin, though developers may use any text editor to edit Java and XML files then use command line tools (Java Development Kit and Apache Ant are required) to create, build and debug Android applications as well as control attached Android devices (e.g., triggering a reboot, installing software package(s) remotely).[edit] Hardware
[edit] 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
![[-] [-]](http://wiki.kldp.org/imgs/plugin/arrup.png)
![[+] [+]](http://wiki.kldp.org/imgs/plugin/arrdown.png)
![[https]](http://wiki.kldp.org/imgs/https.png)
