Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,771,526 Members 49,586 Now Online
XDA Developers Android and Mobile Development Forum

[MOD] Add top number row to Swype

Tip us?
 
ozkaya
Old
(Last edited by ozkaya; 7th October 2013 at 06:53 AM.)
#1  
ozkaya's Avatar
Senior Member - OP
Thanks Meter 192
Posts: 479
Join Date: Mar 2006
Angry [MOD] Add top number row to Swype

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.

Please hit the thanks button if you think this is useful.
Attached Thumbnails
Click image for larger version

Name:	001.jpg
Views:	2779
Size:	29.5 KB
ID:	2305509  
Attached Files
File Type: zip template.zip - [Click for QR Code] (3.0 KB, 315 views)
The Following 21 Users Say Thank You to ozkaya For This Useful Post: [ Click to Expand ]
 
AnTerNoZ
Old
#2  
AnTerNoZ's Avatar
Senior Member
Thanks Meter 545
Posts: 848
Join Date: Jan 2011
Location: Siegen

 
DONATE TO ME
Nice how to. But may u should tell that the latest Android versions store purchased apps in data/app-asec as asec version, this need special procedure to get a apk from the asec format.
 
lesalloum
Old
#3  
lesalloum's Avatar
Senior Member
Thanks Meter 65
Posts: 259
Join Date: Jul 2012
Location: Beirut
Can you please update this tutorial to 4.3 ? I couldn't find the files in the mentioned paths. . I'm on stock rooted 4.3 on gt9500

Sent from my GT-I9500 using XDA Premium 4 mobile app
 
ozkaya
Old
#4  
ozkaya's Avatar
Senior Member - OP
Thanks Meter 192
Posts: 479
Join Date: Mar 2006
Quote:
Originally Posted by lesalloum View Post
Can you please update this tutorial to 4.3 ? I couldn't find the files in the mentioned paths. . I'm on stock rooted 4.3 on gt9500

Sent from my GT-I9500 using XDA Premium 4 mobile app
It works same for me on 4.3 stock rooted i9500, maybe you could do a file search to find the necessary folder. Here is another screenshot with the updated Swype(1.6.2.22328), where I made number buttons smaller like original Samsung Keyboard and hide the suggestions bar to save space.
Attached Thumbnails
Click image for larger version

Name:	002.png
Views:	834
Size:	141.3 KB
ID:	2377463  
The Following 2 Users Say Thank You to ozkaya For This Useful Post: [ Click to Expand ]
 
PhilDX
Old
(Last edited by PhilDX; 17th November 2013 at 06:01 PM.)
#5  
Senior Member
Thanks Meter 131
Posts: 423
Join Date: Oct 2010
Location: NJ
Quote:
Originally Posted by ozkaya View Post
Hello guys...
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
....
using the current play store version (1.6.3.22544), i decompiled com.nuance.swype.dtc-1.apk (/mnt/asec/com.nuance.swype.dtc-1/pkg.apk) using APKTool 1.52. i made no changes and attempted to recompile without success.

the first error displayed by apktool is:
"C:\Users\Phil\apktool\com.nuance.swype.dtc-1\res\values\arrays.xml:545: error: Found tag dimen-array where item is expected"

i do use APKTool successfully to mod other apps so i am familiar with the process.

QUESTION: what frameworks file are you using when making your mods? are you using a TW ROM frameworks? that's the only other variable i can think of...


EDIT: well, i just tried using TW framework too without success
 
ozkaya
Old
(Last edited by ozkaya; 17th November 2013 at 08:13 AM.)
#6  
ozkaya's Avatar
Senior Member - OP
Thanks Meter 192
Posts: 479
Join Date: Mar 2006
Quote:
Originally Posted by PhilDX View Post
using the current play store version (1.6.3.22544), i decompiled com.nuance.swype.dtc-1.apk (/mnt/asec/com.nuance.swype.dtc-1/pkg.apk) using APKTool 1.52. i made no changes and attempted to recompile without success.

the first error displayed by apktool is:
"C:\Users\Phil\apktool\com.nuance.swype.dtc-1\res\values\arrays.xml:545: error: Found tag dimen-array where item is expected"

i do use APKTool successfully to mod other apps so i am familiar with the process.

QUESTION: what frameworks file are you using when making your mods? are you using a TW ROM frameworks? that's the only other variable i can think of...


EXIT: well, i just tried using TW framework too without success
Latest version of Swype has incompatible tags with Apktool. What you do is go to all the lines that give error and change them to <string-array>. Then it compiles.
The Following 3 Users Say Thank You to ozkaya For This Useful Post: [ Click to Expand ]
 
PhilDX
Old
#7  
Senior Member
Thanks Meter 131
Posts: 423
Join Date: Oct 2010
Location: NJ
Quote:
Originally Posted by ozkaya View Post
Latest version of Skype has incompatible tags with Apktool. What you do is go to all the lines that give error and change them to <string-array>. Then it compiles.
i'll give this a shot tomorrow, thanks a lot!
 
PhilDX
Old
#8  
Senior Member
Thanks Meter 131
Posts: 423
Join Date: Oct 2010
Location: NJ
Quote:
Originally Posted by ozkaya View Post
Latest version of Swype has incompatible tags with Apktool. What you do is go to all the lines that give error and change them to <string-array>. Then it compiles.
it works!!!

thanks man, appreciate the help and info!
 
thumm138
Old
#9  
thumm138's Avatar
Member
Thanks Meter 6
Posts: 39
Join Date: Jun 2012
I've been going nuts trying to edit swype for a week now and still can't seem to get it to work. All I want to do is change the suggested word color and maybe a few other minor color related things. I assumed just changing the color codes in /res/values/styles.xml that seemed to pertain to the holo theme would work but I can't ever get the app to install. Not even sure where to begin to ask for help on this one but if anyone has any advice I'd greatly appreciate it.
 
TeknoGodz
Old
#10  
TeknoGodz's Avatar
Senior Member
Thanks Meter 49
Posts: 177
Join Date: Jun 2012
Location: Tampa
Ok I've tried this a hundred times following all the steps completely and it just wont work.

Once I go to install the final apk it always tries to install then sais App Not Installed.

Tags
dedicated number row, extra number row, number row, swype
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes