Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get manifest permissions of any installed Android app

Is it possible to get the manifest permissions of any installed Android application?

like image 867
kopi_b Avatar asked Dec 08 '10 11:12

kopi_b


People also ask

How do I find an app manifest?

Right click your project file on the Solution Explorer, select Add , then New item (or CTRL+SHIFT+A). There you can find Application Manifest File . The file name is app. manifest.

How do I find the manifest file on my Android?

Every project in Android includes a Manifest XML file, which is AndroidManifest. xml, located in the root directory of its project hierarchy. The manifest file is an important part of our app because it defines the structure and metadata of our application, its components, and its requirements.

How do I get permission off Android manifest file?

The simple way to remove this type of permission, is by deleting its xml code line from the original Android Manifest file in android/app/src/main .


1 Answers

Thanks for the hint,got it running 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;
}
like image 157
kopi_b Avatar answered Sep 28 '22 05:09

kopi_b