Forums - couldn't find "libsnpe-android.so"

4 posts / 0 new
Last post
couldn't find "libsnpe-android.so"
jax79sg
Join Date: 10 Mar 18
Posts: 12
Posted: Wed, 2018-05-16 03:35

Hi,

 Whenever i call the NeuralNetworkBuilder, i would get an error  [couldn't find "libsnpe-android.so"] as listed. This happened on both the Android Studio emulator and the Sony Xperia Qualcomm 845 phone (Android 8). Is there a prerequisite library i need to install on the phone?

builder = new SNPE.NeuralNetworkBuilder(this.getApplication())       
        .setRuntimeOrder(CPU)
        .setModel(file);

  java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.example.dh.frnpronphones-sgzI7gTiQJFwXOtULw9wSA==/base.apk", zip file "/data/app/com.example.dh.frnpronphones-sgzI7gTiQJFwXOtULw9wSA==/split_lib_dependencies_apk.apk", zip file "/data/app/com.example.dh.frnpronphones-sgzI7gTiQJFwXOtULw9wSA==/split_lib_resources_apk.apk", zip file "/data/app/com.example.dh.frnpronphones-sgzI7gTiQJFwXOtULw9wSA==/split_lib_slice_0_apk.apk", zip file "/data/app/com.example.dh.frnpronphones-sgzI7gTiQJFwXOtULw9wSA==/split_lib_slice_1_apk.apk", zip file "/data/app/com.example.dh.frnpronphones-sgzI7gTiQJFwXOtULw9wSA==/split_lib_slice_2_apk.apk", zip file "/data/app/com.example.dh.frnpronphones-sgzI7gTiQJFwXOtULw9wSA==/split_lib_slice_3_apk.apk", zip file "/data/app/com.example.dh.frnpronphones-sgzI7gTiQJFwXOtULw9wSA==/split_lib_slice_4_apk.apk", zip file "/data/app/com.example.dh.frnpronphones-sgzI7gTiQJFwXOtULw9wSA==/split_lib_slice_5_apk.apk", zip file "/data/app/com.example.dh.frnpronphones-sgzI7gTiQJFwXOtULw9wSA==/split_lib_slice_6_apk.apk", zip file "/data/app/com.example.dh.frnpronphones-sgzI7gTiQJFwXOtULw9wSA==/split_lib_slice_7_apk.apk", zip file "/data/app/com.example.dh.frnpronphones-sgzI7gTiQJFwXOtULw9wSA==/split_lib_slice_8_apk.apk", zip file "/data/app/com.example.dh.frnpronphones-sgzI7gTiQJFwXOtULw9wSA==/split_lib_slice_9_apk.apk"],nativeLibraryDirectories=[/data/app/com.example.dh.frnpronphones-sgzI7gTiQJFwXOtULw9wSA==/lib/x86, /data/app/com.example.dh.frnpronphones-sgzI7gTiQJFwXOtULw9wSA==/base.apk!/lib/x86, /data/app/com.example.dh.frnpronphones-sgzI7gTiQJFwXOtULw9wSA==/split_lib_dependencies_apk.apk!/lib/x86, /data/app/com.example.dh.frnpronphones-sgzI7gTiQJFwXOtULw9wSA==/split_lib_resources_apk.apk!/lib/x86, /data/app/com.example.dh.frnpronphones-sgzI7gTiQJFwXOtULw9wSA==/split_lib_slice_0_apk.apk!/lib/x86, /data/app/com.example.dh.frnpronphones-sgzI7gTiQJFwXOtULw9wSA==/split_lib_slice_1_apk.apk!/lib/x86, /data/app/com.example.dh.frnpronphones-sgzI7gTiQJFwXOtULw9wSA==/split_lib_slice_2_apk.apk!/lib/x86, /data/app/com.example.dh.frnpronphones-sgzI7gTiQJFwXOtULw9wSA==/split_lib_slice_3_apk.apk!/lib/x86, /data/app/com.example.dh.frnpronphones-sgzI7gTiQJFwXOtULw9wSA==/split_lib_slice_4_apk.apk!/lib/x86, /data/app/com.example.dh.frnpronphones-sgzI7gTiQJFwXOtULw9wSA==/split_lib_slice_5_apk.apk!/lib/x86, /data/app/com.example.dh.frnpronphones-sgzI7gTiQJFwXOtULw9wSA==/split_lib_slice_6_apk.apk!/lib/x86, /data/app/com.example.dh.frnpronphones-sgzI7gTiQJFwXOtULw9wSA==/split_lib_slice_7_apk.apk!/lib/x86, /data/app/com.example.dh.frnpronphones-sgzI7gTiQJFwXOtULw9wSA==/split_lib_slice_8_apk.apk!/lib/x86, /data/app/com.example.dh.frnpronphones-sgzI7gTiQJFwXOtULw9wSA==/split_lib_slice_9_apk.apk!/lib/x86, /system/lib, /vendor/lib]]] couldn't find "libsnpe-android.so"
        at java.lang.Runtime.loadLibrary0(Runtime.java:1011)
        at java.lang.System.loadLibrary(System.java:1657)
        at com.qualcomm.qti.snpe.SNPE.init(SNPE.java:46)
        at com.qualcomm.qti.snpe.SNPE.access$000(SNPE.java:31)
        at com.qualcomm.qti.snpe.SNPE$NeuralNetworkBuilder.<init>(SNPE.java:87)
        at com.example.dh.frnpronphones.PoseActivity.initModel(PoseActivity.java:431)
        at com.example.dh.frnpronphones.PoseActivity.onCreate(PoseActivity.java:92)
        at android.app.Activity.performCreate(Activity.java:7009)
        at android.app.Activity.performCreate(Activity.java:7000)
        at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1214)
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2731)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2856)
        at android.app.ActivityThread.-wrap11(Unknown Source:0)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1589)
        at android.os.Handler.dispatchMessage(Handler.java:106)
        at android.os.Looper.loop(Looper.java:164)
        at android.app.ActivityThread.main(ActivityThread.java:6494)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)

 

Thanks.


 

  • Up0
  • Down0
jax79sg
Join Date: 10 Mar 18
Posts: 12
Posted: Thu, 2018-05-17 03:59

Hi,

After digging into the problem, i have come to a few more observations and assumptions.

Assumptions
1. The update to Android 8 (Oreo) has potentially introduced a new problem. https://source.android.com/devices/tech/config/namespaces_libraries
2. There needs to be a way to bundle OpenCL with SNPE apps?
3. SNPE apps cannot work starting from Android 8?

Observations
1. This problem happened after the phone self updated to Android 8 (Oreo), it came in Android 7 (Nougat). I remember running the SNPE-ImageClassifer successfully on the same phone.
2. SNPE-ImageClassifer also facing the same error now.
3. On closer inspection, the error stemmed from a mission libOpenCL.so library. However the library is physically located at /vendor/lib64 folder.
4. The libOpenCL.so library is not listed in /system/etc/public.libraries.txt, should it be?
5. Downgrading the app to target SDK 22 does not help.
6. Android binaries snpe-net-run still works.

Thanks.

Regards,
Jax

  • Up0
  • Down0
meow meow
Join Date: 11 Mar 18
Posts: 6
Posted: Tue, 2018-05-22 22:45

 

Pixel2 (android 8, qualcomm 835)  SNPE: Only Support CPU, No-GPU, No-DSP 

Asus (android 7, qualcomm 835) SNPE: CPU & GPU & DSP  & GPU_Float16

other ( android 7.1.1, qualcomm 835) SNPE: CPU & GPU & DSP & GPU_Float16

Nexus5x (Android 8.1 qualcomm 808) SNPE: CPU Only

LG G6 (Android 7 Qualcomm 820) SNPE: CPU & GPU

 

snpe is not support android 8 ?? 

  • Up0
  • Down0
johann hough
Join Date: 3 Aug 18
Posts: 1
Posted: Fri, 2018-08-03 05:24

My LG V30+ updated to Android 8.0 from android 7.1 yesterday and now GPU is no longer supported for the SNPE libraries.

I have looked into this and came to many of the same conclusions that jax79sg had:

  1.  The problem comes from the fact that the SNPE libraries make us of "libOpenCL.so" located at "/system/vendor/lib64/libOpenCL.so". Android 8 no longer allows loading private system libraries and so SNPE does not have permission to load "libOpenCL.so" and therefore cannot use the GPU. 
  2. Surely Qualcomm should be able to statically link OpenCL to the SNPE library to remove the dependency on it.
  3. Manufacturers (LG in my case) should be able to help us solve this problem by adding "libOpenCL.so" to the "public.libraries.txt" and following the instructions that are given here: https://source.android.com/devices/tech/config/namespaces_libraries
  4. SNPE libraries can still run in CPU mode but at terrible framerates.

If anyone from Qualcomm can advise us on what to do it would be greatly appreciated. I am working on a company that was excited to use the mobile platform with Snapdragon processors to deploy Machine learning solutions and it would be a great loss if this is no longer viable.

  • Up0
  • Down0
or Register

Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries (“Qualcomm”). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.