0

I am working on a custom rom for the Unihertz Titan and have come across an issue with the FM Radio application. It requires a library "libfmjni.so" to run. Originally, this shared library is found at /product/lib and /product/lib64.

I exported the APK from my stock rom and even though the library is there, in the place it is supposed to be, i am unable to load it, from anywhere except /system_ext/lib64. When it loads, i am given the message:

2023-02-22 17:16:47.835 8185-8185/com.android.fmradio E/linker: library "/system/system_ext/lib64/libfmjni.so" ("/system/system_ext/lib64/libfmjni.so") needed or dlopened by "/apex/com.android.art/lib64/libnativeloader.so" is not accessible for the namespace: [name="classloader-namespace", ld_library_paths="", default_library_paths="", permitted_paths="/data:/mnt/expand:/data/user/0/com.android.fmradio"] 2023-02-22 17:16:47.836 8185-8185/com.android.fmradio D/AndroidRuntime: Shutting down VM 2023-02-22 17:16:47.837 8185-8185/com.android.fmradio E/AndroidRuntime: FATAL EXCEPTION: main Process: com.android.fmradio, PID: 8185 java.lang.UnsatisfiedLinkError: dlopen failed: library "/system/system_ext/lib64/libfmjni.so" needed or dlopened by "/apex/com.android.art/lib64/libnativeloader.so" is not accessible for the namespace "classloader-namespace" at java.lang.Runtime.loadLibrary0(Runtime.java:1077) at java.lang.Runtime.loadLibrary0(Runtime.java:998) at java.lang.System.loadLibrary(System.java:1661) at com.android.fmradio.FmNative.<clinit>(FmNative.java:24) at com.android.fmradio.FmService.openDevice(FmService.java:750) at com.android.fmradio.FmService.onCreate(FmService.java:1625) at android.app.ActivityThread.handleCreateService(ActivityThread.java:4485) at android.app.ActivityThread.-$$Nest$mhandleCreateService(Unknown Source:0) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2161) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loopOnce(Looper.java:201) at android.os.Looper.loop(Looper.java:288) at android.app.ActivityThread.main(ActivityThread.java:7872) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936) 2023-02-22 17:16:47.843 1393-1413/system_process I/ActivityManager: Showing crash dialog for package com.android.fmradio u0 2023-02-22 17:16:47.844 8185-8205/com.android.fmradio D/FmService: isBluetoothHeadsetInUse false 2023-02-22 17:16:47.844 8185-8205/com.android.fmradio D/FmService: onAudioPatchListUpdate, not power up2 2023-02-22 17:16:47.872 1393-1413/system_process D/CoreBackPreview: Window{cc8f5c5 u0 Application Error: com.android.fmradio}: Setting back callback OnBackInvokedCallbackInfo{mCallback=android.window.WindowOnBackInvokedDispatcher$OnBackInvokedCallbackWrapper@f120ed4, mPriority=0}

I have tried placing the library at /data/,/mnt/expand/, /data/user/0/com.android.fmradio/,/data/user/0/com.android.fmradio/lib//data/user/0/com.android.fmradio/libs/,/data/user/0/com.android.fmradio/lib64/,/data/user/0/com.android.fmradio/arm64-v8a/, /data/user/0/com.android.fmradio/lib/arm64v-8a, /data/user/0/com.android.fmradio/libs/arm64v-8a

Nothing. The only place that reacts to the shared library is /system_ext/lib64 and it cannot load the shared library because it is not in the permitted paths.

I have tried pushing both arm64 and arm versions to these locations.

Jonas
  • 121,568
  • 97
  • 310
  • 388

0 Answers0