[Guide] Install LineageOS/AOSP keyboard on any phone

Search This thread

fangblade386

Senior Member
Sep 17, 2014
52
10
Enabled but Unusable

I am running Android 9.0 with Magisk 19. I flashed it and enabled the app itself but its greyed out when I try to enable it as an IME under Manage Keyboards. How could I fix it?
b5a3lp.jpg
 

Lebatman

Senior Member
May 20, 2012
99
19
Gainesville, FL
Any chance AOSP keyboard is gonna have a FOSS swype (gesture typing) solution?

That's the biggest thing stopping me from moving away from Swiftkey. Of course other good features like a nice clipboard manager etc are also nice to have. But Swype and I'm in for AOSP.. and I'll probably convince a few of my friends too.

I read that Anysoftkeyboard has recently incorporated a solution (based on some non FOSS libraries) but the latest update on FDroid seems over 5 months old.
 
Last edited:

silokki

Senior Member
Aug 15, 2013
60
15
Pori
I am running Android 9.0 with Magisk 19. I flashed it and enabled the app itself but its greyed out when I try to enable it as an IME under Manage Keyboards. How could I fix it?

Do you have arm64 phone? I think that PIE-version of module is arm64. Or did i miss some .zip? I have arm32 and PIE-module did same to me.
 

AhmedRaslan

Member
Nov 5, 2017
7
3
25
Easy method installing for people on ColorOS 6 or similar UI, where you won't be able to install it as a system app ( For android Pie 9 and needs root )
1. Download the apk from this link : h t t p s://drive.google.com/file/d/13zNDAj-_q3FEWUCU1pY7-NmBAuDddkiW/view?usp=sharing
2. Install it as normal
3. Use any file explorer with root access and navigate to /data/app/*com.android.inputmethod.latin-BLABLABLA*/lib/
4. Create a folder named " arm " or " arm64 " based on your device type, I've tested this on arm64 and it's working fine
5. IMPORTANT STEP, mentioned by @tiga05
If you're on arm64, download this : h t t p s://gitlab.opengapps.org/opengapps/arm64/blob/master/lib64/23/libjni_latinimegoogle.so
and if you're on arm, download this : h t t p s://gitlab.opengapps.org/opengapps/arm/blob/master/lib/23/libjni_latinimegoogle.so
6. Put that file you just downloaded in the folder you've just created
And that's it, start using AOSP Keyboard ;)
 
  • Like
Reactions: Barkuti and SHA_NDY

SHA_NDY

Senior Member
Oct 17, 2013
270
73
Easy method installing for people on ColorOS 6 or similar UI, where you won't be able to install it as a system app ( For android Pie 9 and needs root )
1. Download the apk from this link : h t t p s://drive.google.com/file/d/13zNDAj-_q3FEWUCU1pY7-NmBAuDddkiW/view?usp=sharing
2. Install it as normal
3. Use any file explorer with root access and navigate to /data/app/*com.android.inputmethod.latin-BLABLABLA*/lib/
4. Create a folder named " arm " or " arm64 " based on your device type, I've tested this on arm64 and it's working fine
5. IMPORTANT STEP, mentioned by @tiga05
If you're on arm64, download this : h t t p s://gitlab.opengapps.org/opengapps/arm64/blob/master/lib64/23/libjni_latinimegoogle.so
and if you're on arm, download this : h t t p s://gitlab.opengapps.org/opengapps/arm/blob/master/lib/23/libjni_latinimegoogle.so
6. Put that file you just downloaded in the folder you've just created
And that's it, start using AOSP Keyboard ;)

Works like a charm on HTC U11 Life running Android 9! Thanks!
 
  • Like
Reactions: AhmedRaslan

raven428

Member
Dec 1, 2013
25
9
I had updated my Magisk module of LineageOS AOSP keyboard by adding Android 10 and 11 with arm64 architecture. Also merged all available versions to a single installer.
 

Barkuti

Senior Member
Jul 22, 2006
144
37
Alhama de Murcia
Thanks for this. I am running Android 8.1.0 AEX v5.7, and decided to upgrade its AOSP keyboard because the ROM stock version wouldn't recognize the updated emojis in my system.
So I downloaded AOSP Keyboard 12 from APKCombo, and indeed it started crashing upon launch. So I ended up watching this thread (AOSP v12 is ≈3.5 times the size of AOSP v11, by the way).
AhmedRaslan's guide up here was the easiest for me, and it worked. Thanks a lot! ☺
In any case, I find baffling the fact that the keyboard cannot upgrade properly by itself and the need to manually install a libjni_latinimegoogle.so file into its system application path. 👀
 

Austcool

Senior Member
Nov 30, 2016
148
29
23
Milan
n3rdp0rt4l.gitlab.io
You may want to use the LineageOS keyboard with some other rom. Just installing the .apk file will result in the keyboard crashing. We can install the required files manually to get the keyboard working. This requires root, but does not require any changes to /system
Getting the files
It's best to get the files from a real LOS rom, but if you don't have one you can extract them out of a rom. Download the official rom, then extract payload.bin with https://github.com/cyxx/extract_android_ota_payload. Then mount the system.img into an empty folder
Code:
mkdir temp
sudo mount system.img temp
Grab the files system/app/LatinIME/LatinIME.apk and system/lib64/libjni_latinime.so and put them on your phone
Installing
Install the apk like normal. Then you will have to copy the lib into /data
Code:
cmd list packages -f | grep inputmethod.latin
go to that folder and copy the lib into lib/arm64. This most likely needs root. Make sure to change the permissions
Code:
# cd /data/app/com.android.input.method.latin-whatever==/
# cd lib
# mkdir arm64
# chown system:system arm64
# cd arm64
# cp /sdcard/libjni_latinime.so ./
# chown system:system libjni_latinime.so
# chmod 644 libjni_latinime.so

The keyboard should now start without crashing.
I'm using the SM-T380 I need the armv7 version of /system/lib/libjni_latinime.so
 

leathan

Senior Member
Sep 15, 2013
198
44
Oh man the OP is so well explained but either i didnt read it or idk but I think you need to reboot after doing this for it to work.. I spent like an hour trying to figure out what I did wrong only for it to work after reboot at least lol.

Thank you for the explanation. works great on 12
 

Top Liked Posts

  • There are no posts matching your filters.
  • 7
    Magisk module of LineageOS AOSP keyboard

    Magisk module of LineageOS AOSP keyboard.

    I put in attachment two magisk modules: laosime4arm32android81-1_0.zip - for arm32 architecture, laosime4arm64android81-1_0.zip - for arm64 architecture. Both modules are for android 8.1. I do not have devices with newer versions of android to test.

    Also it's simple to manufacture versions for other versions of android: just replace LatinIME.apk and libjni_latinime.so inside zip to proper files from LineageOS appropriate distribution.
    6
    You may want to use the LineageOS keyboard with some other rom. Just installing the .apk file will result in the keyboard crashing. We can install the required files manually to get the keyboard working. This requires root, but does not require any changes to /system
    Getting the files
    It's best to get the files from a real LOS rom, but if you don't have one you can extract them out of a rom. Download the official rom, then extract payload.bin with https://github.com/cyxx/extract_android_ota_payload. Then mount the system.img into an empty folder
    Code:
    mkdir temp
    sudo mount system.img temp
    Grab the files system/app/LatinIME/LatinIME.apk and system/lib64/libjni_latinime.so and put them on your phone
    Installing
    Install the apk like normal. Then you will have to copy the lib into /data
    Code:
    cmd list packages -f | grep inputmethod.latin
    go to that folder and copy the lib into lib/arm64. This most likely needs root. Make sure to change the permissions
    Code:
    # cd /data/app/com.android.input.method.latin-whatever==/
    # cd lib
    # mkdir arm64
    # chown system:system arm64
    # cd arm64
    # cp /sdcard/libjni_latinime.so ./
    # chown system:system libjni_latinime.so
    # chmod 644 libjni_latinime.so

    The keyboard should now start without crashing.
    2
    Easy method installing for people on ColorOS 6 or similar UI, where you won't be able to install it as a system app ( For android Pie 9 and needs root )
    1. Download the apk from this link : h t t p s://drive.google.com/file/d/13zNDAj-_q3FEWUCU1pY7-NmBAuDddkiW/view?usp=sharing
    2. Install it as normal
    3. Use any file explorer with root access and navigate to /data/app/*com.android.inputmethod.latin-BLABLABLA*/lib/
    4. Create a folder named " arm " or " arm64 " based on your device type, I've tested this on arm64 and it's working fine
    5. IMPORTANT STEP, mentioned by @tiga05
    If you're on arm64, download this : h t t p s://gitlab.opengapps.org/opengapps/arm64/blob/master/lib64/23/libjni_latinimegoogle.so
    and if you're on arm, download this : h t t p s://gitlab.opengapps.org/opengapps/arm/blob/master/lib/23/libjni_latinimegoogle.so
    6. Put that file you just downloaded in the folder you've just created
    And that's it, start using AOSP Keyboard ;)
    1
    I updated the keyboard apk, lib files and script to update with AOSP Keyboard 9.0 for Android Pie. Just flash in Magisk as a regular module and reboot. Credit goes to Raven428 for the original module, thank you! I flashed this on my Pixel 3a and OnePlus 6T and works fine. Make sure you have a good backup prior to just in case. If you want it to be Transparent then consider my Translucent Substratum theme (shameless plug lol)
    1
    @Archangel

    I did some research about this topic and found out, that you need a specific closed source file.

    It's name is : libjni_latinimegoogle.so

    It gets installed with the google keyboard. Some pages say you can manually copy it in a specific folder and than it should work.

    Had no time to try it out. But will try this later.

    Maybe it helps you!

    Edit: OK I had the 5 minutes to try it :).

    It works!

    Just take the .so file for example from here ( I took them from the current downloadable opengapps):

    https://gitlab.opengapps.org/opengapps/arm64/blob/master/lib64/23/libjni_latinimegoogle.so

    And put them into system/lib64.

    Maybe you have to restart your smartphone. And then it works! Do you see any possibility to add this to your magisk module?