Skip to content

Instantly share code, notes, and snippets.

@aldosch
Created July 18, 2023 03:48
Show Gist options
  • Save aldosch/32495b07e301c3efcad136b2b7d604ba to your computer and use it in GitHub Desktop.
Save aldosch/32495b07e301c3efcad136b2b7d604ba to your computer and use it in GitHub Desktop.
Change android appops with adb
  • Enable developer mode on android by tapping build number repeatedly
  • Connect to computer via usb
  • Ensure that adb is installed adb --version
  • adb devices to see devices, may need to auth on phone
  • adb shell to get shell
  • pm list packages to list packages
  • pm list packages -3 | cut -f 2 -d ":" to list user installed packages
  • pm list permissions to list all permissions available system-wide
  • appops get <PackageName> to list permissions for a specific app
  • appops set <PackageName> <PermissionName> ignore to ignore a permission for a specific app
  • appops set <PackageName> <PermissionName> allow to allow a permission for a specific app
  • you can run shell commands without entering the shell by prepending with adb shell
    • Allows for command | pbcopy to pipe output to clipboard
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment