I have two different Android Apps which both contain the same .so file. Could the global variables inside those .so files be shared across the two Apps or are they guaranteed to be isolated from each other.
I know that Android builds the isolation between Apps on top of Linux processes and Unix permissions among other things and from this answer I would deduce that on Linux those variable would be shared if two processes load the same .so file. However I guess it might depend on form where the .so file gets loaded and how the runtime maps the .so file to memory.
How does all of this fit together in Android? More specifically how can I guarantee isolation if I build an AAR which contians an .so file and the AAR might be used in different Apps that could run at the same time?