Stuff

bla bla bla yada yada yada ad nauseam

Removing Unused Languages in Swype

I like Swype, I really do. It’s probably the best keyboard out there for Android, definitely so if you have a 3.2″ or smaller screen. Their betas are usually freely available, which means you get to use the latest test version for free and give them feedback onĀ  their forums and possibly anonymous usage statistics, can’t quite remember. The big issue with Swype is you get to choose 3 language packages. English/Spanish, English/Chinese and English/All Other Languages. Since I’m a native portuguese speaker, I want to have the portuguese language on my phone. This ends up forcing me to use the “All Others” package and downloading/installing a huge file roughly around 10-12mb. Since I have 150mb internal memory, 12mb takes a big chunk out of it mostly with dictionaries and keyboards I will never use. Most keyboards have their various language modules available in the market, so if I want to use the portuguese language I just download the PT package and that’s it. With Swype that’s not so simple. I had to tweak the .apk a bit to remove all the crap I will never use and then install it again.

I remember following this guide a while ago and it worked, but I was using version 1.6 at the time if memory serves me correct. For some reason that goes beyond my understanding the android sdk apkbuilder wasn’t working as smoothly now and was complaining something about no zip and it being necessary to the resources. I googled it for a bit and came up with no decent solution so I tried doing it another way. Here’s how I did it. I’m not sure you need root for any of the steps on this guide, but I will always assume you have a rooted phone.

First up, you’ll have to head on to http://beta.swype.com to register, you will then point your phone browser to http://beta.swype.com/android/get/ and download the beta installer. Run the installer and after you have inserted your login details and beta code he will download the latest beta which is 3.25 at the time this post and install it.

You will then have Swype Beta installed on your phone and if you don’t speak English/Spanish/Chinese you’ll have a 10-12mb “All Other Languages” application installed under /data/app/. What you’ll want to do is use any file manager such as File Expert and copy the .apk from /data/app/ to your computer either by copying it to your SD and then move it or directly through wifi.

Once the file is in your computer, rename it from .apk to .zip. This will allow you to use it as a regular zip and uncompress it to your Desktop for example. Inside the app folder navigate to /assets/files and delete all the keyboards and languages you don’t want to use. In my case it was everything mentioning an Azerty/Qwertz keyboard as well as all the other languages other than Portuguese and English US that I won’t be using. I ended up not touching files such as Edit-LS-Latin1.zkb.le and similar since I have no idea if I’ll need them and they’re only 2kb each anyway. I removed all unnecessary languages .zkb.le, .htm and -full.htm. While in this folder edit the languages.lst file and delete all languages that you won’t use. Be careful not to leave a newline character at the end of the line otherwise it will break, if you’re running Linux or OS X a simple command line editor like Pico will do fine, not sure for Windows. If you skip this step those languages will still show up under options cluttering the list and possibly crashing the software if you removed them.

Once done, navigate to /assets/keyboards and delete all the image files for keyboard layouts you don’t use. In my case it was all the Azerty, Qwertz and Russian files. You can also remove the /assets/tutorial folder if you already know how to use Swype.

Next up, you’ll want to remove the META-INF folder on the application’s root folder since we’ll need to sign the package again and we don’t want old signature information in the way. If you end up with “Application Not Installed” while trying to install it it’s probably because you skipped this step.

You’ll then create an uncompressed .zip with all the files on the root folder and not the root folder itself. You’ll want assets/lib/res folders and other files to be on the root of the zip and not a folder named com.swype.android.inputmethod1. It is very important that you both select “store only” while zipping it (i.e., with no compression) as well as have the correct files on the root of the zip.

Once zipped, change the file extension from .zip to .apk and move it to your SD Card. We’ll now proceed to sign and install it.

You’ll need a small app from the market called Signapktic. Install it and run it. Select the file on your SD and sign it, the procedure is quite straight forward and no step by step instructions should be needed here.

All what’s left to do is uninstall the Swype you have installed and install the new one. You may also want to move it to your system rom space using the method on this post since it’s an app you’ll constantly be using.

If you’ve never used Swype, here’s a small video showcasing what it can do :)

Comments