SteenPetersen
SteenPetersen

Reputation: 308

Is there an ADB command to change the advanced settings of an installed application?

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

Upvotes: 3

Views: 2746

Answers (2)

Koxxu251
Koxxu251

Reputation: 1

You can try:

appops set com.mycompany.mypackage REQUEST_INSTALL_PACKAGES allow

It works for my device with Android 10.

Upvotes: 0

SysHex
SysHex

Reputation: 1801

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.

Upvotes: 1

Related Questions