libretro / libretro-uae

PUAE libretro
GNU General Public License v2.0
114 stars 61 forks source link

IPF capsimg.so and Android library paths #558

Closed NgrNxk closed 1 year ago

NgrNxk commented 1 year ago

Hi!

I recently found a capsimg.so for my armeabi-v7a which I wanted to use on my FireCube. Due to the internal storage constraints in this system, I have moved RetroArch to the expandable storage of my USB drive -- and set some of the RetroArch directories to point to Internal Storage; which is the only storage I and RetroArch can write to.

The docs state to put the capsimg.so into the system directory, which is /storage/emulated/0/RetroArch/system/ in my case; but my RetroArch is in /mnt/expand/1c68795e-af0b-4a94-bb23-23826bedff0e/app/com.retroarch.ra32. The error I'm getting is

E linker : library "/storage/emulated/0/RetroArch/system/capsimg.so" ("/storage/emulated/0/RetroArch/system/capsimg.so") needed or dlopened by "/mnt/expand/1c68795e-af0b-4a94-bb23-23826bedff0e/user/0/com.retroarch.ra32/cores/puae2021_libretro_android.so" is not accessible for the namespace: [name="classloader-namespace", ld_library_paths="", default_library_paths="/mnt/expand/1c68795e-af0b-4a94-bb23-23826bedff0e/app/com.retroarch.ra32--Ilh9ZgLKRvIVv4YIrbYxg==/lib/arm:/mnt/expand/1c68795e-af0b-4a94-bb23-23826bedff0e/app/com.retroarch.ra32--Ilh9ZgLKRvIVv4YIrbYxg==/base.apk!/lib/armeabi-v7a", permitted_paths="/data:/mnt/expand:/mnt/expand/1c68795e-af0b-4a94-bb23-23826bedff0e/user/0/com.retroarch.ra32"]

As you can see the permitted paths do not contain /storage/emulated/0/RetroArch/system/. Would it be possible to add this path to the permitted_paths for Android builds?

If there were a file manager inside RetroArch, I could move the file somewhere into /mnt/expand/1c68795e-af0b-4a94-bb23-23826bedff0e/ myself -- all other apps do not have write or read access to this directory.

sonninnos commented 1 year ago

Docs state:

IPF support is done through CAPSIMG library. To enable it you have to put the dynamic library called capsimg.dll (Windows) or capsimg.so (Linux, macOS) in RetroArch system or executable directory.

Android has to use the executable directory (previously only available method), since it can't load dynamic libraries from elsewhere. AFAIK this can't be changed. The core used to search only executable directory, but now only when it is not found in the system directory.

sonninnos commented 1 year ago

I'll close this since the core can't do anything about that limitation.