I have a custom android 13 tablet, in Settings > System is an option named 'Background Manage'.
It lists some of the installed apps and each app has a toggle switch to enable or disable this option.
If this option is disabled (the default) then one of my app's services either:
I want to use an adb or similar command to enable this option, so I can use a script to setup my app on many of these custom tablets.
The script has been working for a long while on previous versions of android, I'm modifying it to work with android 13 and it currently looks like:
I've been searching for days, trying to find a script command to enable this option but had no success.
Does anyone recognise 'Background Manage' and know which android API setting or permission it enables?

It lists some of the installed apps and each app has a toggle switch to enable or disable this option.
If this option is disabled (the default) then one of my app's services either:
- Fails to auto start at boot
- or
- Auto starts at boot but quickly gets killed by the system
I want to use an adb or similar command to enable this option, so I can use a script to setup my app on many of these custom tablets.
The script has been working for a long while on previous versions of android, I'm modifying it to work with android 13 and it currently looks like:
adb install my-package-name.apk
adb root
adb shell pm grant <my-package-name> android.permission.ACCESS_COARSE_LOCATION
adb shell pm grant <my-package-name> android.permission.POST_NOTIFICATIONS
adb shell pm grant <my-package-name> android.permission.READ_EXTERNAL_STORAGE
adb shell pm grant <my-package-name> android.permission.READ_PHONE_STATE
adb shell pm grant <my-package-name> android.permission.SYSTEM_ALERT_WINDOW
adb shell pm grant <my-package-name> android.permission.WRITE_EXTERNAL_STORAGE
adb shell pm grant <my-package-name> android.permission.WRITE_SECURE_SETTINGS
adb shell cmd appops set <my-package-name> RUN_ANY_IN_BACKGROUND allow
adb shell cmd appops set <my-package-name> RUN_IN_BACKGROUND allow
adb shell cmd appops set <my-package-name> WRITE_SETTINGS allow
adb shell dumpsys deviceidle whitelist +<my-package-name>
adb shell am start -n <my-package-name>/.main
I've been searching for days, trying to find a script command to enable this option but had no success.
Does anyone recognise 'Background Manage' and know which android API setting or permission it enables?
