I created a custom system image and put an additional APK into system/app. This kinda works, I can run the app, however native libraries are not getting loaded (loadLibrary() fails). When I call pm install
on the APK, everything works fine and the native library loads.
My conclusion is that the APK is not getting installed properly. I would appreciate any background on the behavior I observe. Is this the way it should be or am I missing something? At what time would the package manager install the APKs in app (or priv-app). Is there some sort of device setup that runs at some point?