How to get access rights for any installed Android application

Can I get manifest permissions for any installed Android application?

+4
source share
3 answers

Thanks for the help, launched it with:

final Intent mainIntent = new Intent(Intent.ACTION_MAIN, null); mainIntent.addCategory(Intent.CATEGORY_LAUNCHER); final List pkgAppsList = getPackageManager().queryIntentActivities(mainIntent, 0); for (Object obj : pkgAppsList) { ResolveInfo resolveInfo = (ResolveInfo) obj; PackageInfo packageInfo = null; try { packageInfo = getPackageManager().getPackageInfo(resolveInfo.activityInfo.packageName, PackageManager.GET_PERMISSIONS); } catch (NameNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace(); } String[] requestedPermissions = packageInfo.requestedPermissions; } 
+14
source

Get installed packages using this.

 final Intent mainIntent = new Intent(Intent.ACTION_MAIN, null); mainIntent.addCategory(Intent.CATEGORY_LAUNCHER); final List pkgAppsList = context.getPackageManager().queryIntentActivities( mainIntent, 0); 

And use the package name to get the information.

http://developer.android.com/reference/android/content/pm/PackageInfo.html

+2
source

If you have an apk file, it is very simple to open cmd from the start menu and write this command line: aapt d permissions D: \ dina \ app-debug.apk

take care of what you write, then you can get a list of all permissions in this application and the package name is also like this

package: com.example.dinasaif.facebookintegration uses-resolution: android.permission.INTERNET

0
source

All Articles