[Android Software Development] ozkaya:
Hello guys,

Since I use a Samsung device, I'm used to the extra number row on top of the keyboard so I modded Swype to have that extra row. However since Swype is to be purchased and not distributed, I'll only tell here how to do it for your legally purchased copy. And this is a bit complicated and for advanced users and you need to be rooted. You also need Root Explorer. Here we go:

1- First buy/download Swype from Google Play.

2- Go to /mnt/asec/com.nuance.swype.dtc-1 folder, copy pkg.apk to your sdcard, rename it to com.nuance.swype.dtc-1.apk.(keep a backup of this file at all times)

3- Go to /mnt/asec/com.nuance.swype.dtc-1/lib folder copy the files (libnmsp_speex.so and libswypecore.so) to your sdcard.

4- Using apktool (I used version 1.52) decompile com.nuance.swype.dtc-1.apk.,

5- Go to decompiled folder\res\xml folder. kbd file pertaining to your language is to be edited, I edit kbd_qwerty.xml for English using Notepad++.

6- Check the attached kbd_qwerty.xml in portrait folder and notice the extra row section I added to the top. You can in fact add secondary characters to numbers or customize the keyboard completely, rearrange letters, add symbols etc.

7- Once done, save the file and go to decompiled folder\res\xml-land folder and edit the landscape for the layout, kbd_qwerty.xml file, notice the attached file in landscape folder.

8- Once done, save the file and go to decompiled folder\res\values folder and edit the dimens.xml file. Here I raise the height of the keyboard and height of the key to 270dip and 54dip respectively, check the top rows of the attached dimens.xml. Also increase the keyboard height for landscape (if you want) by changing the dimens.xml under res\values-land folder.

9- Once done, recompile the folder with apktool, go to decompiled folder\dist folder and copy the apk here to a different folder and rename it to temp.apk.zip

10- Open temp.apk.zip with 7z/winrar and copy the resources.arsc and kbd_qwerty.xml files from res\xml and res\xml-land folders to your PC(obviously keep the 2 files in seperate folders not to overwrite)

11- Then, rename the original apk from step 2 to com.nuance.swype.dtc-1.apk.zip , open with winrar and first delete resources.arsc file, then drag the resources.arsc file from step 10 to the archive, it will be added. Staying in winrar, go to res\xml folder and replace the file with kbd_qwerty.xml from step 10 (the portrait version). Do the same with res\xml-land folder and the landcape file.

12- Once finished rename the file back to com.nuance.swype.dtc-1.apk, don't sign it, don't delete META-INF folder, leave it as it is.

13- Now, on your phone, uninstall Swype. Reinstall it from the apk file on Step 2. Go to /data/app-lib/com.nuance.swype.dtc-1 folder and move the 2 files (libnmsp_speex.so and libswypecore.so) to system/lib folder. You have to mount the System R/W from Root Explorer on this step. Fix the permissions so these 2 files have the same permissions with other files there. If you can't find these files just use the ones from Step 3.

14- Once done, copy com.nuance.swype.dtc-1.apk from Step 12 to /system/app and fix the permissions so that it has the same permissions as other files there.

15- Then delete the com.nuance.swype.dtc-1.apk from /data/app/ folder. Restart your phone.

This should be it if you followed it exactly, tracing and Dragon voice dictation also works. While you're doing all this work (takes 10 minutes by the way), you might also consider changing how Swype looks (theming) and changing many other things like swype thickness, colors etc. Please note that this is for advanced and rooted users and please don't ask me to give you the modded apk, you have to do it on your legally bought version. You might consider doing backups just in case anything goes wrong. Have fun.

And a quick tip: if you swype from swype icon to symbol key(123), arrow keyboard opens up.

You can also add arrow keys by copying arrow keys from kbd_edit.xml, check the 2nd screenshot.

Please hit the thanks button if you think this is useful.