Delving Deeper into Android: Building Ice Cream Sandwich for the Nook Color
It was only a matter of time before the siren's call lured me to install the source for Ice Cream Sandwich (ICS, Android 4) and attempt to create my own version for my Nook Color. There are two links I've been following to install ICS from its git repository and then building from the repository. I need to list several caveats before we go much futher;
The Adventure Begins
The three links I've been referring to so far:
I'm not quite certain what to do with it at the moment. The next step for me is to learn how to create a new ยตSDHC with this running on my Nook Color. After all, just because it built is no guarantee it will execute properly.
I'd like to thank everyone who's worked on this so far, especially the XDA developers. Without all their heavy lifting to start with I'd have had one hell of a time just getting to this point.
[1] I am quite familiar with rcs, cvs, subversion, and ClearCase and know how to work with CM systems in a small to large development efforts. I just have no experience with git.
- I am a complete novice (otherwise known as "a noob") when it comes to the use of git[1] and building Android. So I'm depending on a lot of hand-holding at this point in time, meaning reading lots of xda forum threads and wiki pages to piece together a process that works with my Fedora setup.
- My Dell Latitude D630 isn't some awesome build machine. It's now considered a modest little notebook powered by an Intel Core 2 Duo T7700 processor running at 2.4GHz. It took a long time to pull the git repository, and it's going to take a long time to build the project. Right now as I type this the system load is about 2.5 and both cores are running at 100%. Half of the 4GB of system memory is in use (the rest taken up by cache), with about 5MB on swap.
Building Android 4.0.3 |
The Adventure Begins
The three links I've been referring to so far:
- CM9/ICS Nightly Builds http://forum.xda-developers.com/showthread.php?t=1444943
- CM9 for NookColor Build Instructions https://docs.google.com/document/d/19f7Z1rxJHa5grNlNFSkh7hQ0LmDOuPdKMQUg8HFiyzs/edit?hl=en_US&pli=1
- [Wiki] Barnes & Noble Nook Color: Compile CyanogenMod (Linux) http://wiki.cyanogenmod.com/wiki/Barnes_%26_Noble_Nook_Color:_Compile_CyanogenMod_(Linux)
- Read all three of the links listed above at least once and in the order given. Pay particular attention to the directions of link 2 as it makes heavy reference and some changes to the Wiki directions in link 3.
- Go back and re-read (or read again if you skipped step 0) what I just wrote in step 0.
- Start with the Wiki link above, step 3. Install the Android SDK if you haven't already. I've had it installed for so long now on my Dell that I'd have to go back to my Android posts (see android in the category cloud to the right) for general directions and any special tips.
- Wiki link step "Install the Build Packages" tells you to install a series of build packages. Fedora 14 installs with nearly everything the Wiki calls for out-of-the-ISO. The exception is schedtool, which you can install with a simple 'yum install schedtool' as root. I need to note that gcc on Fedora 14 is version 4.5.1. I download and install the Java RPM from the Oracle website. For the build I have Java 1.6.0 update 31 installed, the absolute latest and greatest at this time.
- Wiki link step "Create Directories" assumes you're going to create the 'bin' and 'android/system' directories in your home directory. I didn't and you don't have to either. I already have an ~/Android directory with the sdk and other Android content organized underneath. So I create a build subdirectory (~Android/build) and created my bin and android/system subdirectories inside build (~/Android/build/bin and ~/Android/build/android/system).
- Wiki link step "Install the Repository" is the step where you fetch the repo command. The assumption is it's done in your home directory. I did this in the build subdirectory. When you change the execute permissions on the file that is placed in the bin subdirectory, make sure you add a path to the bin subdirectory to execute repo. The simplest way to do this is to step into bin and type in your shell "export PATH=`pwd`:$PATH" or "export PATH=$PWD:$PATH", it's your call. If you haven't recognized the syntax, I'm in the bash shell. For permanence you need to add this to your .bashrc (something without pwd or $PWD, where you explicitly call out the path into bin).
- Step back into the build subdirectory and execute the command:
repo init -u git://github.com/CyanogenMod/android.git -b ics
This basically initializes the repository environment and executes pretty fast. - The next step is to create an XML file that references the nook (encore) device folder and add it to the ICS build environment. The file is android/system/.repo/local_manifest.xml, and the contents of local_manifest.xml are
<?xml version="1.0" encoding="UTF-8"?> <manifest> <!-- note: no longer need to replace CM9 Trebuchet launcher with AOSP's Launcher 2 --> <remote name = "gh" fetch="git://github.com/" /> <project path="device/bn/encore" name="fat-tire/android_device_bn_encore" remote="gh" revision="ics"/> </manifest>
Cut and paste this XML snippet into the file.
- In the build directory perform a full synchronize of the repository with the command
repo sync -j16
This took a few hours to fully execute and download. When it was finished the downloaded repository files took up some 5.6GB of disk space. - When the repository sync is finished, turn on your Nook Color with CM7 and plug it into the development system. I'm using the Nook Color with CM7 on the ยตSDHC card I created in the prior blog post. Move to android/system/device/bn/encore and execute ./extract-files.sh. This will download the Nook Color's proprietary binary blobs and place them in the ICS build environment for later use.
- Change directory to android/system/vendor/cm and execute get-prebuilts.
- Change directory back to android/system, and execute the following commands
. build/envsetup.sh
croot
brunch encore
And then prepare to wait a good three to four hours for everything to build. I didn't sit with a stopwatch or start a timer. All I know is that I started this around 3pm and it finished right before 7pm. By the time it was finished the Android footprint had grown to 21GB of disk space.
I'm not quite certain what to do with it at the moment. The next step for me is to learn how to create a new ยตSDHC with this running on my Nook Color. After all, just because it built is no guarantee it will execute properly.
I'd like to thank everyone who's worked on this so far, especially the XDA developers. Without all their heavy lifting to start with I'd have had one hell of a time just getting to this point.
[1] I am quite familiar with rcs, cvs, subversion, and ClearCase and know how to work with CM systems in a small to large development efforts. I just have no experience with git.
That is one advantage of the Nook Color versus the Nook Tablet. The latter can't boot from the micro SD card. I had to root mine the hard way.
ReplyDelete