Android OS Forum banner
1 - 20 of 115 Posts

·
Premium Member
Joined
·
4,348 Posts
Swype does not work out of the box, but some small hacks in smali will make it work okay (though not really made for the size of the TouchPad). Since Swype does not like people redistributing their app, I cannot post it on here. However, for anyone with the ability and patience, this is how you get it to work:

ICS screens:
http://desmond.image....png&res=medium
http://desmond.image....png&res=medium

Gingerbread screen shot:
http://img31.imagesh...18507235338.png

1) download the apktool (I recommend getting the helpers for it so you do not have to run it with java directly)
2) decompile your Swype installer you had from your phone or you downloaded from swype.com with your touchpad browser with apktool (it's in /data/app)

Code:
apktool d /path/to/your/swype/installer/name_of_your_swype_app.apk
3) look for the file in the smali directory (installer/smali/com/swype/android/installer) called InstallerService.smali and then open it in a text editor of your choice.

4) In that file, find the following lines under the method .method public doDownloadList(ZIZ)I and comment them out like so by putting a # in front of them like so:

Code:
#invoke-virtual {v8}, Landroid/view/Display;->getWidth()I<br />
#move-result v2<br />
#invoke-virtual {v8}, Landroid/view/Display;->getHeight()I<br />
#move-result v3
5) Add the following right below those lines (the # part and after are just a comment for your own info):

For android 2.3 (gingerbread):
Code:
const/16 v2, 0x400 #hex for 1024px screen width<br />
const/16 v3, 0x258 #hex for 600px screen height
For android 4.0.x (ICS):
Code:
const/16 v2, 0x500 #hex for 1280px screen width<br />
const/16 v3, 0x2D0 #hex for 720px screen height
6) recompile the apk with apktool (it will show up under the "dist" directory within the root of the top directory that initially was created when you decompiled)

Code:
apktool b /path/to/the/decompiled/swype/folder
and sign it with signapk or something else that works. More information on how to use signapk can be found here as well or over here at the community android wiki.

How to sign it with signapk:

The link with more info on signapk includes a link to a copy of signapk with keys already made. You can use those or more preferred would be generating your own private keys with openssl doing the steps below. If you already have keys made, you can skip the steps about openssl and go right to the part about signapk itself.

On windows:

You need either cygwin with OpenSSL or a seperate openSSL package and install it.

After you get openSSL, you need to create a certificate to sign the apk. Either open cmd.exe or cygwin (cygwin is a port of many linux tools for windows) and type the following:

Code:
<br />
openssl genrsa -out key.pem 1024<br />
openssl req -new -key key.pem -out request.pem<br />
<br />
openssl x509 -req -days 9999 -in request.pem -signkey key.pem -out certificate.pem<br />
openssl pkcs8 -topk8 -outform DER -in key.pem -inform PEM -out key.pk8 -nocrypt<br />
Put the files created by the above commands as well as your apk into the Java install directory on your system (see the next line) ↓↓↓

Stick your recompiled apk in the directory you have Java installed (on windows that would be under program files/jdk1.x.x_x/bin, where x is some version).

Run the following command from the bin directory in java in cmd.exe or cygwin (where Swype-Installer-2.apk is the name of your unsigned apk):

Code:
java -jar signapk.jar certificate.pem key.pk8 Swype-Installer-2.apk Swype-Installer-2-1280x720-signed.apk
On Linux / OSX:

Linux and OSX come with openssl (or you can find it as a linux package for your distro) so you don't need to do much other than make sure java is installed. Just run the same four commands in the terminal:

Code:
<br />
openssl genrsa -out key.pem 1024<br />
openssl req -new -key key.pem -out request.pem<br />
<br />
openssl x509 -req -days 9999 -in request.pem -signkey key.pem -out certificate.pem<br />
openssl pkcs8 -topk8 -outform DER -in key.pem -inform PEM -out key.pk8 -nocrypt<br />
Then put the files it creates along with the unsigned apk file in some directory together and then go to that directory in the terminal and run the following:

Code:
java -jar signapk.jar certificate.pem key.pk8 Swype-Installer-2.apk Swype-Installer-2-1280x720-signed.apk
--------------------------------------------------------------------------------------------------------------------------

If all goes well, it should be signed and ready to stick on your touchpad. You can delete or archive the one named "Swype-Installer-2.apk" as it's the unsigned one. The other (Swype-Installer-2-1280x720-signed.apk) you will stick on your touchpad and install.

7) stick it on your touchpad and run it.

8) no more *****ing about "invalid device size" and it works :)

NOTE: do not bother trying to make it 1280x800 or 1280x720 on Android 2.3, it wont work, since it thinks you are running honeycomb or ICS and obviously you are not. Smaller sizes that are supported by swype will work, but with mixed results (trying 800x480 removes the language button and makes it a bit smaller so you can swype easier).

EDIT:

Just for reference, here's the chart for sizes that will work http://beta.swype.co...roid/supported/ View attachment 4213 (swype has not updated the chart for ICS though)

UPDATE: updated to support ICS and gives more details on how to do the tutorial.

ICS screens:



 

Attachments

·
Premium Member
Joined
·
4,348 Posts
Discussion Starter · #2 ·
If a mod chimes in and says it's okay to post the apk itself for the installer, I'll do so.
 

·
Themer
Joined
·
40 Posts
Swipe has made it clear that they don't want distribution of their property..
They have given lots of leeway for the development community as a whole, considering we have pretty much put their keyboard on every device possible.. They have also asked if we make something for a device not initially supported to not post the app as a whole..
I don't think there would really be a way to post it without it considered wares..
Has anyone tried the swipe installer to see if they have a free beta available?
 

·
Premium Member
Joined
·
4,348 Posts
junkdruggler said:
Swipe has made it clear that they don't want distribution of their property..
They have given lots of leeway for the development community as a whole, considering we have pretty much put their keyboard on every device possible.. They have also asked if we make something for a device not initially supported to not post the app as a whole..
I don't think there would really be a way to post it without it considered wares..
Has anyone tried the swipe installer to see if they have a free beta available?
Tried the swype installer? I'm pretty sure it would be hard to install swype and post the fix I did above without trying the installer :)

Their beta has always been free, just not always open to everyone.
 

·
Premium Member
Joined
·
4,348 Posts
ricez said:
How well does it work on such a large device? Isn't a regular IME easier to use?
Subjective questions. Easier to use is always an opinion. It's okay in portrait mode. Not as great in Landscape because it blocks the entire screen like on the phone. I'd go about retheming/resizing it and make a patch for people, but I already have my hands full helping trying to port MIUI on the HTC Thunderbolt.
 

·
Android Lover
Joined
·
1,260 Posts
junkdruggler said:
Im currently using flexT9 and it works great.. i also have thumb keyboard but the tp is kinda weird to hold and type with it..
I like thumb keyboard because you can quickly switch between split, normal, and one handed keyboards. And you can completely customize the sizes.
 

·
Premium Member
Joined
·
4,348 Posts
Discussion Starter · #9 ·
Hey guys, I know you all love your particular keyboards, but could we keep it on topic (those that have issues with applying the patch or those that have experience after trying swype or other swype questions)?

Feel free to create a swype alternatives thread.
 

·
Average Android
Joined
·
104 Posts
I tried the Free Swype Beta from their website but I got that invalid screen size error. I haven't tried modifying the apk at all.
 

·
Android Lover
Joined
·
1,260 Posts
yarly said:
Hey guys, I know you all love your particular keyboards, but could we keep it on topic (those that have issues with applying the patch or those that have experience after trying swype or other swype questions)?

Feel free to create a swype alternatives thread.
You have a screenshot? I pulled the apk from my phone and didn't like the size. Is this any better?
 

·
Premium Member
Joined
·
4,348 Posts
Discussion Starter · #12 ·
Snow02 said:
You have a screenshot? I pulled the apk from my phone and didn't like the size. Is this any better?
I can post one in a bit.
 

·
Android Beginner
Joined
·
6 Posts
hyperfire21 said:
how did u install that 1280 x 800? it gives us invalid error and fails the install.
I'm an idiot... I didn't save the file before I recompiled it hahahah... thats the default size listed in the OP :) I corrected my post. Hey theres a screenshot for some people ...
 

·
Android Beginner
Joined
·
6 Posts
lambcurry15 said:
const/16 v2, 0x400 #hex for 1280px screen width
const/16 v3, 0x258 #hex for 800px screen height

works on mine.. but looks exactly the same as the picture above.
I did that too once don't worry ;) You only modified the comment... the comment is saying, the 0x400 is hex for ......
 

·
Premium Member
Joined
·
4,348 Posts
Discussion Starter · #19 ·
joshts0 said:
I did that too once don't worry ;) You only modified the comment... the comment is saying, the 0x400 is hex for ......
I guess I should have noted that was a comment, lol. Smali reads in all integers/floats/etc in hex so I just put it there there so it would make sense why it was being added.

If you do set the screen size to 1280, it will "work" as in it will install and you'll see a keyboard, but it won't actually do anything functional than be a popup graphic when you press on a textbox :)
 
1 - 20 of 115 Posts
Top