nookcolor unbrickable (1.0.0 rooted to 1.0.1 unrooted a long journey)
I received the nookcolor in early December. I rooted it almost immediately. I found it was a great device. I was on 1.0.0. The update came for 1.0.1 after I bought it (by 2 days I think). I didn't bother with the update, cause I knew I'd have to revert to stock to get that. Then the overclock kernel showed up so I tried it, using clockworkmod rommanager. I didn't realize the overclock was for a 1.0.1 device. My machine was faster but crashed constantly. I decided to unroot and go back to stock 1.0.0, I tried the instructions in this post but ended up with something that wouldn't boot cleanly. I could adb shell into it, but it just kept playing boot animation over and over again.
And so began my journey, I tried to unroot and apply the 1.0.1 update, unrooting failed. I was left with a brick I thought. Then I tried froyo on it, that worked, phew, device saved. From froyo I was able to reinstall clockworkmod and get myself back into recovery console. I made a backup before starting all of this, so I was able to restore from the backup and get myself to the pre-overclocked state. That should be the end of the story, but I'm a geek...
Knowing I could unbrick it easily, I decided to try the 1.0.1 update manually.
In the Sideload_update.zip there is a script that appears to be the instructions on installing the update called META-INF/com/google/android/updater-script.
Fearing nothing, I decided to just follow the script through and do what it says.
The script was completely easy to read:
assert(getprop("ro.product.device") == "zoom2" || getprop("ro.build.product") == "zoom2"); show_progress(0.100000, 6); format("ext2", "/dev/block/mmcblk0p5"); mount("ext2", "/dev/block/mmcblk0p5", "/system"); show_progress(0.800000, 120); package_extract_dir("recovery", "/system"); package_extract_dir("system", "/system"); symlink("dumpstate", "/system/bin/dumpcrash"); symlink("gralloc.omap3.so.220.127.116.1172", "/system/lib/hw/gralloc.omap3.so");
So, I formated /system, extracted recovery and system to /system (minus the recovery kernel, I wanted to keep clockworkmod). The symlink statements are pretty easy to follow, there's a recursive chmod/chgrp as well
My supposition was that the first 2 parameters were user and group respectively. The next two must be directory and file permissions. These I replicated with:
set_perm_recursive(0, 0, 0755, 0644, "/system"); set_perm_recursive(0, 2000, 0755, 0755, "/system/bin");
There were a few more in there but it was all fairly straightforward. I didn't put kernel-recovery into /boot/uRecImg because I wanted to keep clockwork (as I said earlier).
chown -R 0:0 /system chown -R 0:2000 /system/bin chmod 0755 `find /system -type d` chmod 0644 `find /system -type f` chmod 0755 `find /system/bin
After that I rebooted and sadly it didn't work. I had the boot animation from the autonooter and not the stock and it just kept repeating itself (like I'd seen before). I booted again into clockworkmod and on a whim I formatted /data (I have a backup and a titanium backup of the apps). After reformatting /data, it booted fine and it was a stock 1.0.1 device.
Thank you very much Barnes and Noble, this is a fantastic device, completely idiot proof (yes, I'm the idiot), you made alot of good design decisions. After that, autonooter did the right thing and I was able to go back to the 950MHz kernel and it's been running solidly for a day now.