After installing a flutter application, the base.apk and FFI .so files (example: are located in a directory with a seemingly random name, which appears to be randomized upon each install. This directory may be referred to sometimes as nativeLibraryDir.

For example, it looks similar to:

/data/app/~~jsoifn2hofsdsohg2new==/com.example.flutter_app-Ajosdfomw_cbxomwowmeof==/lib/${arch}/ /data/app/~~jsoifn2hofsdsohg2new==/com.example.flutter_app-Ajosdfomw_cbxomwowmeof==/base.apk

I need my application to be able to determine this location (and return it as a string), but I cannot find a mechanism to determine it. Flutter itself must have a mechanism, since"") is able to determine it for FFI purposes, but I cannot find a user-exposed method to determine it and return it as a string.

I tried getLibraryLocation from PathProvider, but apparently that is not what it is intended to return.