UPDATE 2: added known values for some other keyboard apps.
UPDATE 3: added warning, split the copying and chown/chmod step into two separate steps.
These instructions assume:
- You've already rooted your KF and have ADB access.
- You have the adb.exe debug shell installed. This is included with some rooting kits, or you can install the Android SDK (software development kit) from Google and get ADB straight from the source. The examples assume you have a directory called "C:\Android" where adb.exe is installed but yours may be installed elsewhere.
- You've got some way of installing the Swiftkey X app, either by installing Android Market or by sideloading the apk.
- You're using the purchased version of Swiftkey X (not the tablet version, not any beta or free version that might be out there).
- You've got a SQLite editing software (or can use "sqlite3" itself); the instructions below use the free SQLite Database Browser 2.0 which can be downloaded from Sourceforge; just Google for "sqlite browser" (sorry as a n00b I can't post links).
ALTERNATIVELY, you can use various Android apps to edit the database on the device without using ADB, and skip many of the steps below. Posts further down this thread has some recommendations for such apps. Two caveats if using such an app: make sure it doesn't alter the settings.db file ownership or permissions, and be very cateful when modifying the database entry, as there is a tendency for the keyboard or cut-and-paste to "helpfully" insert spaces or change capitalization.
If you try and install Swiftkey as you normally would, you'll get stuck at installation's step 2, which requires you to enable Swiftkey as an input method by redirecting you to the device's input method settings window; in the case of the KF, the option to enable alternate keyboard has been omitted, but as others (thanks PSXtreme and mfisch) have found it's possible to get around this problem and successfully install an alternate keyboard.
- Connect the KF to your computer via USB.
- When the Kindle tells you that USB storage is enabled, press the "Disconnect" button to disable it (having the USB storage mounted will prevent us from using ADB to copy to the sdcard directory).
- Open an ADB shell and use it to make a backup copy of the settings database file (settings.db), and then to a directory where you can edit it (we'll use /mnt/sdcard/Download here) (stuff you need to enter below is in boldface):
# cd /data/data/com.android.providers.settings/databases
# cp settings.db settings.db.bak
# cp settings.db /mnt/sdcard/Download
- Now enable USB storage by tapping on the KF's top notification bar and then on "USB is Connected / Select to copy files..."
- Open the SQLite Browser, and then open the settings.db file you copied by navigating to the mounted USB drive (e.g. D:\Download\settings.db).
- Click on SQLite Browser's "Browse Data" tab, and then "secure" from the droplist of tables. Find the row with the entry named "enabled_input_methods" (it's number 19, ID 21 in my file); you may need to widen the columns to see the full name.
- Double-click on the entry's "value"; this will open an "Edit database cell" dialog.
- The default value of the entry should be "com.android.inputmethod.latin/.LatinIME"; regardless, you want to add ":com.touchtype.swiftkey/.KeyboardService" to it (the ":" is a separator), e.g. changing the value to "com.android.inputmethod.latin/.LatinIME:com.touchtype.swiftkey/.KeyboardService". (Note: if you're installing a different keyboard program, you'll substitute a different value; I found the correct value for mine by downloading the settings.db file from another Android device with Swiftkey already installed.)
UPDATE: for Swiftkey X versions 18.104.22.168 (released 11/18/2011) and later, the value to be added is ":com.touchtype.swiftkey/com.touchtype.KeyboardService", so the resulting enabled_input_methods value is: "com.android.inputmethod.latin/.LatinIME:com.touchtype.swiftkey/com.touchtype.KeyboardService"
UPDATE 2: here's a list of known values for various keyboard apps:
Swiftkey (paid version): com.touchtype.swiftkey/com.touchtype.KeyboardService
Swiftkey Tablet (paid version): com.touchtype.swiftkey.tablet.full/com.touchtype.KeyboardService
SymbolsKeyboard & TextArt Pro: com.mobisters.textart.pro/.AsciiTextArtKeyboardPro
Graffiti Pro: com.access_company.graffiti_pro/.Graffiti
Beansoft Thumb Keyboard: com.beansoft.keyboardplus/.LatinIME
Hacker's Keyboard: org.pocketworkstation.pckeyboard/.LatinIME
- After you've changed the entry and double-checked you got it right, hit the "Apply Changes" button, close the dialog, and save your changes to the settings.db file. You can now close the SQLite Browser.
- Disable USB storage again by hitting the "Disconnect" button on the KF.
- Back in the ADB shell, copy the modified settings.db file back to its original location:
# cp /mnt/sdcard/Download/settings.db .
- Still in the ADB shell, fix the file owner and permissions (IMPORTANT! skipping this step can prevent your KF from booting properly!):
# chown system.system settings.*(The last command just confirms your handywork.)
# chmod 660 settings.*
# ls -l
-rw-rw---- system system 22528 2011-11-17 21:04 settings.db
-rw-rw---- system system 22528 2011-11-17 17:30 settings.db.bak
- Reboot the Android device using the ADB "reboot" command:
- Once rebooted, you can proceed with the Swiftkey installation. When you reach step 2 of the installation and it directs you to the KF input settings window, you can return from settings window and if you've correctly modified the settings it won't complain that you haven't enabled Swiftkey, and you can go on with the rest of the installation process.
- After finishing the install, long-press on a text field to bring up the "Select input method" pop-up menu, which will allow you to switch between the Kindle keyboard and Swiftkey X.