[Nook Touch Themes and Apps] nmyshkin:
While working on a custom update of the UK ROM to FW 1.2.2, I was intrigued to see that there was a dictionary management Settings option. Of course it didn't work because there were no other dictionaries to download. But the idea stuck with me and eventually led me to develop this app and release it in conjunction with some new sets of single-language and translation dictionaries based on Wiktionary.

Note: this app is for the

US version

of the NST/G only.

READ THIS: you need to make a complete backup of your device before using this app.

Improper

use of this app may slowly decrease the available free space in /system, so MAKE A BACKUP.

What this app does

0. Changes the location of the stock dictionary and the way it is accessed (can be undone by "Restore").

1. Allows you to select either internal (/data/media/B&N Downloads/Dictionary) or external (/sdcard/Dictionary) storage for dictionaries.

2. Backs up the stock dictionary to your chosen storage location.

3. Deletes the stock dictionary files from /system/media/reference.

4. Displays up to eight dictionaries you copy to the storage location you have chosen and

5. Allows you to select and "install" an alternate dictionary (or the stock dictionary)

The only time dictionary files are actually moved is during the backup or restoration process. This takes a minute or so. Otherwise only symlinks are created and deleted in /system/media/reference, and these point back to the storage location.

Changes in dictionaries are immediate, no reboot required.

Requirements

1. Root

2. sqlite (in attached zip package)

3. basewords.db and inflectedwords.db files for the language pair or language you desire

Q&A

1. I already have an alternative dictionary I am using. Can it be used with this app?

Yes. The files can be placed in an appropriately named folder in the storage location and the app will find them. The name of the folder is the display name in the app. However, if you have removed the stock dictionary it is best to restore it properly first. To do this safely, refer to the instructions for manually installing dictionaries found in the companion post. Once the stock dictionary is back where it belongs you can run the app and proceed through setup. Then you can place your alternate dictionary in your chosen storage location. All dictionaries must contain both a basewords.db and inflectedwords.db. DO NOT select a dictionary with this app which does not have both files present!

2. My dictionary does not show any "source" like the stock dictionary and the ones you made.

When the stock dictionary is moved to the storage location a one-item table is added to basewords.db. This contains the identifying string used in the app display (the table is removed during the "Restore" process). You can add a similar table to your dictionary using SQlite. If you don't have SQlite on your computer and don't want to fuss with it, you can download the SQlite Database Browser instead. It will open your basewords.db file and there is a tab on the console labeled "Execute SQL". This provides a place for you to type in SQlite commands and execute them. To add the table:

CREATE TABLE nook_metadata (source TEXT); (execute--click the "play" symbol)
INSERT INTO nook_metadata (source) VALUES('your string here'); (execute--click the "play" symbol)

Be sure to "Write Changes" before exiting.

Installation and setup

1. This is a Tasker-generated app and requires two library files (in attached zip package) or it will not install. If you already have one of my other Tasker-generated apps you can discard these files. Otherwise, copy them as indicated below:

/system/etc/permissions/com.google.android.maps.xml

/system/framework/com.google.android.maps.jar

Set permissions for both files to rw-r--r-- and reboot. Without these files resident, the app will not install.

2. If you don't already have sqlite, copy the file from the zip as below:

/system/bin/sqlite

Set the permissions to rwx r-x r-x and reboot.

3. Install the Dictionaries app with a file manager or via ADB.

4. On first run the app requests SuperUser permission. You then select either internal or external storage for dictionaries.

5. Next the stock dictionary is backed up. If you want to stop using the app it is very important to use the "Restore" option on the bottom right of the main screen. Otherwise you will be left without any dictionary at all!

6. At this point setup dialog with the app ends. Now is the time to copy any alternative dictionaries to the storage location you selected. This can be done by transferring the folders/files to your sdcard or /media, and then using a file manager to move the files to the proper location (/data/media/B&N Downloads/Dictionary OR /sdcard/Dictionary). For example, if you are going to use an "English-French" dictionary, you would want a folder /sdcard/Dictionary/English-French. In that folder you would place the basewords.db and inflectedwords.db for that language pair. The folder name you use will be the display name in the app. During setup the app creates the folder "English" within the Dictionary folder in your storage location of choice. You should not change the name of this folder. Sorry.

Generally the files are large enough that you will want to move one at a time. Files can also be transferred via ADB, but if you chose internal storage, the command syntax is complicated by the "&" character and spaces in the directory name. Be sure to use double quotes as in the example below:

adb push basewords.db "/data/media/B&N Downloads/Dictionary/German-English/basewords.db"

Be sure EACH folder for a dictionary contains a basewords.db file and an inflectedwords.db file

. Failure to place both files in a folder may result in a crash of the app if that dictionary is selected and a potential loss of storage space in /system.

7. After moving the dictionary files to your chosen storage location, accessing the app will show the available dictionaries. Choose which one you want and tap "Confirm". The job is done and the app closes. The dictionary is immediately available.

If you change your mind, just use the exit arrow to leave the app without tapping on "Confirm".

8. If you don't want to use the Dictionary Management app any longer, open it and tap on "Restore". This will delete the symlinks in /system/media/reference and copy the stock dictionary from its (backup) storage location back to /system/media/reference. Everything returns to normal, but any dictionaries you copied onto the device remain in place (that includes a copy of the stock dictionary). You can remove them with a file manager or ADB.