[Android Apps and Games] bnsmb:
Problems installing GmsCore with libvtm-jni.so

Problems installing GmsCore

After installing the GmsCore apk file

com.google.android.gms-11951417.apk

on my ZUK Z2 Pro running AospExtended 5.1

z2_row:/system/priv-app/MicroG # uname -a

Linux localhost 3.18.31-8x-caf-gf6f6878c7919 #3 SMP PREEMPT Sun Dec 31 09:36:09 CET 2017 aarch64

some applications did not work any more, for example the German app "DB Navigator"

I'm using AospExtended 5.1 (= Android 8.1) so I installed the apk by copying it to /system/priv-apps/MicroG

z2_row:/system/priv-app/MicroG/lib # ls -Zlr /system/priv-app/MicroG/MicroG.apk
-rw-r--r-- 1 root root u:object_r:system_file:s0 2831704 2018-01-04 19:47 /system/priv-app/MicroG/MicroG.apk
z2_row:/system/priv-app/MicroG/lib #

and rebooting the phone. After reconfiguring everything and rebooting again all checks where green in the microG Settings "Self Check".

And my main test application "Google Camera" worked.

But "DB Navigator" did not work any more -- before installing this version of GmsCore "DB Navigator" issued a message regarding non-existent play services but it worked.

So I checked logcat while starting "DB Navigator" and found this error message:

And Java is right - the library is neither in one of the lib directories nor in the correct directory in the apk file:

z2_row:/system/priv-app/MicroG # find /system/ -name libvtm-jni.so

z2_row:/system/priv-app/MicroG/lib # unzip -l /system/priv-app/MicroG/MicroG.apk | grep libvtm-jni.so
50864 1980-00-00 00:00 lib/arm64-v8a/libvtm-jni.so
46280 1980-00-00 00:00 lib/x86/libvtm-jni.so
46244 1980-00-00 00:00 lib/armeabi-v7a/libvtm-jni.so
51152 1980-00-00 00:00 lib/x86_64/libvtm-jni.so
54432 1980-00-00 00:00 lib/armeabi/libvtm-jni.so
z2_row:/system/priv-app/MicroG/lib #

So I created the correct library manually:

z2_row:/system/priv-app/MicroG # unzip /system/priv-app/MicroG/MicroG.apk lib/arm64-v8a/libvtm-jni.so
Archive: /system/priv-app/MicroG/MicroG.apk
inflating: lib/arm64-v8a/libvtm-jni.so

z2_row:/system/priv-app/MicroG # ls
MicroG.apk lib

z2_row:/system/priv-app/MicroG # ls lib
arm64-v8az2_row:/system/priv-app/MicroG # pwd ; find .
/system/priv-app/MicroG
.
./MicroG.apk
./lib
./lib/arm64-v8a
./lib/arm64-v8a/libvtm-jni.so
./lib/arm64
z2_row:/system/priv-app/MicroG #

z2_row:/system/priv-app/MicroG # cd lib

z2_row:/system/priv-app/MicroG/lib # ln -s ./arm64-v8a/ ./arm64

z2_row:/system/priv-app/MicroG # find . -exec ls -lZd {} \;
drwxr-xr-x 3 root root u:object_r:system_file:s0 4096 2018-01-04 20:09 .
-rw-r--r-- 1 root root u:object_r:system_file:s0 2831704 2018-01-04 19:47 ./MicroG.apk
drwxr-xr-x 3 root root u:object_r:system_file:s0 4096 2018-01-04 20:09 ./lib
drwxr-xr-x 2 root root u:object_r:system_file:s0 4096 2018-01-04 20:09 ./lib/arm64-v8a
-rwxr-xr-x 1 root root u:object_r:system_file:s0 50864 2018-01-04 20:09 ./lib/arm64-v8a/libvtm-jni.so
lrwxrwxrwx 1 root root u:object_r:system_file:s0 12 2018-01-04 20:09 ./lib/arm64 -> ./arm64-v8a/
z2_row:/system/priv-app/MicroG #

And "DB Navigator" and other apps using MicroG work again

I'm not sure if this is an error or if I've done something wrong installing the package

Anyway, MicroG / GmsCore is one of the finest apps available for user that do not want to add the Google Crap . Thanks for that

regards

Bernd