Skip to main content

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;
  1. 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.
  2. 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:
  1. CM9/ICS Nightly Builds http://forum.xda-developers.com/showthread.php?t=1444943
  2. CM9 for NookColor Build Instructions https://docs.google.com/document/d/19f7Z1rxJHa5grNlNFSkh7hQ0LmDOuPdKMQUg8HFiyzs/edit?hl=en_US&pli=1
  3. [Wiki] Barnes & Noble Nook Color: Compile CyanogenMod (Linux) http://wiki.cyanogenmod.com/wiki/Barnes_%26_Noble_Nook_Color:_Compile_CyanogenMod_(Linux)
The instructions, both implicitly and explicitly, assume you're using Ubuntu. Since I'm using Fedora, I have to adjust accordingly. This is what I've done so far under Fedora 14.
  1. 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.
  2. Go back and re-read (or read again if you skipped step 0) what I just wrote in step 0.
Now that you're thoroughly familiar with the content of the three links, I will go through all the steps I performed.
  1. 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.
  2. 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.
  3. 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).
  4. 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).
  5. 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.
  6. 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.
  7. 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.
  8. 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.
  9. Change directory to android/system/vendor/cm and execute get-prebuilts.
  10. 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.
After all this I am now the proud owner of my very own Android ICS file: update-cm-9.0.0-RC0-NookColor-KANG-signed.zip

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.

Comments

  1. 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

Post a Comment

All comments are checked. Comment SPAM will be blocked and deleted.

Popular posts from this blog

A Decade Long Religious Con Job

I rarely write inflammatory (what some might call trolling) titles to a post, but this building you see before you deserves it. I've been seeing this building next to I-4 just east of Altamonte/436 and Crane's Roost for nearly 12 years, and never knew who owned it. Today on a trip up to Lake Mary with my wife I saw it yet again. That's when I told her I wanted to stop by on the way back and poke around the property, and photograph any parts of it if I could.

What I discovered was this still unfinished eighteen story (I counted) white elephant, overgrown with weeds and yet still under slow-motion construction. It looks impressive with its exterior glass curtain walls, but that impression is quickly lost when you see the unfinished lower stories and look inside to the unfinished interior spaces.

A quick check via Google leads to an article written in 2010 by the Orlando Sentinel about the Majesty Tower. Based on what I read in the article it's owned by SuperChannel 55 WA…

first night for the gingersnaps

The first night has passed and the two have managed to survive, in spite of what their tiny hearts might have thought when first arriving. Greebo, the larger of the two, has been in hiding the entire time so far. Ponder has spent the time zipping in and out of hiding spots, checking things out, and learning just how comfortable pillows are for resting your head.

During the night I felt the tiny body of Ponder hitting the bed as he leaped up on the side, and then climbed to the top to run around on top of me. At least once he play-attacked my fingers. He might be small but his claws are still quite sharp.

When I got up in the morning the bowl of cat kitten food was fairly well depleted. It's been refilled and fresh water put in the big dish on the floor. I'm assuming that both Greebo and Ponder are feeding and drinking. I have seen Greebo under the furniture peeking out at me when I went looking for him. I'm leaving him alone while he continues to adjust.

So far the guys h…

cat-in-a-box channels greta garbo

So I'm sitting at my computer, when I start to notice a racket in back. I ignore it for a while until I hear a load "thump!", as if something had been dropped on the floor, followed by a lot of loud rattling. I turn around and see Lucy in the box just having a grand old time, rolling around and rattling that box a good one. I grab the GX1 and snap a few shots before she notices me and the camera, then leaps out and back into her chair (which used to be my chair before she decided it was her chair).

Just like caring for Katie my black Lab taught me about dogs, caring for Lucy is teaching me about cats. She finds me fascinating, as I do her. And she expresses great affection and love toward me without coaxing. I try to return the affection and love, but she is a cat, and she takes a bat at me on occasion, although I think that's just her being playful. She always has her claws in when she does that.

She sits next to me during the evening in her chair while I sit in mi…