Problem
We run AutoJs6 as an unattended watchdog on a small device fleet (Termux + Shizuku + wireless ADB). First-time setup must enable several drawer toggles and permissions without human taps:
- Accessibility service
- Foreground service (background stability)
- Shizuku access
- Post notifications, storage, battery-unrestricted, display-over-other-apps
- Off: floating button, pointer location, client/server mode, keep-screen-on-in-foreground
Today we automate this with Mac-side UI automation (uiautomator + drawer scrolling). That is fragile (OEM Settings flows, scroll position, localization) and slow.
What we tried
adb shell settings put secure enabled_accessibility_services — works for system accessibility (append-only), but does not set in-app drawer prefs.
- Reading/writing
SharedPreferences — release APK is not debuggable; adb shell uid 2000 gets Permission denied on /data/data/org.autojs.autojs6/.
- Shizuku shell — same data-dir restriction for normal installs.
- In-app
storages module — script-local only; does not configure app drawer/settings.
Preference keys exist in strings.xml (e.g. key_$_foreground_service, key_$_floating_menu_shown, key_$_enable_a11y_service_with_secure_settings) but there is no documented, supported way to set them outside the UI.
Request
Please consider one or more of:
- Document default SharedPreferences file name + keys for drawer toggles (and whether
adb/run-as / Shizuku is expected to work on release builds).
Intent or ContentProvider to apply a named profile, e.g. org.autojs.autojs6.APPLY_FLEET_PROFILE with extras or a JSON file path on shared storage.
- Export/import settings (XML/JSON) like other Android apps.
- Optional install-time defaults via intent extra on first launch (e.g. foreground service ON for automation-only deployments).
- Read-only query API so external tooling can verify state without UI scraping.
Our use case
- Open-source fleet orchestration: stayturgid (AutoJs6 secondary layer; Termux-primary repair; Overall orchistration primarly via ansible, and trying to get as near to being a 100% ansible project as possible).
- Devices: Pixel / Samsung, Android 14–16, Obtainium-installed release APK (v6.7.x arm64).
- We already use Shizuku API from scripts; a Shizuku-guarded preference writer would be acceptable.
Workaround today
UI automation in enable_autojs6_shizuku.py + shared/autojs6_drawer_defaults.json. Happy to contribute docs or a reference profile JSON if an official schema exists.
Problem
We run AutoJs6 as an unattended watchdog on a small device fleet (Termux + Shizuku + wireless ADB). First-time setup must enable several drawer toggles and permissions without human taps:
Today we automate this with Mac-side UI automation (
uiautomator+ drawer scrolling). That is fragile (OEM Settings flows, scroll position, localization) and slow.What we tried
adb shell settings put secure enabled_accessibility_services— works for system accessibility (append-only), but does not set in-app drawer prefs.SharedPreferences— release APK is not debuggable;adb shelluid 2000 getsPermission deniedon/data/data/org.autojs.autojs6/.storagesmodule — script-local only; does not configure app drawer/settings.Preference keys exist in
strings.xml(e.g.key_$_foreground_service,key_$_floating_menu_shown,key_$_enable_a11y_service_with_secure_settings) but there is no documented, supported way to set them outside the UI.Request
Please consider one or more of:
adb/run-as/ Shizuku is expected to work on release builds).IntentorContentProviderto apply a named profile, e.g.org.autojs.autojs6.APPLY_FLEET_PROFILEwith extras or a JSON file path on shared storage.Our use case
Workaround today
UI automation in
enable_autojs6_shizuku.py+shared/autojs6_drawer_defaults.json. Happy to contribute docs or a reference profile JSON if an official schema exists.