Nook Color with Android - Project Notes

Hello:  As I said over here in this post I did, I want a small tablet to play with Android stuff on.  Here, I'll share my notes on getting a "full" Android version on my new Nook Color.  This is really just a running commentary on a weekend of beer and hacking ... nothing more formal than that.  Please send corrections if you see stuff that needs them.

Prerequisites:  You will need a 4 GB microSD card.  Most come with a converter that can make your new microSD card look like a standard SD card -- this is the easiest way to go, since you can use your laptop's built-in card reader.

Useful Links:  There are a bunch of hacking sites for the little plastic doodad.  Many of the sites you'll find on a google search are infested with advertisement links, so be careful.  Here are the tabs I kept open in my browser, during my weekend:
First Boot: Stock, out of the box, it wants you to register the device.  Let it complete this procedure, including creating an account in the Barnes & Noble system.  Some features, even on a rooted device, require an account.  (You can skip the credit card step, FYI.)  This leaves the device just sitting there on the "get started" page, which naturally wants you to buy something.  Time to get started hacking!

Live CD Method:  The easiest way to dip your toes in, is to put an Android installation on a microSD card and boot from that.  It's really kewl to see your nook boot into a modern android version.  deeper blue has made this really fricken easy.  You'll download a complete image for Nook, write the raw data onto a microSD card, and let the Nook boot itself from that ... which is the automatic behavior when it sees a bootable card in the slot.
  • Download an image of deeper blue's Honeycomb for Nook preview.
    • As of this writing, here's the current image:
    • The link changes with each version, so you might need to try 05, 06, 221 .. whatever it takes.
  • Unzip the image file you just downloaded.
  • Pop a microSD card in your computer and unmount it (but leave it in the slot.)
    • Mac OS: `diskutil list` to find its device number, then `diskutil unmountDisk /dev/disk#`
    • Linux: If your distro is graphical, you can likely just right-click the card's icon and tell it to eject.  Command line, use `df` to find the device's partitions and `umount` each of them.
    • Windows: Actually, leave it mounted, unmounting seems to confuse the image writer.
  • Write the raw image directly to the microSD card.
    • Mac and Linux can use `dd` and feel all smug about it being built-in.
      • example: `dd if=nookhoney04.img of=/dev/rdisk# bs=1m`
    • Windows users will need something like Image Writer.
      • It's easy.  Show it the image file, point it at the card, click Write.
  • Power down the Nook for reals.
    • Hold down the hardware button for a few seconds, tap "Power off" when prompted.
  •  Pop the microSD card into the Nook.
    • On the back, lift the silver door labeled "Nook."  Insert card.  It's a little sneaky.
  • Power back up.
  • Profit.
Nooter Method:  Barnes & Noble just released nook firmware 1.3, and all well-behaved nooks did an over the air update without even needing to prompt the user.  (Pretty slick, actually.) Here are my abbreviated steps for running manual nooter on a 1.3 device.  You'll create a bootable Clockwork Mod card, then copy two versions of the manual nooter package to the card, then install both versions one after the other.  When you reboot, your device is rooted.  This is mostly a transcription of the official installation instructions.
  • You need a bootable set of tools on a microSD card.  The instructions use Clockwork Mod.
  • Next, add manualnooter zip files (two, if you have firmware 1.3) to the Clockwork bootable card.
    • Apparently, firmware 1.3 requires that you install 4.5.18 before adding 4.6.16.  Grab both.
    • Don't uncompress the .zip files that they arrive as.  Clockwork only installs .zip files.
    • Copy them (not raw write) to the top of the boot partition on your Clockwork microSD card.
  • Now, boot your nook with the Clockwork Mod card, and install the .zip files on your nook.
    • Boot off the SD card.
    • In Clockwork Mod's interface, install manualnooter 4.5.18
      • "install zip from sdcard"
      • "choose zip from sdcard"
      • "manualnooter-4.5.18"
      • Confirm the install.
    • Repeat for manualnooter 4.6.16
  • Pull out the microSD card and reboot your device.
    • Back out of the menu you're in.  (The power button is the "back" button.)
    • Yoink the SD card from the device.
    • Select "reboot now"
  • Play.  There's a bunch of stuff to try out.  This will consume plenty of fun-time.
Restoring to the Factory State:  These notes are what works on my firmware 1.3 device.  (Probably work with prior, tho.)  Basically you're going to do two things.  First you're going to simulate a gnarly reboot-looping error, so the device restores the factory system image in a last-ditch attempt to recover.  And since losing your book data would Suck Bad (tm), the first step doesn't empty the device's data directory .. so the second step is to wipe that.

First, let's get it to restore the system partition.
  • Power the little guy down, completely.
  • Power up, but keep holding the power button down.
    • After a few seconds it'll power back down, and increment an internal "failed boot" counter.
  • After eight aborted power ups, power up but don't hold the button down this time.
  • It'll boot into a recovery mode and reset the /system directory to a known-good factory state.
Next let's get it to nuke the /data partition.
  • Once the factory reset is done, power up as normal.
  • Go through the initial setup bits.
  • Once that's done and you're on the home screen, press the n button.
    • Or buy a subscription to Cosmo and call it at day.  Up to you, really.
  • Tap the "Quick Nav" up-arrow-ish software button at the bottom of the screen.
  • Tap "Settings."
  • Tap "Device Info."
  • Tap "Erase & Deregister Device."
  • Do it.  Confirm.  Watch it crank. Watch it reboot and it'll say "Clearing data.."
  • After that, when it boots up, you will be in a totally factory state.
Is it bricked?  Probably not, but it will sometimes get ornery.  For instance, sometimes you've just taken out a card, and holding down the power button isn't waking it up ... try plugging it in to power.  Dunno why it works, but sometimes that's all it needs.  Odd.

I left mine unplugged for a week or so and when I tried to switch it on, it gave me the "Battery too low to power ON" screen.  Well, I did plug it in to power, for, like, an hour.  It still wouldn't power up, complaining about the battery.  This one was user-error .. if it goes to zero power mode and asks for a charger, make sure you don't have a bootable microSD card in it.  It'll just sit there asking for a fifteen minute charge for ever.  D'oh!

I'm sure there are other cases where it likes to scare you.  I'll update this section as I find new and more interesting ways to break mine.

Side Note:  In Mac OS, determining what rdisk number your SD card is at:  Some of the online instructions for determining where your SD card reader gets enumerated are a little odd.  You should be able to do this with a bash one-liner.  In the meantime, here's how I explain doing it with diskutil:
  • Insert SD card.
  • Open a Terminal window.  (It's under the Applications folder, in a Utilities sub-folder.)
  • In that terminal, execute a  `diskutil list`  command.
  • The output shows each available drive, and the partitions it holds.
  • You'll see an entry for your SD card .. find it by looking for its size, in the size column.
    • For instance, mine shows up as /dev/disk3 and size 8.0 GB.
  • Prepend an "r" in front of the disk#, to indicate you want "raw" device access.
    • For instance, my SD card enumerates as /dev/disk3, so I direct writes to /dev/rdisk3.
    • You don't have to use the rdisk version .. writing is just a tad slower without it.
  • Before raw writing to the SD card, you should tell Mac OS to unmount it.  (Linux, too.)
    • Just issue a `diskutil unmountDisk /dev/disk#` command, with your disk# in there.
  • For the curious, unmounting isn't the same as ejecting.  No time to explain.
Other junk:
  • There's a 3.0 version of autonooter, somewhere.  You need firmware 1.1.  Dunno about 1.2 or 1.3.
  • Settings > Device Info > About your Nook Color -- "Software Version" is the firmware version.
  • Lots of deeper hacks use the Android Debug Bridge, referred to colloquially as "ADB."
    • Ah, the old Apple Desktop Bus.  Now those were the days.
  • Official Nook Color Support might be useful.  But probably not.  But you never know.
  • Since the Nook only has one hardware button, a "real" android will need SoftKeys available.
    • For the curious, if I've got it right, hardware keys are required for official android Marketplace apps to be conformant to standards.  Privately branded products like the nook are allowed to do whatever they like.
  • Ars Technica recommends the Dolphin HD browser.
    • There are a few choices, here.  There are a lot of Opera Mobile zealots in the world.
    • And no one ever got fired for installing Firefox.
  • Some posts suggest that the exact type of microSD card you use is important.
    • Some types aren't bootable.  Mine is, so I've not verified that.  :)
  • When new clockwork bits are realeased, the packages may be simply kernel and init ramdisk.
    • Which is to say, there's no boot loader to point the nook at the new kernel at all.
    • Use a previous, bootable Clockwork image you have to make a bootable card.
    • Then replace the uImage and uRamdisk files it's got, with the new ones.
    • The boot loader is smart enough to find them by name and aim the nook at them.
    • (Boot loader authors are a strange and wizardly bunch.  It's like demoscene, for hardware.)
  • Sometimes you'll see "uSD" instead of "microSD."
The end:  This is where I will thank the academy.  First, I've gotta pop out for some lunch, and a little quality time with the nook.  I should also make a joke about getting the thing to tweet from the command line ... or attaching it to an Arduino.

No comments:

Post a Comment