Reputation: 517
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.
I mounted the system.img and get into the path: /system/app/LatinIME/
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:
How can I make a modification to the stock keyboard LatinIME
Building this new AOSP image with the new keyboard
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:
Modyfing the following Java file: packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/LatinIME.java
Compiling the complete project (make -j4 and just the keyboard: make -j LatinIME)
Extracting the system.img -> mounting it -> pulling /system/app/LatinIME/LatinIME.apk out of this
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
Reputation: 161
Here is the fresh and fully functional AOSP keyboard with glide typeing enabled
Upvotes: 1
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