Hi Jeff, According the to official documentation the pm permissions command is only for listing all known permissions [1] or optionally all the permissions in a given logical group. But if you want to list the permissions granted to a specific application the most accurate way to do this would be to consult the/data/system/packages.xmlon your android device or on an emulator running the application---you may or may not know that---it lists the permissions, public keys and of all the applications installed on a device.To make this simpler you may want to grep or search for the applications name in the file, for example:
the simplest way would be to do this on an emulated or "android virtual device", it avoids the need to root the device, anyway here's what you could try doing: bash$adb pull /data/system/packages.xml bash$cat packages.xml | grep -n "package\ name=\"[package name]" (hopefully I'm escaping my quotes properly here) or you can search for all the permission names associated to your application if they are unique enough, for instance with a certain prefix, bash$cat packages.xml | grep "name=\"my.package.name.SOME_PERMISSION" Point being, give the /data/system/packages.xml a look ;) References: [1] http://developer.android.com/tools/help/adb.html Regards On Sunday, August 4, 2013 12:31:57 PM UTC+2, Jeffrey Walton wrote: > > Hi All, > > I'm trying to list the permissions granted to an app over adb. I can > get all the permissions on a system with: > > $ adb shell pm list permissions > > However, when I try to restrict it to an app, the restriction appears > to be ignored: > > $ adb shell pm list permissions com.android.keychain > All Permissions: > > permission:com.htc.home.personalize.permission.WRITE_SCENES > permission:android.permission.INTERNAL_SYSTEM_WINDOW > permission:com.swype.android.inputmethod.PRIVATE_COMMANDS > ... > > https://developer.android.com/guide/topics/security/permissions.html > does not appear to offer any commands. > > How does one list app permissions with adb shell? > > Jeff > -- You received this message because you are subscribed to the Google Groups "Android Security Discussions" group. To unsubscribe from this group and stop receiving emails from it, send an email to android-security-discuss+unsubscr...@googlegroups.com. To post to this group, send email to android-security-discuss@googlegroups.com. Visit this group at http://groups.google.com/group/android-security-discuss. For more options, visit https://groups.google.com/groups/opt_out.