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 :)

Saturday, June 4, 2011

Flow for common issues

Here are some common issues people look for help on with their NC. Many are interrelated. My goal is to walk through processes that can help address them. I tend to avoid post-setup configuration. Actually using a device is less interesting to me than breaking it and fixing it, that's just how I roll.

- my NC won't update

- my NC can't talk to my wireless

- I want to root my NC

- I want to use netflix

- My nook reset itself and I can't connect to my wifi now

- how do I back up my NC?

-BN has remotely reset my NC, what do I do?

- I hate the udpate. BN says I can't roll back. BN is mistaken.

- BN sent me a nook with only 1G of room! DeanGibson has a fix for that, written
up here with additional info.


- I hate the cookbook. So do we all. Dean fixed that, too.

- You talk about rooting a lot, but I thought I was rooted on an SD card running Phiremod. What's up with that? By my definition, you're not rooted. Sorry for the confusion.

Getting Netflix Running

So, you want to watch netflix on your Nook Color. No problemo.

There's a fast, free way to do this. The fast, free way is not the easy way. Specifically, the fast, free way to do this assumes that you know the editor vi, already have ssh, telnet or adb access to your NC, and are very comfortable with commands like "mount -o rw,remount -t ext2 /dev/block/mmcblk0p5 /system"

If that's you, just change two build.prop values to these:

ro.product.model=HTC Vision
ro.product.manufacturer=HTC

The rest of the class, this method costs five bucks but will save you hair pulling. And you ought to be supporting the occasional android developer anyhow.

You will need: to be running 1.2

Start by rooting your 1.2 Nook Color (I recommend: root w/4.5.18 + apk-enabler)

Go to the Android market and install netflix.

While you're there, buy root explorer.

I have not found a simpler, safer way to edit build.prop on-device. I've tried the mount /system app (https://market.android.com/details?id=com.beansoft.mount_system) in conjunction with non-root file managers (ES, Astro); I've tried File Expert and could not get it to link to an editor well.

Launch root explorer. It's a graphical display of all your files.

su will ask you if you want to give Root Explorer superuser permissions. The answer is yes.

Navigate up to /

Navigate into /system

Press the "Mount R/W" button displayed at the top

Long-press on the "build.prop" file

Choose Open in Text Editor

Change two lines in build.prop:

Change:

ro.product.model=NOOKcolor

to:

ro.product.model=HTC Vision

Change:

ro.product.manufacturer=BarnesAndNoble

To:

ro.product.manufacturer=HTC

Save the file. Root explorer backs it up automatically. Check the file; if you did something wrong fix it now by copying build.prop.bak onto build.prop and trying again.

A blown build.prop can prevent your NC from booting normally, which might lead you to need to reinstall all or part of the OS. (You should be able to restore a backup of /system, after formatting /system. But that assumes you made a clockwork recovery backup of /system.)

Restart your NC.

Sign into Netflix.

Watch movies.

Monday, May 30, 2011

I hate the cookbook

OK, you hate the cookbook. DeanGibson has your back, and I'm dropping his info into my basic "this is the howto on Clockwork Recovery."

He has modified his original deletion file to now hide the cookbook. This is so that a restore to stock truly works - the old method of deleting files wound up making the onboard restore to stock methods not quite work.

you will need:

- a microSD card
- a copy of the Clockwork Recovery disk image
- a copy of Dean's zip file, from http://www.mailpen.com/download/hideSamples-v1.zip
- a disk imaging tool such as diskimag (or use dd for mac/linux)
- a good zip tool - I recommend 7zip.

Leave Dean's file 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.

Dean's file is explained below. First, make the 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, 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 Dean's sample removal zip file onto your CWR card. Leave it 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 Dean's zipfile.


Dean describes it thusly:


This is a really simple, scaled-down version of another script that I use that works, but it is untested. However, it is so simple that anyone with a ZIP viewer can verify the contents of the two relevant files:

  • META-INF/com/google/android/updater-script
  • tools/remove.sh



Definitions

You want to root... or do you? People are doing lots of things with the nook color. Unfortunately, people are calling two very different things rooting.

For now, this blog emphasizes rooting.

installing cyanogen mod 7 is not rooting
. It's helpful to be clear on these distinctions because people have posted to support forums saying "Hey, I rooted my NC and now I can't use feature X." It can take time to learn that no, the nook isn't rooted, it's running a whole different OS that does not have the BN features. If you install CM7 to internal memory, there's no guarantee that BN can't figure out that that's been done even if you reset to stock, though I would be surprised if they bothered.

Also, booting from an sd card is not rooting.

Rooting is a process that lets you change the BN software so you keep and can use it all the time, but also have full access ("root" access) to your Nook Color. Rooting adds the full android market so any Android app is available. The library and shop are usually also available..

Booting from an SD card lets you pick a different OS and use it off of an external card. The other OSes are generally Android 2.3, android 3 or android 2.2. The OS is generally slower, since it's not installed on the fast internal memory. If you want to use the full BN software (Nook shop, nook library, nook apps,) you need to restart your nook.

Dual booting can be done entirely on the internal memory. This lets you have both the stock BN software and andoid 2.3 (Cyanogen) running on the fast internal memory. Again, you need to pick one to run at boot time. (you could also dual boot Cyanogen and Honeycomb or Cyanogen and Nookie Froyo; in those cases, neither OS would have the BN library app.

Installing another OS to internal memory completely rips out the BN software and replaces it with completely unlocked android. You get all of the internal memory dedicated to your new OS, and you can install the Nook app in your new OS to keep shopping for books at BN. You won't be able to do magazine subs or read to me, though, just books, as I understand it.

You can revert to the BN stock OS after doing any of these modifications. It is unlikely that BN would know about it if you had done a mod, reverted it, and returned it for service unless the reason you returned it for service is that the display completely failed. I would think that it would be pretty hard to revert to stock if you could not see the screen. There would be ways to do it, but they'd be a challenge.

BN appears not to repair nooks and send them back to owners after a warranty return. It looks like they send you someone else's nook they've repaired and pronounced refurbished, and put yours at the back of the repair queue.

So far there are no reports of BN getting failed modded hardware and a few weeks later billing the owner for the work because they figured out that the device had been modded.

Sunday, May 29, 2011

Aldiko for Landscape Mode

Landscape in the Nook Color is broken. So is the BN DRM. The latter is so badly broken that it may actually be risky to purchase ebooks from BN.

BN knows, or should know, that many avid readers also have limited mobility and may need to prop their devices to use them comfortably. More than one such customer has explained the problem in the BN Nook Color forums. The Nook Color was marketed as a device that worked in landscape mode without qualification -- until the launch of the Nook, Second Edition. The marketing copy now says "for kids books and magazines."

The covers sold with the Nook Color almost all only support landscape display in their "standalone" or "easel" modes. The charger for the device is much less likely to be damaged if one reads and charges simultaneously in landscape mode -- in portrait mode, the Nook Color will rest its weight on the charging cable.

If you need landscape mode and night mode, BN continues to fail to deliver. If you're concerned about a vendor storing a hash of your live credit card info in multiple locations on your NC without mentioning that to you, you should read this post even if you like the BN Library app.

If you've already bought a lot of books from BN, and you'd like to or need to read them without using the BN software Aldiko is your fix. If you need landscape to work, for instance, with the expensive cover that BN sold you, or to safely charge your NC while you read.

Free or paid, Aldiko can read your BN books.

The current release of the manual nooter supports installing Aldiko. Aldiko can also sell you books.

Aldiko can open your BN content. Once you've opened any of your BN books, you can then do a bulk import of all of them.

Here's what you need to know:

- you need to copy your books to your SD Card and
- you need to know know the trick behind BN's "rights management." I'm sure everyone at BN was delighted that the DRM scheme came in so far ahead of schedule and so far under budget. It's too bad that, IMO, there are issues in terms of paying attention to the spirit as well as the letter of PCI compliance.

Your BN books (and newspapers, and magazines) are stored in the "B&N Downloads" folder on your NC. It's accessible via Root Explorer if you're on the new 7/1 partitioning, or available once you plug your NC into your PC if you're on the old partitioning.

Copy "B&N Downloads" to your SD card (if your SD card is in your NC when you plug it in, the SD card will be a generic removable disk, and the NC will be "MyNOOKcolor")

Root your Nook Color. Configure the Android Marketplace and download Aldiko. If you have trouble intalling Aldiko, check to see if your SD card is inserted. If it is not, put it in; if it is, remove it. (I forget which way you need to be set up to install.)

Aldiko can (for now) only browse the SD card, so after Aldiko is installed, remount your SD card.

In Aldiko, browse to the B&N Downloads folder you've copied to your SD card, browse to the books folder there, and open (not import) any one book.

You will be asked for your user name and password.

Your user name is the name on the credit card on file with BN. Case-sensitive and include any spaces. Your password is the card # without spaces. No, I'm not joking. BN uses your live credit data as their DRM key.

Your book will open.

Now, you can go back to the books folder in the Aldiko file browser now. Use the menu command to select all your books and folder. You can do a bulk import.

If you would prefer not to keep these files around in the state that BN delivers them, you can also copy the BN Digital folder out of your NC and use Calibre to remove the DRM outright.

That's a more complicated operation, but it's one I intend to make my next project now that I understand how comically bad the BN epub DRM is.

It turns out that the Nook app for PCs, at least, stores a hash of the user data - the bill-to name and the full credit card # - in clear text in an SQLite database stored on your computer.

Thus, the nook app represents a very soft target on a penetrated computer. If the nook app is present, retrieve its SQLite database as well as the email store. With that you can probably get a billing address for the card. AES 128 doesn't mean anything in a context where it's implemented wrong. Even without the email store, an attacker can simply brute force a retreival of the card # and name. With the email store, the terminal 4 digits of the card and its date of expiration may be available (they're supplied in receipts by many vendors) and the brute force retrieval is even easier.

With accurate billing name, billing address, credit card number and expiration date, an attacker can easily purchase goods in your name.

I am sure that the risks are present on the Android platform as well; the NC is in some ways less risky, because it is not as large a target of attack yet as PCs. This will be changing soon, as attackers come to appreciate the value of the data stored on Android devices. Here, though, the NC will probably be a bit safer than telephones for some time, because it does not have an always-on connection.

But I'll be blunt: my advice is to root the device, use Aldiko and strip DRM from your files if you can. If you have a card on file whith BN, when it expires, do not renew it. Between then and now, change the card on file to a gift card or one-time-use Visa or similar. Aldiko reader is very good - landscape support, solid night mode with a black, energy-conserving background.

Another obvious alternative for new purchases is the Android Kindle reader app. The app also supports landscape mode and excellent night mode and tracks reading accurately across devices. It has the disadvantage of not being able to read your existing BN files, but like Aldiko, will let you shop, um, Elsewhere. The Kindle app has the distinct advantage of a DRM scheme tied to an arbitrary unique device identifier. Not to your credit card number and name.

Wednesday, May 25, 2011

I want more room! (repartition from DeanGibson)

New NCs have a new partitioning scheme. Only 1G is left open to the user via their computer. If you have lots of apps or lots of video books, this is good.

This is bad - like, toxic - if your NC gets out of sync with the rest of your library. You can't manage the files that BN is storing the way you could under the earlier releases of 1.1 and 1.2.

Dean Gibson on the BN Nook Forums has released some great Clockwork Recovery scripts.

One will remove the accursed cookbook. Another, originally posted here:

http://bookclubs.barnesandnoble.com/t5/NOOK-Color-General-Discussion/Back-to-the-future-1GB-data-5GB-media/m-p/1036632/highlight/true#M46674

will let you repartition your NC to have 5G of available onboard storage and manage your files again.

you will need:

- a microSD card
- a copy of the Clockwork Recovery disk image
- copies of both of Dean's zip files, from http://www.mailpen.com/download/repartition1GBdata-v1.zip and http://www.mailpen.com/download/reformatData-v1.zip
- a disk imaging tool such as diskimag (or use dd for mac/linux)
- a good zip tool - I recommend 7zip.

Leave Dean's 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.

Dean's file is explained below. First, make the 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, 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 both of the zip files onto your 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.

Now, here's Dean:
  1. Backup everything you wish to save, or archive it on the B&N site, because this will clear all your data on the device. The OS (whatever it is) will not be touched.
  2. Boot into ClockworkRecovery.
  3. Repartition back to B&N 1.1 partitioning: http://www.mailpen.com/download/repartition1GBdata-v1.zip
  4. REBOOT into ClockworkRecovery.
  5. Reformat (and clear) /data, /cache, and /media after any partitioning: http://www.mailpen.com/download/reformatData-v1.zip
  6. If you backed up and restored the B&N data, you should be able to restore and continue without reregistering, but don't count on it (you may have to reregister).