Is it possible to change this setting using termux?
Asked
Active
Viewed 552 times
1

Firelord
- 25,084
- 20
- 124
- 286

Cyber Avater
- 111
- 5
1 Answers
0
I initially asked this question to figure out a bug-fix for an open-source app but it turns out it's in AOSP (see here if you're interested to learn it, https://github.com/MuntashirAkon/AppManager/issues/388)
Now, for Users who want to apply this setting to a batch of apps the best and easy method would be to use this app, https://github.com/MuntashirAkon/AppManager
From AM's prevent background operation option available in the batch operations.
There are should be many alternative apps such as https://github.com/mirfatif/PermissionManagerX and App Ops which you can try and see what it offers.
This answer didn't cover how you can do it using CLI but you can check the comment by Irfan Latif if that's any help.

Cyber Avater
- 111
- 5
appops set <package> RUN_ANY_IN_BACKGROUND ignore; appops set <package> RUN_IN_BACKGROUND ignore
. See Disable autostart on boot and restrict background execution. For more detailed and fine-grained control of AppOps you may check my open source app PMX. – Irfan Latif Apr 22 '21 at 12:42