Discussion:
Problem API 26 loadLibrery
LocucionAR Productora de contenidos
2018-08-09 19:22:09 UTC
Permalink
Hi, I have some issues with the new policy change, using API 26. I get an
error loading en aac decoder libary. With target 22 work fine, the problem
is with target 26.

java.lang.UnsatisfiedLinkError: dlopen failed:
/data/app/com.cqsoluciones.radio.ironmaxradio-2/lib/arm/libaacdecoder.so:
has text relocations

android {
compileSdkVersion 26
defaultConfig {
applicationId "com.cqsoluciones.radio.ironmaxradio"
minSdkVersion 15
targetSdkVersion 26
versionCode 20
versionName "2.0"

testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk+***@googlegroups.com.
To post to this group, send email to android-***@googlegroups.com.
Visit this group at https://groups.google.com/group/android-ndk.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-ndk/85aa2061-1625-4ca3-953f-1dbeed926fb4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
mic _
2018-08-09 20:14:05 UTC
Permalink
This change has been covered here:
https://android-developers.googleblog.com/2016/06/android-changes-for-ndk-developers.html

You'll most likely have to rebuild the problematic library with some
changes, see e.g.
https://github.com/tarigo/aacdecoder-android/commit/7e08f00ff5c745208454ccc0955e752dbc3aa225

On Thu, Aug 9, 2018 at 9:54 PM LocucionAR Productora de contenidos <
Post by LocucionAR Productora de contenidos
Hi, I have some issues with the new policy change, using API 26. I get an
error loading en aac decoder libary. With target 22 work fine, the problem
is with target 26.
has text relocations
android {
compileSdkVersion 26
defaultConfig {
applicationId "com.cqsoluciones.radio.ironmaxradio"
minSdkVersion 15
targetSdkVersion 26
versionCode 20
versionName "2.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
--
You received this message because you are subscribed to the Google Groups
"android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an
Visit this group at https://groups.google.com/group/android-ndk.
To view this discussion on the web visit
https://groups.google.com/d/msgid/android-ndk/85aa2061-1625-4ca3-953f-1dbeed926fb4%40googlegroups.com
<https://groups.google.com/d/msgid/android-ndk/85aa2061-1625-4ca3-953f-1dbeed926fb4%40googlegroups.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk+***@googlegroups.com.
To post to this group, send email to android-***@googlegroups.com.
Visit this group at https://groups.google.com/group/android-ndk.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-ndk/CAJwpw3b_Dxac%2Bxp1yhO7WyQ%3D-hUeog7yr7NgDQgY_dkg-fa33Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Andrew Esh
2018-08-10 14:52:14 UTC
Permalink
https://stackoverflow.com/questions/2603648/how-to-get-the-path-to-the-lib-folder-for-an-installed-package/16806802
--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk+***@googlegroups.com.
To post to this group, send email to android-***@googlegroups.com.
Visit this group at https://groups.google.com/group/android-ndk.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-ndk/ffe1a53a-1a2e-42b4-a26f-99b6ef3c1fd3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Andrew Esh
2018-08-10 14:51:54 UTC
Permalink
NDK libraries that you package with your app are now (as of Oreo 8.0.0, API
26) being installed on a file system path that has a random element. This
random path changes each time the app is installed. The random path is a
new security measure, and makes it very difficult for other apps to find
and make use of your libraries. Like you, I also make dlopen calls to load
NDK libraries (that I package) in an app I am developing. I had to add a
call to MyApp.getContext().getApplicationInfo().nativeLibraryDir; (on the
Java side of the JNI) to get the path with the random string in it. Use
that with dlopen, and your library will be found.

There may be a way to get this path directly in the NDK API. Since the app
I am working on make heavy use of the JNI in both directions, it was easier
to call the Java API to get it.

Your old dlopen method will probably work on Android 7 (API 24-25).

On Thursday, August 9, 2018 at 2:54:06 PM UTC-5, LocucionAR Productora de
Post by LocucionAR Productora de contenidos
Hi, I have some issues with the new policy change, using API 26. I get an
error loading en aac decoder libary. With target 22 work fine, the problem
is with target 26.
has text relocations
android {
compileSdkVersion 26
defaultConfig {
applicationId "com.cqsoluciones.radio.ironmaxradio"
minSdkVersion 15
targetSdkVersion 26
versionCode 20
versionName "2.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk+***@googlegroups.com.
To post to this group, send email to android-***@googlegroups.com.
Visit this group at https://groups.google.com/group/android-ndk.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-ndk/14ad8951-e939-4b72-aeda-8f078ce29da0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...