# Compiling JellyBean LatinIME.apk



## srichter

I'm trying to compile the LatinIME.apk file from JellyBean to add a few tweaks and changes to the keyboard. I'm able to successfully build it, but I can't get the swipe input to work. I found inside the file packages/inputmethods/LatinIME/java/res/values/gesture-input.xml



Code:


<br />
<bool name="config_gesture_input_enabled_by_build_config">false</bool><br />

and changed that to 'true' and doing so enabled the gesture trail to appear, but it does not select any letters.

Does anyone have any experience with rebuilding this application?


----------



## razorloves

i haven't tried with 4.2.2 source, but with 4.2.1 you needed to throw a google lib (libjni_latinime.so) in /system/lib/ for the gesture typing to work. This lib is included in the 12/12/12 official gapps if you need it.


----------



## moongato

By chance, has anyone looked into what Vanir did with the stock JB LatinIME.apk? As far as I know, they got it down to under 3 mb in their Prime Grouper Rom, while stock is well over 20. It makes me wonder what that extra 20+ mb was for.

Sent from my Nexus 7 using Tapatalk 2


----------



## razorloves

moongato said:


> By chance, has anyone looked into what Vanir did with the stock JB LatinIME.apk? As far as I know, they got it down to under 3 mb in their Prime Grouper Rom, while stock is well over 20. It makes me wonder what that extra 20+ mb was for.
> 
> Sent from my Nexus 7 using Tapatalk 2


Just remove all the foreign language dictionary files


----------



## moongato

That makes sense.
I was curious ever since I read this post on XDA from the dev of the Nexus 7 Prime ROM- "In the keyboard for example i removed like 3000 soem lines of code that involved logging your keystrokes and storing/uploading them every 18 words for "research purposes". Goog can suck a D if they think bloaty code like this is ok."


----------



## JBirdVegas

moongato said:


> That makes sense.
> I was curious ever since I read this post on XDA from the dev of the Nexus 7 Prime ROM- "In the keyboard for example i removed like 3000 soem lines of code that involved logging your keystrokes and storing/uploading them every 18 words for "research purposes". Goog can suck a D if they think bloaty code like this is ok."


Umm I don't know what you read but the code is open source don't read wannabes "expert" opinions read the source code LatinIME is open source. There is debugging code in the app yes. If you compiled the rom correctly then ant should set debugging=false in the AndroidManifest and almost all the debugging code would never run.

No your text is not being sent off for anything... That's silly and would only fly in a closed source environment. Show me the code that records my keystrokes.


----------



## trevd

Sorry Couldn't resist

http://androidxref.c...archLogger.java

I'd say that's the code you're looking for. Off by default according to the header comments but it's definitely in there.


----------



## JBirdVegas

Android contains lots of development options to help ROM producers make aosp better. This one is clearly to get statistics on commly used words for better word list prediction. I see your point but its clearly coded to pull only words and there for developers.


----------



## trevd

Oh Yeah

I don't disagree , I'm not in the business of spreading FUD. I just thought I'd "[background=rgb(245, 245, 245)]Show me the code that records my keystrokes." , Sometimes it's best to check theses things yourself because as you point out the code is not only open source but on [/background]http://androidxref.com/[background=rgb(245, 245, 245)] fully searchable from 1.6 to current.[/background]

[background=rgb(245, 245, 245)]Interesting to know It was there.... anyway this is getting way OT. [/background]

[background=rgb(245, 245, 245)]@OP [/background][background=rgb(245, 245, 245)]This build LatinIME and all it's dependencies.[/background][background=rgb(245, 245, 245)] if you've got the Android Sources checked out just do make LatinIME from the root of the source tree, The problem is however that to build the higher level packages you need much of the framework to be built first, There are ways around it like importing it into eclipse but people of reported various level of success with that depends how much you know about eclipse I suppose. Sometimes is just easier to bite the bullet and wait an hour or so ( depending on CPU Speed ) for a full build to complete. The added bonus there is you can then mess around with any part of the code and compiling becomes pretty easy. [/background]


----------



## latinime2

@srichter and others: how did you manage to compile the latinime keyboard as single apk? I downloaded the sources from here: https://github.com/CyanogenMod/android_packages_inputmethods_LatinIME

and imported everything in IntelliJ IDEA. Unfortunately I got tons of errors.

What I want to get is a renamed latinime keyboard as apk, which is installable with pure user rights. Can someone help me out, how to do this?


----------



## yarly

You generally don't want to use intellij for building parts of AOSP. I use it for editing and error detection. I build with the command line instead. Also when importing into intellij, that also means you have to not let it be an android app project much of the time as system apps are likely to have source dependencies you will have to deal with (add the sources) and the default api will likely not have them unless you roll your own api replacement (which is another thing one is best to avoid if not sure how to do it).

In short if you are not sure how to deal with all that in intellij, then I would recommend not using intellij and build with the command line. Intellij only makes development easier if one already knows how to develop without it.


----------

