FriendlyARM: Android: Build Environment

From ARMWorks
Jump to: navigation, search

Android > Build Environment

FriendlyARM provides the source files to compile your own Android image. The process can seem a little over whelming, but once set up it is a fairly easy process.

Android can be compiled on Linux and OS X, but not Windows. You will also need a 64bit machine for building version 2.3 and newer. Due to the wide variety of possibilities, this article is limited to building Android 4.0 (210 Boards) and 4.2 (4412 Boards) on a Debian 7 64bit computer as they both work with the same set up. Be sure to read the Generic Android Build Environment Setup page, as this page only deals with FriendlyARM specifics.


Prerequisites

  • Generic Android Build Environment Setup
    • This will guide you up to extracting the FriendlyARM sources.
  • FriendlyARM <Source_DVD>/Android/android-<version>-.tgz
  • FriendlyARM <Source_DVD>/Linux/mktools-<date>.tar.gz


FriendlyARM Android Sources

Your source disk will have an Android archive named something like <Source_DVD>/Android/android-4.2.2_r1-fs-20140414.tar.gz. Create a directory somewhere convenient, such as /home/<user>/Android/build/ and extract the sources there.

   # mkdir -p /home/<user>/Android/build
   # tar -xzf <Source_DVD>/Android/android-<version>-<date>.tar.gz -C /home/<user>/Android/build/


Image Making Tools

FriendlyARM provides some filesystem image making tools, that are required when flashing with SuperBoot (Except on the 4412 Boards). They can be found in the <Source_DVD>/Linux/mktools-<date>.tar.gz archive. Unpacking the archive will put them in /usr/sbin/. This will make them available to root or a sudo user, which you'll need to run the Android build script as.

   # tar -xzf <Source_DVD>/Linux/mktools-<date>.tar.gz

That concludes setting up the build environment, and you are now ready to start compiling.