Build environment


+ Operating system -- Tested on Ubuntu 12.04 and 12.10 (64bit)

+ Terminal

+ Decent hardware (minimum of at least a dual core CPU and 4 GB of RAM)

+ Optimally have an SSD (standard mechanical drives work as well but slow down the process drastically)

+ Must have required packages for building installed, I will list them further down


Installing JDK


The Sun JDK is no longer in Ubuntu's main package repository. In order to download it, you need to add the appropriate repository and indicate to the system which JDK should be used.

Java 6: for Gingerbread and newer


# sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu hardy main multiverse"

# sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu hardy-updates main multiverse"

# sudo apt-get update

# sudo apt-get install sun-java6-jdk


Required packages


# sudo apt-get install git gnupg flex bison gperf build-essential \
 zip curl libc6-dev libncurses5-dev:i386 x11proto-core-dev \
 libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-glx:i386 \
 libgl1-mesa-dev g++-multilib mingw32 tofrodos \
 python-markdown libxml2-utils xsltproc zlib1g-dev:i386


# sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so



Getting the source


+ Make directory for repo binary

# mkdir ~/bin


+ Add directory for repo binary to your path

# PATH=~/bin:$PATH


+ Download repo binary and place it in the proper directory

# curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo


+ Give the repo binary the proper permissions

# chmod a+x ~/bin/repo


+ Create directory for where the AOSP repo will be stored and synced

# mkdir ~/aosp_android-4.2.1_r1.2


+ Move to our new AOSP directory

# cd ~/aosp_android-4.2.1_r1.2


+ Initialize the AOSP repo and download the manifest

# repo init -u https://android.googlesource.com/platform/manifest -b android-4.2.1_r1.2



+ Sync AOSP source

# repo sync


Getting the binaries

+ Obtaining proprietary binaries

Download a binary hardware support files for Nexus 10 that are available for users of the Android Open-Source Project.


Nexus 10 binaries for Android 4.2/4.2.1 (JOP40C and JOP40D)


# cd  ~/aosp_android-4.2.1_r1.2


1. Audio Processor

# wget https://dl.google.com/dl/android/aosp/audience-manta-jop40c-b1458d4b.tgz


2. Wi-Fi, Bluetooth, NFC

# wget https://dl.google.com/dl/android/aosp/broadcom-manta-jop40c-17f2edc4.tgz


3. Graphics

# wget https://dl.google.com/dl/android/aosp/samsung-manta-jop40c-a3d68928.tgz


+ Extracting the proprietary binaries


Each set of binaries comes as a self-extracting script in a compressed archive. After uncompressing each archive, run the included self-extracting script from the root of the source tree, confirm that you agree to the terms of the enclosed license agreement, and the binaries and their matching makefiles will get installed in the vendor/ hierarchy of the source tree.


# tar -xvzf audience-manta-jop40c-b1458d4b.tgz

# tar -xvzf broadcom-manta-jop40c-17f2edc4.tgz

# tar -xvzf samsung-manta-jop40c-a3d68928.tgz


# ./extract-audience-manta.sh

# ./extract-broadcom-manta.sh

# ./extract-samsung-manta.sh



Start the build


# . build/envsetup.sh


#  lunch full_manta-userdebug


If you have patience and have no build errors, you'll end up with a flashable binaries in ~/aosp_android-4.2.1_r1.2/out/target/product/manta


Flashing a device


Set the device in fastboot mode if necessary.


An entire Android system can be flashed in a single command: this writes the boot, recovery and system partitions together after verifying that the system being flashed is compatible with the installed bootloader and radio, and reboots the system. This also erases all the user data.



# cd ~/aosp_android-4.2.1_r1.2/out/target/product/manta


# fastboot -w flashall


Posted by eoseontaek