Skip to content

[clr,native] Shared libraries are loaded via filesystem API instead of directly from APK #10383

@grendello

Description

@grendello

Android framework version

net10.0-android (Preview)

Affected platform version

any

Description

Even though the shared libraries aren't unpacked to filesystem and, thus, should be loaded directly from the APK, I see this happening:

08-07 10:02:20.071 11549 11549 D monodroid-assembly: Checking if libmonodroid was unpacked to /data/app/~~cBNnxHZFEzs_6CyJHxrQuw==/com.xamarin.XAPerfTest.net10-Hg2eUwaszQoUbjaTmH7iJg==/lib/arm64/libmonodroid.so
08-07 10:02:20.071 11549 11549 D monodroid-assembly: /data/app/~~cBNnxHZFEzs_6CyJHxrQuw==/com.xamarin.XAPerfTest.net10-Hg2eUwaszQoUbjaTmH7iJg==/lib/arm64/libmonodroid.so not found, assuming application/android:extractNativeLibs == false
08-07 10:02:20.105 11549 11549 D monodroid-assembly: Modified p/invoke library name to 'libSystem.Native.so'
08-07 10:02:20.105 11549 11549 D monodroid-assembly: monodroid_dlopen: hash for name 'libSystem.Native.so' is a337ccc8aef94267
08-07 10:02:20.105 11549 11549 D monodroid-assembly: Looking for hash a337ccc8aef94267 in DSO cache
08-07 10:02:20.105 11549 11549 D monodroid-assembly: monodroid_dlopen: hash match found, DSO name is 'libSystem.Native.so'
08-07 10:02:20.105 11549 11549 I monodroid-assembly: Trying to load shared library '/data/app/~~cBNnxHZFEzs_6CyJHxrQuw==/com.xamarin.XAPerfTest.net10-Hg2eUwaszQoUbjaTmH7iJg==/split_config.arm64_v8a.apk!/lib/arm64-v8a/libSystem.Native.so'

The APK scanning code needs to record .so offset in the archive, to load the library using APK FD and the detected offset.

Steps to Reproduce

n/a

Did you find any workaround?

No response

Relevant log output

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions