Skip to content

Instantly share code, notes, and snippets.

@ashbeats
Last active March 6, 2026 06:10
Show Gist options
  • Select an option

  • Save ashbeats/5bed4ca28ae4ece92bf77e1dc41e48fd to your computer and use it in GitHub Desktop.

Select an option

Save ashbeats/5bed4ca28ae4ece92bf77e1dc41e48fd to your computer and use it in GitHub Desktop.

Android Install Location Settings

  • Non-Rooted Phone
  • ADB

Instead of using adb shell pm set-install-location which would fail with

Security exception: Package android does not belong to 2000

java.lang.SecurityException: Package android does not belong to 2000
        at android.app.AppOpsManager.checkPackage(AppOpsManager.java:5288) ...

use

 adb shell settings put global default_install_location 2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment