Hi,
I am on a Samsung Galaxy S21 (Snapdragon 888), and after a recent securiy patch (Android 11, Security patch level: January 1, 2022), SNPE (v1.55) no longer works, seemingly due to libqape.qti.so no longer being accessible from inside anAndroid app:
2022-01-20 12:05:29.713 21942-21942/ai.<redacted>.androidapi E/linker: library "/system/system_ext/lib64/libqape.qti.so" ("/system/system_ext/lib64/libqape.qti.so") needed or dlopened by "/data/app/~~JQZ60BESBYiI9uai82qopw==/ai.<redacted>.androidapi-PK_rewO0T2d3BvZsM8ZGlQ==/lib/arm64/libSNPE.so" is not accessible for the namespace: [name="classloader-namespace", ld_library_paths="", default_library_paths="/data/app/~~JQZ60BESBYiI9uai82qopw==/ai.<redacted>.androidapi-PK_rewO0T2d3BvZsM8ZGlQ==/lib/arm64:/data/app/~~JQZ60BESBYiI9uai82qopw==/ai.<redacted>.androidapi-PK_rewO0T2d3BvZsM8ZGlQ==/base.apk!/lib/arm64-v8a", permitted_paths="/data:/mnt/expand:/data/data/ai.<redacted>.androidapi"]
The same app worked in December last year prior to the security patch. Is there a known workaround aside from editting /system/etc/public.libraries.txt ? For our purposes, we cannot assume that the app we are developping will always be distributed to rooted devices.
Thank you
Update:
It turns out the device I was using auto updated itself to Android 12. This seems to be due to this native library visibility rule introduced for SDK 31: https://developer.android.com/guide/topics/manifest/uses-native-library-... .
I was able to temprarily work around the problem by setting targetSdk to 28 inside the gradle build file. However, if I try to set targetSdk to 29 or 30, I get this new error:
2022-01-21 12:47:52.593 25717-25717/ai.<redacted>.androidapi E/dsp-client: DspClient.cpp (131): Error: open_hal_session: failed to open session, error -1
2022-01-21 12:47:52.593 25717-25717/ai.<redacted>.androidapi E/ai.<redacted>.androidapi: vendor/qcom/proprietary/commonsys-intf/adsprpc/src/fastrpc_apps_user.c:2254: Error 0x0: open_device_node failed for domain ID 3, sess ID 0 (errno 13, Permission denied)
2022-01-21 12:47:52.593 25717-25717/ai.<redacted>.androidapi E/ai.<redacted>.androidapi: vendor/qcom/proprietary/commonsys-intf/adsprpc/src/fastrpc_apps_user.c:2485::Error: 200: dev >= 0
2022-01-21 12:47:52.593 25717-25717/ai.<redacted>.androidapi E/ai.<redacted>.androidapi: vendor/qcom/proprietary/commonsys-intf/adsprpc/src/fastrpc_apps_user.c:2629: Error 0x200: apps_dev_init failed for domain 3, errno Permission denied
2022-01-21 12:47:52.593 25717-25717/ai.<redacted>.androidapi E/ai.<redacted>.androidapi: vendor/qcom/proprietary/commonsys-intf/adsprpc/src/fastrpc_apps_user.c:2727: Error 0x200: open_dev (-1) failed for domain 3 (errno Permission denied)
2022-01-21 12:47:52.593 25717-25717/ai.<redacted>.androidapi E/ai.<redacted>.androidapi: vendor/qcom/proprietary/commonsys-intf/adsprpc/src/fastrpc_apps_user.c:1233: Error 0x200: remote_handle64_open failed for file:///libsnpe_dsp_v68_domains_v3_skel.so?snpe_dsp_domains_v3_skel_handle_invoke&_modver=1.0&_dom=cdsp (errno Success)
2022-01-21 12:47:52.594 25717-25717/ai.<redacted>.androidapi A/libc: Fatal signal 11 (SIGSEGV), code 2 (SEGV_ACCERR), fault addr 0x71f60be828 in tid 25717 (<redacted>.androidapi), pid 25717 (<redacted>.androidapi)
This error seems to be related to the libsnpe_dsp_v68_domains_v3_skel.so
Any idea why this would only affect target SDK 29, 30, but not 28?
any update about this one?