Build Android

Get and patch the Android source code

Download the Android patch file

then download the patch file from following link into the folder:

Description Resource URL Features
Android source code patch Android-2.3.7_r1.tar.gz (~ 4 MB)
  • Stagefright plugin for hardware video decoder in sam9m10 chips NEW
  • Use H&D SDIO WIFI driverNEW
  • Add camera application
  • Add the touchscreen calibration application to Android
  • Add IP configure application to Android
  • Add configuration files for Android system initialization and ALSA system

Extract the patch file in vendor folder:

$ tar -zxvf Android-2.3.7_r1.tar.gz
Now you can see a new folder < ANDROID_WORKING_DIR >/device/atmel.

Configure and Build Android

Configure compiling environment, take SAM9M10 MCU as an example:

      $ make clean
      $ source build/
      $ partner_setup sam9m10
      $ choosecombo Device release sam9m10 eng

This is to setup Android build environment.

This is used to configure the building environment
  • Syntax:
    choosecombo [Device|Simulator] [release|debug] [device_name] [variants]
  • Parameters of choosecombo
    • Device, used for real device, not simulator
    • Simulator, used for simulator
    • release, used for release version
    • debug, used for debug version
    • variants, three options: user | userdebug | eng. For detailed information, please goto and have a look at section "Choose a Target".

More about partner_setup
partner_setup is a method to copy the modified code from device/atmel to its original space. This command just changes the space to location. Therefore, if you modify the code under device/atmel, you need to run partner_setup before rebuild the your code.
TIP For SAM9G45 MCU, please execute
      $ partner_setup sam9g45 
      $ choosecombo Device release sam9g45 eng

TIP For SAM9X5 MCU, please execute
      $ partner_setup sam9x5
      $ choosecombo Device release sam9x5 eng
When the configuration is finished, the messages will be similar as following:
  • Run make
          $ make
  • ALERT!Note that if your host machine has multiple CPU cores, you can use
          $ make -j2
          $ make -j4
    to speed up the building process.
  • If all goes well, a new folder “out” under the current directory will be newly created. You will see message as follows.
    Generated: (out/target/product/sam9m10/android-info.txt)
    Target system fs image: out/target/product/sam9m10/obj/PACKAGING/systemimage_intermediates/system.img
    Install system fs image: out/target/product/sam9m10/system.img
    Target ram disk: out/target/product/sam9m10/ramdisk.img
    Target userdata fs image: out/target/product/sam9m10/userdata.img
    Installed file list: out/target/product/sam9m10/installed-files.txt

For more information, you can refer to Android web site:

See also: GenerateAndroidImage, AndroidRootfs, GetAndroid
r10 - 11 Apr 2013 - 03:23:10 - VoiceShen

Copyright by the contributing authors. All material on the platform is the property of the contributing authors.

Android is a trademark of Google Inc. Use of this trademark is subject to Google Permissions

Atmel and others, are registered trademarks or trademarks of Atmel or its subsidiaries.This site is powered by the TWiki collaboration platform

ARM and others are registered trademarks or trademarks or ARM Ltd. Other terms and product names may be trademarks of others.

Under the terms of the Creative Commons Attribution License

Syndicate this siteRSS ATOM