The Open Handset Distribution (OHD) is a software distribution for mobile devices, often referred to as Android, developed by members of the Open Handset Alliance. Android includes an operating system, middleware, and key applications typically required for a mobile device. This porting guide describes the steps necessary to port Android to a new mobile device. Android is designed as a highlyportable, hardwareindependent platform based on Linux, and porting the platform to new devices requires little more than porting the Linux kernel and developing the Linux drivers necessary for your device. The current version of this guide describes bringing Android up to PDAlevel functionality; functionality sufficient to support nonmultimedia apps that run on unconnected mobile devices through the standard user interface devices such as keypad and display. Future versions of this guide will cover complete telephony, multimedia and peripheral integration to create a complete mobile device. This porting guide is intended for engineers proficient with running (and writing drivers for) Linux on embedded devices. The guide also assumes you have a target hardware that matches Device Requirements and that you can boot and run a recent (2.6.x) version of the Linux kernel with at least keypad and display drivers properly installed.
ANDROID PORTING Introduction The Open Handset Distribution (OHD) is a software distribution for mobile devices, often referred to as Android, developed by members of the Open Handset Alliance Android includes an operating system, middleware, and key applications typically required for a mobile device This porting guide describes the steps necessary to port Android to a new mobile device Android is designed as a highly-portable, hardware-independent platform based on Linux, and porting the platform to new devices requires little more than porting the Linux kernel and developing the Linux drivers necessary for your device The current version of this guide describes bringing Android up to "PDA-level" functionality; functionality sufficient to support non-multimedia apps that run on unconnected mobile devices through the standard user interface devices such as keypad and display Future versions of this guide will cover complete telephony, multi-media and peripheral integration to create a complete mobile device This porting guide is intended for engineers proficient with running (and writing drivers for) Linux on embedded devices The guide also assumes you have a target hardware that matches Device Requirements and that you can boot and run a recent (2.6.x) version of the Linux kernel with at least keypad and display drivers properly installed Version history by APIs Gingerbread : API level 9, Android 2.3 – 2.3.2 API level 10, Android 2.3.3 – 2.3.7 The Android 2.3 (Gingerbread) SDK was released, based on Linux kernel 2.6.35 Honeycomb : API 11, Android 3.0 : based on Linux kernel 2.6.36 API 12, Android 3.1 API 13, Android 3.2 Ice Cream Sandwich : API 14, Android 4.0 – 4.0.2 : based on Linux kernel 3.0.1 API 15, Android 4.0.3 – 4.0.4 Jelly Bean API 16, Android 4.1 : based on Linux kernel 3.0.31 API 17, Android 4.2 • How to setup o On Windows Pre-Installation Requirements • Drivers must compatible for each devices • Download ODIN Step process • Click on the Odin3 file after extracted it If you see a Security Warning, click Run That will display the Odin application • Switch off your phone • Get into download mode by pressing Power + down + home button together • Hold this key combination until you see the Warning Screen • Press the Volume Up key to continue • You will see a message stating “Downloading… Do not turn off the target”; see example above, right side DO NOT TURN OFF YOUR DEVICE • Connect your phone via USB to PC • If Odin shows com:[port number] in ID:COM in yellow color, your phone is connected to PC, else reconnect • Extract the zip file, which compatible for each devices, you downloaded above • Select files in Odin, click on each tab and select files compatible for each devices o PIT o PDA o PHONE o CSC Example: • Click Start Button • It starts the Installation Process and then wait for Installation to finish Your phone will reboot after ODIN displays PASS o • Example: After the application displays PASS, the phone will a quick restart • Press the Volume Key to highlight the Wipe Data/Factory Reset line, then press the Power key, device will reboot • Let the device completely go through the start up steps, then you may disconnect the from the USB cable • You are finished and your phone is upgraded to the new Operating System • o - Test On Linux (Ubuntu 11.10) Setting up a Development Environment : install packages follow: o Flex : This lexical analyzer generator is used to read a given input file for a description of a scanner to generate o bison: This is a general-purpose parser generator o gperf: This is a perfect hash function generator o libesd0-dev: This enlightened sound daemon (dev files) is used to mix digitized audio streams for playback by a single device o libwxgtk2.6-dev: This package provides GUI components and other facilities for many different platforms o build-essential: This package contains a list of packages considered fundamental to building Debian packages o install java development kit (jdk or higher) o install repo $ $ $ > $ mkdir ~/bin PATH=~/bin:$PATH curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo ~/bin/repo chmod a+x ~/bin/repo - Porting Android to a New MIPS SOC: Porting Android to a new MIPS SOC involves: Building a kernel that has support for the SOC and also contains Android-specific patches Building the Android root file system for the MIPS core on the SOC The Android root file system has MIPS support and optimizations, and needs to be tuned for the MIPS processor on which it will be run - Getting the Kernel Ready for Android: There are some kernel patches from Google that are required by the Android framework There are two approaches to getting a kernel ready for Android: one can port the SOC-specific patches to any of the kernel versions supported by Google, or port the Google patches to the kernel version that has the SOC support Here is an example of how we got the Android kernel ready for the MIPS Malta development platform If you are starting a new porting project we recommend you use Linux kernel version 3.0.8 or later The simplest way to get a MIPS Android kernel source is by using this GIT repository: - $ git clone git://git.linux-mips.org/pub/scm/linux-mti.git - –b dev-android-linux-mti-3.0.8 This kernel has an example of configuration (arch/mips/configs/android_example_config) which can be used as a base configuration for Android devices It gives an idea which platform independent configuration options can be used by Android system Android Build Process for a New SOC: The Android source ported to MIPS is available through public GIT repositories Android Jelly Bean The lastest version of Jelly Bean is MIPS release 4.2.1 and release notes will posted soon From a terminal window type : mkdir mipsandroid cd mipsandroid repo init -u git://github.com/MIPS/manifests.git -b devmips-jb-mr1 -m mips-jb-4.2.1_r1.xml repo sync Android Ice Cream Sandwich The latest version of Ice Cream Sandwich is MIPS release From a terminal window type : mkdir mipsandroid cd mipsandroid repo init -u git://github.com/MIPS/manifests.git -b mips-ics-mr1.1 -m mips-ics-4.0.4_r1.1m5.xml repo sync Android Gingerbread From a terminal window type: mkdir mipsandroid cd mipsandroid repo init -u git://github.com/MIPS/manifests.git -b mips-gb2.3.5 -m mips-gb-2.3.5_r1m3.xml repo sync The next step is to set the environment variables Can use the env.sh below an example: duongphan@ubuntu:/dev-mips-ics$ cat env.bsh export TARGET_ARCH_VARIANT=mips32r2dspr2 source build/envsetup.sh lunch full_mips-eng The value assigned to TARGET_ARCH_VARIANT is the configuration chosen in the previous step without the file extension If TARGET_ARCH_VARIANT is not assigned, then the default configuration is mips32r2-fp Once you source env.sh, you can initiate the build process with a make command If you have a desktop with four cores, you can speed up the build by calling “make -j8″ The build creates YAFFS2 images in out/target/product/generic_mips/ by default By setting environment variables TARGET_USERIMAGES_USE_EXT4 TARGET_USERIMAGES_SPARSE_EXT_DISABLED to true, one can build target images for ext4 filesystem References http://developer.mips.com/android/android-porting-guide/ http://developer.mips.com/android/android-source-code/ http://www.netmite.com/android/mydroid/development/pdk/docs/index.html Member done task: Duong - Diep - Than ... http://developer.mips.com /android/ android -porting- guide/ http://developer.mips.com /android/ android-source-code/ http://www.netmite.com /android/ mydroid/development/pdk/docs/index.html Member done task: Duong - Diep - Than. .. ~/bin/repo - Porting Android to a New MIPS SOC: Porting Android to a new MIPS SOC involves: Building a kernel that has support for the SOC and also contains Android- specific patches Building the Android. .. : API 11, Android 3.0 : based on Linux kernel 2.6.36 API 12, Android 3.1 API 13, Android 3.2 Ice Cream Sandwich : API 14, Android 4.0 – 4.0.2 : based on Linux kernel 3.0.1 API 15, Android 4.0.3