using android native libs on PC

I have an apk with native .so libs, compiled for all architectures: armabi, mips, x86 and x86_64. I want to use these libs in my java app.

As i suppose, for building app on desktop i need to copy .so file from x86_64 folder anywhere on my PC, i’ve copied it to ~/IdeaProjects/ecg/lib/x86_64. After that i provided to VM path to this file as follows: -Djava.library.path=/home/user/IdeaProjects/ecg/lib/x86_64

Then i wrote wrapper for using this library on my project. In static initializer of wrapper i trying to load the library like that (my library file named


And during loading library i receive this exception:

Exception in thread "main" java.lang.UnsatisfiedLinkError: /home/user/IdeaProjects/ecg/lib/x86_64/ cannot open shared object file: no such file or directory

So what is Where can i get it? I tried to dig and all what i found was compiled for different arches on github. I’ve found one for x86_64 there, put it near my native lib file, but the exception didn’t disappear.

What can i do for achieving my goal?

sudo apt install android-liblog && android-liblog-dev and provide LD_LIBRARY_PATH=/usr/lib/android resolve this issue. But now i’m received next error:

Exception in thread "main" java.lang.UnsatisfiedLinkError: /home/user/IdeaProjects/ecg/lib/x86_64/ /usr/lib/x86_64-linux-gnu/ invalid ELF header

UPDUPD finally i’ve copied all dependent libs from android sdk folder (Sdk/ndk-bundle/platforms/android-24/arch-x86_64/usr/lib64) and exceptions has gone. Now app simply falls with this report:

# A fatal error has been detected by the Java Runtime Environment:
#  SIGSEGV (0xb) at pc=0x0000000000000000, pid=11338, tid=0x00007ffaccb05700
# JRE version: OpenJDK Runtime Environment (8.0_131-b11) (build 1.8.0_131-8u131-b11-2ubuntu1.16.04.3-b11)
# Java VM: OpenJDK 64-Bit Server VM (25.131-b11 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# C  0x0000000000000000
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
# An error report file with more information is saved as:
# /home/user/IdeaProjects/ecg/hs_err_pid11338.log
# If you would like to submit a bug report, please visit:
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.