Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

System.loadLibrary() failed after adding apk into AOSP

I have developed android project using android studio. It uses android native library which other developer built for speech recognization. The APK works perfectly when i install on android devices.

I need to put this APK into AOSP because I am going to make android device only for our system. (I have already customized AOSP) But after adding the APK into AOSP, the APK can not load library.

Error log:

 java.lang.UnsatisfiedLinkError: dlopen failed: can't protect segments for "../libsengine.so": Permission denied

Please help me to fix this problem.

like image 296
Yuichi Akiyoshi Avatar asked Jul 22 '26 02:07

Yuichi Akiyoshi


1 Answers

If you add your apk into AOSP system/app/ path as a prebuilt app, this might be of help: Error adding prebuilt apk with shared libraries to AOSP http://blog.csdn.net/a462533587/article/details/46380795 The problem is the shared library packaged in your apk has never been extracted to /data/app-lib directory, so it can't be linked.

like image 110
R.h Avatar answered Jul 24 '26 14:07

R.h



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!