Tuesday, June 21, 2011

Android Gingerbread x86

I've become more and more interested in Android lately, specifically Android x86. Today I built my own Gingerbread x86 using Android-x86 Project's instructions and with a little help from a friend who's Linux knowledge greatly exceeds my own. In order to build Android for x86 you need to compile the Android source code from android-x86.org's git repositories. Since Gingerbread x86 can only be compiled on a 64 bit build environment I used my Ubuntu Studio x64 (10.04) install on my AMD Opteron 165 desktop. I'm going to detail the steps I had to take to complete this process to help anyone out there who may have had the same problems as I did.
After Initializing a build environment, I went ahead and moved on to obtain the source code. I made my working directory, android-x86, in my home folder. I also had to download repo using
and copy the contents of the newly downloaded repo folder to my android-x86 folder. Then I had to change the word python in line 23 of the repo file to python2.6 (this was necessary because for some reason the Python 2.7 was causing errors when I tried to run repo). So now I had my /home/android-x86 with the repo files inside and the modified repo file to point to Python 2.6. In terminal, I cd'd to android-x86 and typed the following:
./repo init -u git://android-x86.git.sf.net/gitroot/android-x86/manifest.git -b gingerbread-x86
After receiving the manifest I had to enter a username and my email address, and whether I wanted to have colored text (never saw any colored text even though I said yes). Once repo was initialized I ran
./repo sync
If you havent noticed by now I had to use slightly different commands than the ones given on the website. I let repo do its thing and when it completed, I had to do the repo init command again using git://git.android-x86.org/manifest.git instead of git://android-x86.git.sf.net/gitroot/android-x86/manifest.git because apparently the sourceforge link missed a few things it needed to download. Once my build tree was complete I had a ~3.1GB android-x86 folder and I was almost ready to build my ISO. I had run into an error while building the ISO and after some googling I found a forum post with a command that fixed my problem with lstdc++:
sudo ln -s /usr/lib32/libstdc++.so.6 /usr/lib32/libstdc++.so
So now I could start building my ISO! I ran the command
make -j2 iso_img TARGET_PRODUCT=generic_x86
The whole building process took a while but when it finished I ended up with a 174.9MB ISO


1 comment:

The_Doctor said...