fedora swag!
fedora swag!
fedora swag!
fedora swag!
fedora swag!
unicorn swag!
unicorn swag!
unicorn swag!
unicorn swag!
unicorn swag!

AOKP

menu

// Learn » So You Want To Build AOKP JB? (Ubuntu 12.04+)

Posted by: on   Tutorial

NOTE – This article is based on Protekk’s guide on building for toro. Simply replace toro with the device codename that you’re building for.

This is strictly just a reference guide/tutorial! If you cannot simply follow directions and copy/paste, I’m not going to help you! This is idiot-proof.

Build Environment

  • Operating system – Tested on Ubuntu 12.04 and 12.10 (64-bit)
  • 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

Required Packages

Simply copy and paste this in a terminal window:

sudo apt-get install git-core 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 openjdk-6-jdk tofrodos python-markdown schedtool pngcrush libxml2-utils xsltproc zlib1g-dev:i386

Let that install and then proceed.

More copy and paste:

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

Getting the Source

  • Make required directories
  • Obtain repo binary
  • Add repo binary to your path
  • Give repo binary proper permissions
  • Initialize empty repo
  • Sync repo

Alright, so now we’re getting there. I have outlined the basics of what we’re about to do and broke them down as I know them. This is all pretty much going to be copy/paste so it’ll be fairly difficult to screw this up :)

Copy/paste:

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 http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo

Give the repo binary the proper permissions
chmod a+x ~/bin/repo

Create directory for where the AOKP repo will be stored and synced
mkdir ~/aokp_jb

Move to our new AOKP directory
cd ~/aokp_jb

Initialize the AOKP repo and download the manifest
repo init -u git://github.com/AOKP/platform_manifest.git -b jb-mr2

Sync AOKP source
repo sync

Sit and wait for a long time. Nearing 10GB of source code now.

Start the build

This is probably the EASIEST part of all, simply copy/paste this command and walk away!

. build/envsetup.sh && brunch toro

Syncing the repo is dependent upon your Internet connection. It can take anywhere from 30 minutes to several hours to fully sync. Same thing goes for build times. Don’t expect this to be short. If you have patience and have no build errors, you’ll end up with a flashable zip in ~/aokp_jb/out/target/product/toro!

Happy crack-flashing!

Visit AOKP.co on your device!

Visit AOKP.co on your device!