-->

Getting the .so files list using packagemanager

2019-09-11 12:40发布

问题:

Is there way to get libs/nativearch/<.so files> listed from the package-manager. Considering that apps like apk-info do it, I guess there should be a way to get the supported architecture of the package as well the listed .so files inside each folder. Any idea on this?

回答1:

PackageManager won't tell you this directly.

However it will tell you the filename of the app's APK file (via ApplicationInfo.sourceDir), and you can then use ZipFile to iterate through all the files in the apk, to get a list of the files in the libs directory tree.

See also How to get the file *.apk location in Android device