Swype keyboard library installation not working

Hi everyone,

I’ve been missing the Swype function of the Gboard keyboard for a while now. I found several topics on Lineage’s reddit and alos this post : Swype keyboard for /e/ where a tutorial for installing the appropriate library from Gapps is explained.

Namely, this procedure :

  • download (pico) opengapps for your archtecture https://opengapps.org/
  • extract the zip package
  • in extracted folder “Optional”, extract swipelibs-lib-XXX.tar.lz (install lzip if you need)
  • in extracted folder “common/lib” now you have the libjni_latinimegoogle.so for your archtecture
  • reboot to recovery and, with twrp, mount system (there is an option in there)
  • adb push libjni_latinimegoogle.so /system/system/lib/
    (maybe in your case is system/system/lib64)
  • umount system in twrp
  • reboot now and it will work.

However, the Gesture typing menu is not appearing after reboot…

I am using a Oneplus3T with the latest /e/os rom. I downloaded the Arm64_Android10_stock OpenGapps package from the OpenGapps website.

Has anyone experienced similar trouble ?

Thx

Regain your privacy! Adopt /e/ the unGoogled mobile OS and online servicesphone

I’m gonna try this new method as I now have a new phone (Sony Xperia XZ3) with a de-Googled OS based on LineageOS 18.1 called iodé. It also has the stripped down version of OpenBoard which is useless without swype.

Marty

1 Like

That guide doesn’t give me the 2nd file. Im using android 11. That guide was written for android 10.

Which android version do you have? Follow the pages back to Reddit

Marty

Which 2nd file are you referring to?

I am using And10 and consequently downloaded the associated pack in the OpenGapps webpage. You can pick the one you need for your configuration on the link I put in my post.

Android changes files in android 11 so that libjni file isnt there. Try to follow this original guide for android 10:

Marty

OK-I’m lost!:man_shrugging::man_facepalming:

Where does that libjni file come from because it’s not in open gapps for android 10 either.

Marty

ok, I did some more searching and found this important point that got skipped:

Now get into the ZIP, respectively extract it. In the Optional dir you'll find another archive swypelibs-lib-arm.tar.lz. Extract that and you'll get the libjni_latinimegoogle.so file.

That was from here:

I wasn’t reading right. You don’t look for 2 files but that 1 file gets extracted again (maybe that’ll work on another computer) and then u pull that libjni file from that. So hopefully I can do this in Android 11 if I can get the swypelibs file to extract.

Marty

Indeed, as explained in the guide, two extractions in sequence are needed to find the said .so file.

As we are talking I downloaded the OpenGapps pack for the ‘pico’ rom and tried with the swypelibs found there, with no successful result… It does confirm a point read in another forum though : this lib appears not to have been updated for several versions of Android now, and picking anyone shouldnt be of an importance (the file should be 1087ko in all of them)

To be sure, I also pasted the swypelibs in both /system/lib/ and /system/lib64/ folders, as the path appears to differ according to the device you use. No result :confused:

So u couldn’t get the swypelibs file to extract either?

Marty

I am afraid I am not being clear enough as I thought it was implied that I extracted it without problem before posting the current topic. And did it again trying with different variants (stock, pico…) of the rom. Thus I can see the libs is 1087ko. I dont ecounter extraction difficulties on my side.

I pasted and deleted those libs in the phone /system/lib64/ folder several time yet, without success.

This comment on another forum is interesting as it points out to a different path that the first guide I considered: Enable gesture (swipe) input (on Fairphone 2) without Google Keyboard - Android Enthusiasts Stack Exchange
Im trying this out right now fingers crossed

My computer was able to extract the zip file from OpenGapps and then I got the swypelibs file from there but I cannot extract it-I rename it to a zip file but 7zip says the file is not a compressed file archive.

So how did u extract swypelibs?

Marty

I’m gonna look for libjni_latinimegoogle.so on another phone and then follow that guide u just posted to put it on my current phone and change permissions. My old phone is another Sony Xperia but XZ and running Android 9. Hopefully that file didn’t change in 2 years for similar phones.

Marty

1 Like

I am using WinRAR on a Windows10 PC. I open the first zip, in the folder ‘Optional’ I selected the swypelibs tar.lz archive in it, right-click->Extract to
Then in the created folder, I open the archive, 'Common->lib64->libjni_latinimegoogle.so and extract this file on a folder that I want.

I recall reading in a comment somewhere (Ive been roaming too much today) that you might need to fix something to handle .lz format if your system doesnt load it first hand.

I’m gonna try this on my Linux PC shortly that opens everything. Windows limits what u can do when u can’t install extra programs!

I was able to get the libjni_latinimegoogle.so file from another phone. It’s 1.11 Mb and permissions are -rw-r–r–

1 Like

Finally got it to extract in my Linux PC and got my libjni file and then used adb push to /system/lib64 but it didn’t give me swype. I’ll keep working at it but since my phone isn’t rooted it’s difficult to see what’s going on inside the phone. It might be a permissions thing. I don’t think u can change permissions in Windows but u can in Linux (Android is a mobile version of Linux). Using the guide u provided I saw that permissions should be 644. Using chmod 644 I changed permissions and then did adb push but no swype again…but I’m not sure the permissions didn’t change over adb.

Marty

I see what’s going on. I installed termux from F-droid to get a terminal and it lets u go into the root of the filesystem. The libjni file is not there. My recovery is the LineageOS recovery which I don’t like for doing stuff like this. TWRP is better and I’ll get that installed so I can make sure the system mounts and is writable. If you’re already using that, first disable the lockscreen password so it mounts writable.

Marty

Congratulations on your diagnosis ! you pinpointed several problems I read about on forums.
For more details, I am using TWRP recovery. I do all the file transfer through the graphical FileManager from TWRP. It does give you the option to chmod files in it, and I tried giving it 644 permissions. I also tried deleting the LockScreen … with no effect :confused:
After reboot, the swypelib file is still where I’d put it, and the LatinIME app is created on the appropriate folder, so no erasure occurred.

  1. Maybe you will need to allow “adb as superuser” in Developer Options of your your phone to get “adb root” working (and maybe you will want to turn it off later).
  2. If you are in amr64, maybe you should replace “/system/lib/” for “/system/lib64/” in the instructions.