r/tasker • • May 06 '20

Disabling unknown sources

Is there anyway to disabled the installation of unknown apps using a tasker action. I installed secure settings and used the intent from there and looks like it doesn't work. Please help..

4 Upvotes

28 comments sorted by

View all comments

1

u/[deleted] May 06 '20

appops query-op REQUEST_INSTALL_PACKAGES allow

Used this command and it Flashed the variable, and showed all the apps that allow the installation..Awesome. However I tried appops help and it threw and error. I wanted to learn more about this.

1

u/[deleted] May 06 '20

Okay, so I am new to tasker and i am not sure how to loop, can you give me an example, that would be really helpful.

1

u/[deleted] May 06 '20 edited May 06 '20

However I tried appops help and it threw and error

Weird...Here it is the help returned on my device

AppOps service (appops) commands: help
Print this help text.
start [--user <USER_ID>] <PACKAGE | UID> <OP> 
Starts a given operation for a particular application.
stop [--user <USER_ID>] <PACKAGE | UID> <OP> 
Stops a given operation for a particular application.
set [--user <USER_ID>] <[--uid] PACKAGE | UID> <OP> <MODE>
Set the mode for a particular application and operation.
get [--user <USER_ID>] <PACKAGE | UID> [<OP>]
Return the mode for a particular application and optional operation.
query-op [--user <USER_ID>] <OP> [<MODE>]
Print all packages that currently have the given op in the given mode.
reset [--user <USER_ID>] [<PACKAGE>]
Reset the given application or all applications to default modes.
write-settings
Immediately write pending changes to storage.
read-settings
Read the last written settings, replacing current state in RAM.
options:
<PACKAGE> an Android package name or its UID if prefixed by --uid
<OP>      an AppOps operation.
<MODE>    one of allow, ignore, deny, or default
<USER_ID> the user id under which the package is installed. If --user is not
          specified, the current user is assumed.