user3325230
user3325230

Reputation: 517

AOSP modifying / compiling keyboard LatinIME

I have downloaded and successfully build the AOSP for marshmallow (android-6.0.1_r79). Than I made some changes to the stockkeyboard (regarding to my other topic, but not relevant here). The file which I modified was this here:

packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/LatinIME.java

I compiled the code and it was successful too. But than I realize I face some problems.

  1. I mounted the system.img and get into the path: /system/app/LatinIME/

  2. I decompiled the app to check if the modification there is available and here is the problem.

This APK does not contain any Java Sources?! Its just XML regarding to the layout. When I replace my old Stockkeyboard with this one, it is still perfectly working? So I got not clue what's going on.

Question regarding to this topic are:

  1. How can I make a modification to the stock keyboard LatinIME

  2. Building this new AOSP image with the new keyboard

  3. And extracting the new keyboardj (APK) out of this image to install it on my device (Root permissions are of course available)

What I have tried:

  1. Modyfing the following Java file: packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/LatinIME.java

  2. Compiling the complete project (make -j4 and just the keyboard: make -j LatinIME)

  3. Extracting the system.img -> mounting it -> pulling /system/app/LatinIME/LatinIME.apk out of this

  4. Replacing my own keyboard with the modified stock keyboard

My steps are as described not working. The keyboard appears and its working but the modification seems to be missing. Also by decompiling it, there are no Java sources within it.

Upvotes: 1

Views: 2870

Answers (2)

Sergey Chilingaryan
Sergey Chilingaryan

Reputation: 161

Here is the fresh and fully functional AOSP keyboard with glide typeing enabled

Upvotes: 1

Zbigniew Mazur
Zbigniew Mazur

Reputation: 721

you do:

cd packages/inputmethods/LatinIME

do your code changes

$mm -B croot

adb root

adb remount

adb push out/target/product/your_product_name/system/app/LatinIME/LatinIME.apk /system/app/LatinIME/

adb reboot

LatingIME.apk is about 18MB

You will find intermediate files ( the ones taken into compilation ) here :

out/target/common/obj/APPS/LatinIME_intermediates/

Upvotes: 1

Related Questions