Getting the .so files list using packagemanager

2019-09-11 13:03发布

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条回答
倾城 Initia
2楼-- · 2019-09-11 13:36

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

查看更多
登录 后发表回答