Is there any way to scan .apk files of other apps from my own app without root access? There should be because there are apps like APK Extractor that offer you to get .apk of any installed application. Best thing is, APK Extractor doesn't require root access.
I tried doing this by using ProcessBuilder
and calling command pm list packages
to get installed packages, then I'd run pm path com.package.name
to get path of each .apk. I get valid paths but when I try to open it using File apkFile = new File(apkPath);
I get
java.io.FileNotFoundException: /data/app/some.app.package/base.apk
open failed: ENOENT (No such file or directory)
which basically means I don't have right permissions to read that file.