Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,808,556 Members 42,994 Now Online
XDA Developers Android and Mobile Development Forum

[GUIDE] How to enable Swiftkey on Kindle Fire

Tip us?
 
vtluu
Old
(Last edited by vtluu; 27th November 2011 at 06:24 PM.)
#1  
Junior Member - OP
Thanks Meter 25
Posts: 23
Join Date: Aug 2011
Location: San Jose, CA

 
DONATE TO ME
Default [GUIDE] How to enable Swiftkey on Kindle Fire

UPDATE: updated instructions for Swiftkey X version 2.2.0.35 (released 11/18/2011) and later.
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:
  1. You've already rooted your KF and have ADB access.
  2. 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.
  3. You've got some way of installing the Swiftkey X app, either by installing Android Market or by sideloading the apk.
  4. You're using the purchased version of Swiftkey X (not the tablet version, not any beta or free version that might be out there).
  5. 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).
WARNING: use these instructions at your own risk! Modifying, removing or incorrectly setting the permissions on the settings database can result in a non-booting device!

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.
  1. Connect the KF to your computer via USB.
  2. 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).
  3. 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):
    C:\android>adb shell
    $ su
    # cd /data/data/com.android.providers.settings/databases
    # cp settings.db settings.db.bak
    # cp settings.db /mnt/sdcard/Download
  4. Now enable USB storage by tapping on the KF's top notification bar and then on "USB is Connected / Select to copy files..."
  5. 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).
  6. 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.
  7. Double-click on the entry's "value"; this will open an "Edit database cell" dialog.
  8. 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 2.2.0.35 (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
    Swype: com.swype.android.inputmethod/.SwypeInputMethod
    SymbolsKeyboard & TextArt Pro: com.mobisters.textart.pro/.AsciiTextArtKeyboardPro
    SlideIT: com.dasur.slideit/.SlideITIME
    Graffiti Pro: com.access_company.graffiti_pro/.Graffiti
    FlexT9: com.nuance.flext9.input/.IME
    Beansoft Thumb Keyboard: com.beansoft.keyboardplus/.LatinIME
    Hacker's Keyboard: org.pocketworkstation.pckeyboard/.LatinIME
    Simeji: com.adamrocker.android.input.simeji/.OpenWnnSimeji
  9. 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.
  10. Disable USB storage again by hitting the "Disconnect" button on the KF.
  11. Back in the ADB shell, copy the modified settings.db file back to its original location:
    # cp /mnt/sdcard/Download/settings.db .
  12. 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.*
    # 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
    (The last command just confirms your handywork.)
  13. Reboot the Android device using the ADB "reboot" command:
    # reboot
  14. 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.
  15. 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.
Voila!
The Following 13 Users Say Thank You to vtluu For This Useful Post: [ Click to Expand ]
 
ZzFDKzZ
Old
#2  
Senior Member
Thanks Meter 18
Posts: 598
Join Date: Mar 2006
I love Swiftkey on my phone but damn this looks so complicated. Thanks though for getting it to work on our devices.
 
vtluu
Old
#3  
Junior Member - OP
Thanks Meter 25
Posts: 23
Join Date: Aug 2011
Location: San Jose, CA

 
DONATE TO ME
Sooner or later someone will write a script or an app to make it easy.
 
vtluu
Old
#4  
Junior Member - OP
Thanks Meter 25
Posts: 23
Join Date: Aug 2011
Location: San Jose, CA

 
DONATE TO ME
Interesting timing. A new version of Swiftkey X was released this morning that changed the input methods path; I've updated the instructions above.

If you updated Swiftkey and found it no longer working, as I did, all you need to do is edit the settings.db file using the procedures described above, and reboot the device, after which you can select Swiftkey X as an input method again.
 
scrotty
Old
(Last edited by scrotty; 18th November 2011 at 03:56 PM.)
#5  
Member
Thanks Meter 17
Posts: 42
Join Date: Nov 2011
Can you unroot after completing this guide and still keep Swiftkey? Or, in other words, can I temporarily root my KF just to install Swiftkey?

Thanks!
 
scrotty
Old
#6  
Member
Thanks Meter 17
Posts: 42
Join Date: Nov 2011
vtluu, why not the tablet version of Swiftkey?
 
vtluu
Old
#7  
Junior Member - OP
Thanks Meter 25
Posts: 23
Join Date: Aug 2011
Location: San Jose, CA

 
DONATE TO ME
scrotty, yes you can unroot your KF after--I've done that so I can play Amazon videos--and Swiftkey will keep working just fine.

Why not the tablet version? The mobile phone version just happens to be what I have purchased. I might eventually get the tablet version but I find the phone version works pretty well, and in landscape mode the keyboard isn't too wide for my thumbs and I don't find myself needing a split keyboard.
The Following 2 Users Say Thank You to vtluu For This Useful Post: [ Click to Expand ]
 
scrotty
Old
#8  
Member
Thanks Meter 17
Posts: 42
Join Date: Nov 2011
Quote:
Originally Posted by vtluu View Post
scrotty, yes you can unroot your KF after--I've done that so I can play Amazon videos--and Swiftkey will keep working just fine.
Cool. I decided to use Voodoo OTA RootKeeper for now, but it's good to know a full unroot is viable.

Quote:
Originally Posted by vtluu View Post
Why not the tablet version? The mobile phone version just happens to be what I have purchased. I might eventually get the tablet version but I find the phone version works pretty well, and in landscape mode the keyboard isn't too wide for my thumbs and I don't find myself needing a split keyboard.
That's exactly what I was hoping to hear!

Thanks!
 
mewshi
Old
#9  
Member
Thanks Meter 10
Posts: 65
Join Date: Dec 2009
This works great.

Maybe a list of what should be added for different keyboards in the first post?
 
blauciel
Old
#10  
Senior Member
Thanks Meter 40
Posts: 318
Join Date: Nov 2011
Location: Dayton, OH
Excellent! Waiting on my KF, was hoping someone would have SwiftKey working. Thank you!

//Tapatalk//

Tags
kindle, kindle fire, slideit, swiftkey
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes