3

I have been trying to figure out a command using ADB command line to change the advanced settings of an application I am installing through ADB.

Once installed I wish to change the following settings to 'allow' by using an ADB command:

enter image description here

Is this possible?

I thought it might be: found here
adb shell pm grant com.mycompany.mypackage INSTALL_NON_MARKET_APPS 1

SteenPetersen
  • 188
  • 2
  • 17

2 Answers2

1

The command for the Install unknown apps would be:

adb shell pm grant com.company.testapp  android.permission.REQUEST_INSTALL_PACKAGES

Which will fail, because android.permission.REQUEST_INSTALL_PACKAGES is not a changeable permission type:

Operation not allowed: java.lang.SecurityException: Permission android.permission.REQUEST_INSTALL_PACKAGES is not a changeable permission type

Maybe there is a way around this, that I don't know of.

SysHex
  • 1,750
  • 2
  • 17
  • 27
0

You can try:

appops set com.mycompany.mypackage REQUEST_INSTALL_PACKAGES allow

It works for my device with Android 10.

Koxxu251
  • 1
  • 1