Hacking the Nook Color – Saga 1

So one of my friends bought a nook color this past week and I had a chance to play with it. I fell in love. Then once I found out ebay was having a $50 off special, I HAD to pull the trigger. I received it yesterday. It lasted all of about an hour before rooting.

I first updated to 1.1.0 at B&N’s nook site. Then I downloaded AutoNooter (http://forum.xda-developers.com/showthread.php?t=942424) and performed that. Once I was rooted I proceded to install the Kindle app along with some other niceties like ADW Launcher Ex.

I then had to try out HoneyComb (Android 3.0). This was as easy as downloading the SD Card Image (http://forum.xda-developers.com/showthread.php?t=936995) and dd’ing it to my card. Then sticking the card into the NC (NookColor).

I also installed ClockworkMod Recovery. In my rooted Stock NC Rom, I installed Rom Manager and used that to install the Recovery to “Nook Color” (not the OLD one).

Well I couldn’t leave well enough alone. I wanted to try out CM7 Nightlies without wiping my stock image. I didn’t go to bed till almost 5am … but I now have a procedure for installing cm7 AND honeycomb on the same sd card.

These instructions are very much experimental and YOU PERFORM THEM UNDER YOUR OWN RISK. I AM NOT RESPONSIBLE IF YOU BRICK YOUR NOOK COLOR.

Prereqs:

  • gingerbread google-apps update zip (if you can’t find it, you shouldn’t be doing this)
  • cm7 nightly update zip (ditto)
  • uboot-mkimage installed
  • Linux machine w/root access
  • 2 to 8GB sd card
  • adb communication with NC

Procedure:

  1. You first need to flash the honeycomb sd image to your sd card.
    1. You may be able to skip this step and copy them from the image if you can get losetup to create the block devices with offsets
    2. See “Accessing Specific Partitions in the Image” at http://wiki.edseek.com/guide:mount_loopback
  2. Mount partition 1 (vfat) and copy “uImage”, “uRamdisk”, “mlo”, “u-boot” somewhere safe
  3. DD partitions 2 and 3 somewhere save
    dd if=/dev/mmcblk0p2 of=HC_Partition2.img bs=1M
    dd if=/dev/mmcblk0p3 of=HC_Partition3.img bs=1M
  4. Partition your sd card:
    1. Delete all partitions
    2. Create a new primary partition 1. The size should be approx all but 2GB of the sd card (at least 64MB). Once created, ensure the number of blocks does not have a + after it. otherwise delete and change the cylinders by 1.
    3. Create primary partition 2. The number of cylinders should be 84
    4. Create primary partition 3. The number of cylinders should be 84
    5. Create an extended partition with the remainder of the drive
    6. Create a logical partition, 84 cylinders
    7. create a logical partition, 84 cylinders
    8. create a logical partition, remainder of drive
    9. The size of partition 2 and 3 should be “682762+” blocks, and 5 and 6 should be “682731″ blocks
    10. Change type of partition 1 to “c” (Win95 FAT32 (LBA)”) (‘t’ then ’1′, then ‘c’ commands)
    11. Make partition 1 bootable (‘a’ command)
    12. My partition table:
         Device Boot      Start         End      Blocks   Id  System
      /dev/block/mmcblk1p1   *           1         637     5116671   c Win95 FAT32 (LBA)
      /dev/block/mmcblk1p2             638         722      682762+ 83 Linux
      /dev/block/mmcblk1p3             723         807      682762+ 83 Linux
      /dev/block/mmcblk1p4             808         992     1486012+  5 Extended
      /dev/block/mmcblk1p5             808         892      682731  83 Linux
      /dev/block/mmcblk1p6             893         977      682731  83 Linux
      /dev/block/mmcblk1p7             978         992      120456  83 Linux
  5. format partition 1: mkfs.vfat -F 32 -n boot /dev/mmcblk0p1
  6. Format partitions 5,6,6: mkfs.ext4 -m 0 /dev/mmblk0p5;mkfs.ext4 -m 0 /dev/mmblk0p6;mkfs.ext4 -m 0 /dev/mmblk0p7;
  7. DD Honeycomb partitions back
    dd  if=HC_Partition2.img of=/dev/mmcblk0p2 bs=1M
    dd  if=HC_Partition2.img of=/dev/mmcblk0p3 bs=1M
  8. Mount partition 1
  9. Copy the the mlo file you saved to partition 1
  10. Copy uImage to partition 1 but rename it uAltImg
  11. copy uRamdisk to partition 1 but rename it uAltRam
  12. Download the Boot Menu for nook color (http://forum.xda-developers.com/showthread.php?t=962708)
  13. Unzip and copy u-boot.img to “u-boot” to partition 1
  14. Download kernel and recovery-clockwork-[version]-encore.img from http://forum.xda-developers.com/showthread.php?t=971197
  15. Copy kernel to partition 1, rename to uRecImg
  16. Copy recovery-clockwork-[version]-encore.img to partion 1, rename to uRecRam
  17. umount partition 1
  18. put your SD card into your nook and reboot
  19. you should see a boot prompt to press any key within 5 seconds, do so
  20. Change to SD and recovery and boot – verify clockwork mod start
  21. Reboot
  22. Press key at boot menu and change to SD and Alternate and boot. should start honeycomb
  23. Now for the fun stuff modifying a CM7 image to install onto and boot from sd card
  24. Change install:
    1. mkdir cm7
    2. cd cm7
    3. unzip <path to CM7 nightly zip>
    4. Edit META-INF/com/google/android/updater-script
      1. Change mmcblk0p5 to mmcblk1p5 (in script twice)
      2. Change mmcblk0p6 to mmcblk1p6
    5. cd ..
  25. We’ve updated the install, now we need to update the boot (unpack, edit, and repack the ramdisk)
    1. mkdir rd
    2. dd if=cm7/ramdisk.img of=ramdisk.gz bs=64 skip=1
    3. gunzip ramdisk.gz
    4. cd rd
    5. sudo su
    6. cpio -H newc -ivd < ../ramdisk
    7. Edit init.encore.rc
      1. Change mmcblk0p5 to mmcblk1p5
      2. Change mmcblk0p6 to mmcblk1p6
      3. Change mmcblk0p7 to mmcblk1p7
    8. find . -regex “./.*” | cpio -ov -H newc | gzip ../repacked-ramdisk.cpio.gz
    9. exit root shell
    10. cd ..
    11. mkimage -A ARM -T RAMDisk -n Image -d repacked-ramdisk.cpio.gz cm7/ramdisk.img
  26. Repackage zip:
    1. cd cm7
    2. zip -r ../cm7-sd.zip *
  27. Mount partition 1 and copy cm7-sd.zip and gapps.zip over
  28. Boot into recovery rom (CWM)
  29. READ READ READ – the next step is VERY IMPORTANT
  30. Prior to flashing you need to update fstab to point to the sd card – YOU MUST DO THIS OR YOU COULD MESS UP YOUR INTERNAL IMAGE!!
    1. adb pull /etc/fstab fstab
    2. Edit fstab
    3. change partitions
    4. Boot should be mmcblk1p1
    5. cache should be mmcblk1p7
    6. data should be mmcblk1p6
    7. system should be mmcblk1p5
    8. sdcard should be mmcblk1p1
    9. sd-ext should be mmcblk1p2
    10. (it may be possible to repack the clockwork mod ramdisk to have these changes, just follow the repacking ramdisk instructions but use the uRecRam image)
  31. Flash cm7-sd.zip
  32. Without rebooting flash gapps.zip
  33. Reboot. If you did everything you should boot into the CM7 nightly.
  34. Congrats, you now have CM7 and Honeycomb booting off the same SD card.

Things I know that might be broken:

  • Google Maps.
    • You can get this to work by editing /system/build.prop and changing the ro.sf.lcd_density to 161
  • Market list of installed apps
    • Once you get maps working:
    • Go to manage applications in settings
    • Select the market, uninstall the update
    • Delete the data on ”Google Services Framework”
    • reboot
  • Clockwork Backup (it weill try to back up sd-ext which is Honeycomb system’s partition)

Still haven’t added root to my honeycomb – but that should be easy - http://forum.xda-developers.com/showthread.php?t=941445

Filed in Android, Hacking | Comment Now

Wow.. Has it been a year?

So this is why I really don’t blog. I always forget to update. So I was going to try and track the two main projects I was working on.. The backup project is at least functional, though the automated “car full of tapes” part isn’t done… it at least does nightly syncing with rsync to the backup system at my parents. As for the trigger, I had a PCB made for it, and soldered two up. Found a couple of errors with my layout – I forgot a capacitor, and the ground plane wasn’t fully connected – oops. I need to work on software for that now. However I really haven’t had time with work, school and what seems to be a social life. Perhaps this year I can be more dedicated to blogging.

Filed in CFTBackup, Trigger | Comment Now

CFTBackup Project – Car Full of Tapes Backup

Off site backup is an important thing to have, however in order to effectively do this, one either needs to either send backup media to a separate location, or send the data over the internet. The primary disadvantages of the transportation of backup media is that if you want to have daily off-site backups, media either needs to be mailed or transported to the offsite location. This also requires a bunch of media as the media is what is physically moving. The advantage is that it’s fast to transport a large amount of data. Network based backup is automatic, and doesn’t require a bunch of media. However home Internet connections often have slow upload bandwidth.

CFTBackup is going to be a solution that operates on a hybrid approach. The name comes from the saying “Never underestimate the bandwidth of a station wagon full of tapes hurtling down the highway.” 1 The majority of the work will be accomplished with rsync, as the 1TB drive I am using is more than enough space for the time being.  The system will pull changes from my multiple computers throughout the day and at night, but due to the limited upload bandwidth the uploads to the offsite system will be limited to taking place during the late night. The other option for offsite backups will be to take a removable USB hard drive, transfer what needs to be backed up and physically transport it to the other location. The software to accomplish this hasn’t been written yet, but the hardware for my local system has been purchased.

Read More

Filed in CFTBackup | 1 Comment

Going to try this blog thing again

So I’m gonna try this blog thing again. I’m going to try and track my two main projects I’m working on right now -

  • An offsite backup solution w/ easy management and easy “car full of tapes” transfer in addition to network based (mostly software).
  • A wireless trigger for my SLR Camera and Flashes, using ATMega328, RFM12B, and other misc components (hardware & software).
Filed in CFTBackup, Trigger | Comment Now