Tuesday, March 20, 2012

How to build ISO android-x86 in Ubuntu

Follow these below steps to build ISO android-x86 (generic_x86):

I. Prepare your Ubuntu system:
1. Intall JDK
A. Additional repository
i. $ sudo add-apt-repository "deb http://us.archive.ubuntu.com/ubuntu/ jaunty multiverse"
ii. $ sudo add-apt-repository "deb http://us.archive.ubuntu.com/ubuntu/ jaunty-updates multiverse"
B. $ sudo apt-get update
i. if you failed update, fallowing next step.
1. $ sudo vim /etc/apt/sources.list
 Add the following lines in the end of source.list
deb http://old-releases.ubuntu.com/ubuntu/ jaunty-updates multiverse
2. sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
3. sudo apt-get update
C. $ sudo apt-get install sun-java6-jdk
D. if this is success, you can see some message. Input that commands.
i. $ javac -version
ii. $ java –version
E. $ sudo vim /etc/profile
 Add the following lines in the end of profile:
JAVA_HOME=/usr/bin/java
ANDROID_JAVA_HOME=$JAVA_HOME
PATH=$PATH :$JAVA_HOME/bin:~/bin:
--> save (wq)
v. $ source /etc/profile
F. $ sudo apt-get install git-core gnupg flex bison gperf build-essential zip curl zlib1g-dev libc6-dev libncurses5-dev x11proto-core-dev libx11-dev libreadline6-dev libgl1-mesa-dev g++-multilib tofrodos python-markdown libxml2-utils xsltproc
G. Install repo
i. $ cd ~
ii. $ mkdir bin
iv. $ chmod a+x ~/bin/repo
II. Download Android resource
i. $ cd ~
ii. $ mkdir android_src
iii. $ cd android_src
iv. $ repo init -u https://android.googlesource.com/platform/manifest -b gingerbread
v. $ repo sync ß This takes long time

III. Build ISO file:
Go to folder resource:
$sudo make iso_img TARGET_PRODUCT=generic_x86

Well, go to the coffee shop and wait for around 5hours...
Ok, now we got the ISO file ....

No comments: