I'm trying to delete some native libraries from my application because I don't use them anymore, but after I install the apk in my phone I can see that the native libraries are still there. As I've seen, android does copy/update native libraries correctly just by replacing the file in my libs/ directory, but apparently it doesn't delete them when they're not in the apk anymore. How do I know the libraries are still there? Well first of all the application's size remains the same and I'm deleting some really big libraries, and second, if I leave the System.load(...) statement the app is still able to load the library.
The only solution that I've found for this has been to uninstall the app and make a fresh install, but that's not an obvious solution for a user updating the app from google play, and yes this problem affects severely my app functionality.
I've checked and apparently I can delete the files by my self, say during a service creation, but I don't want to mess with the installation this way.
Do you know if there's a way to tell Android that it needs to delete all the native libraries and copy them again?
Thanks, Mike
[EDIT]
I've just found that GB updates the libraries correctly, it deletes the now-missing as it should, but neither ICS nor JB do, those two leave the old .so files even when they're not in the apk anymore.
I tried deleting the .so files manually from /data/data/mypackage/lib but it won't let me.
Any ideas?