Wednesday, July 20, 2011

I want to lock down browsing and shopping

Now and again, the nookboards have a parent turn up who wants to have control over what's in the library for their kid. Usually, these folks also want to have control over what the kid can do with the internet.

As long as you are ready to dedicate the NC solely to your kid's use, including assigning a unique registration email to the NC, this is possible.

The method is very simple: remove the browser and the shop from the device.

The library still works, and books can be read. If you go to the BN website, log into the account tied to that device, and buy books, the books will sync to the device and be readable.

However, since the shop on the device is disabled, no offending titles will be displayed. Since the browser on the device is disabled, no offending websites will be displayed.

If you want more granular control, the iTouch is a great device that has very fine-grained parental controls available. It costs about as much as the NC (for a smaller screen, granted)

If you like the large screen and the price of the NC, this method has the advantage of being free. As set up, it is also reversible - the first scripts copies the Browser and Shop to /media/my files, then deletes them from /system/app. The second script puts them back.

How to do the lockdown:

You will need:

- a microSD card

- a copy of the Clockwork Recovery disk image
- Copies of the files:

- NoShopNoBrowse.zip to remove access to the browser and shop.

http://www.mediafire.com/?0okd2499bdh7w9s

- RestoreShopBrowse.zip to put the files back again if you want to restore access

http://www.mediafire.com/?rjx4h4j2q7asp9o

- a disk imaging tool such as diskimag (or use dd for mac/linux)
- a good zip tool - I recommend 7zip.

Leave the No Shop and Restore files zipped.

The Clockwork Recovery disk image is available here

http://legacyschool.us.to/nookdev/clockwork/0.7/

Download the file that matches the size of your SD card.

Step 1: Make a bootable CWR disk.

Completely unpack the CWR file you downloaded. You must use a file whose name ends in .img. as your source for making the disk. The files I am pointing to for downloading end in .tar.gz, and are essentially "double compressed."

gz = gzip. 7Zip, an excellent cross-platform compression utility, can decompress these, leaving you with a file whose extenion is .tar

.tar = unix tape archive. 7Zip, an excellent cross-platform compression utility, can extract files from these.

Once you've unzipped and untarred the file, you should have an .img file (sized appropriately for your SD card. You will need at least a 256 M card (the 128M images don't quite fit on a 128M card, more's the pity,) but I prefer to use larger cards so I can also store backups on them.)

Use an imaging program (diskimag or winimage or dd for mac or linux) to make a bootable SD card by "writing" the .img file to your SD card.

This erases all the data on that card.

The card is analogous to a bootable disk for your PC (remember boot floppies?) The program formats the card and write a very few files to it. Those files tell the Nook Color "you can boot from me. Once booted, run Clockwork Recovery."

After you make the disk, leave it mounted on your computer.

Copy the NoShop and RestoreShop files onto the CWR card. Leave them zipped!

Safely remove the card from your computer. Power down your Nook Color and insert the CWR card. Power on, and you will boot into Clockwork Recovery, which is controlled using the volume and power buttons to go up and down in menus (volume) or back (power.) An action is chosen using the N button on your NC.

Navigate to "install ZIP from SD Card"

Install the zipfile of your choice, NoShopNoBrowse.zip locks access; RestoreShopBrowse undoes the process.

Navigate back to the beginning menu in CWR (where the "reboot now" prompt is a choice.

Remove the CWR disk and choose Reboot.

When the device reboots, apps installed before this process will be onboard, as will books and any sideloaded content. The web browser placeholder will be there, but will not launch. The shop placeholder will be there, but will not launch.

As DeanG pointed out originally, the scripts are so simple that anyone with a ZIP viewer can verify the contents of the relevant files:

The NoShop files that do the work are:

  • META-INF/com/google/android/updater-script
  • tools/remove.shop.browser.sh
The RestoreShop files that do the work are:
  • META-INF/com/google/android/updater-script
  • tools/restore.shop.browser.sh
If you have also rooted the NC you are running these scripts from, you almost certainly have ROM Manager installed.

If you do, you can use ROM manager to boot into Clockwork, and that lets you do this very time-saving thing:
- copy the scripts to whatever SD card you normally have in the device
- reboot into CWR
- install the script of your choice
- reboot

Here there's no need to swap cards.

Obviously, if you have a rooted NC and older kids, this particular may stop working, because eventually the kids will figure out how to boot into ROM manager and run the restore script.

Unless, of course, you rename it and put it in a subdirectory, which will delay them for a few days more.

But by then smarter kids will already have used their allowance to buy an SD card and install CM7 on it, and be watching and reading anything they like without leaving a trace on the device :)