Experimental Android automation using Termux, Termux:API, Termux:GUI and Termux:Boot. There is no setup installer; configure and test each feature on your device.
Install the four Android apps from compatible sources. In Termux:
pkg update
pkg install bash coreutils jq python util-linux termux-api termux-gui-bashGrant each add-on its required permissions. Termux:GUI needs display-over-other-apps permission. Screen brightness control needs Android Modify system settings access. Background reliability depends on Android battery management. Open Termux:Boot once before using it.
Clone to ~/automation: some GUI scripts currently contain this absolute location. Edit the files in config/ before starting services. Sensor names and thresholds are device-specific.
Create the private emergency configuration:
cp config/emergency.conf.example config/emergency.conf
chmod 600 config/emergency.confIt starts with no recipients. Real contacts belong only in the ignored local file. Never publish phone numbers or SMS logs. Emergency actions can send real SMS once configured; do not trigger them casually.
bash bin/assistive-menu.sh
bash bin/food-monitor.sh
bash bin/light-monitor.sh
bash bin/dopamine-monitor.sh
bash bin/music-control.sh- Assistive menu: floating icon, expandable actions, Collapse and Stop controls. Screen coordinates are currently tuned for the development phone.
- Food: battery/charging state reminders; charging takes priority, and completion is announced once per charging session.
- Light: ambient sensor triggers torch, maximum configured brightness and a white WebView screen; light returning removes it. Current thresholds are 80/100 lux with a five-second dark delay. Calibrate them for your phone. Cleanup restores configured brightness, not necessarily the brightness before startup.
- Dopamine: normal, delayed or scheduled break reminders.
DOPAMINE_ENABLED=1currently enables it. Android may restrict foreground requests; it is not a guaranteed kiosk/app blocker. - Music: proximity gestures request next, previous or play/pause from the active media player, with toast feedback. Direct
cmd media_session dispatchaccess and sensor behavior are device-dependent. Start music first; actual player response requires a physical test. - Horror: local alert effects. Inspect
bin/horror-studio.shbefore triggering sound/light effects. - Emergency: optional SMS plus local alerts and cooldown. Do not rely on this experimental project as your only emergency system.
The SOS implementation accepts a long-click and also accumulates ordinary clicks over time. Do not assume a guaranteed continuous two-second hold or configure live recipients until you have reviewed and safely tested its trigger behavior.
Review boot/start-automation first: it launches food, light, emergency overlay, and dopamine when enabled. It does not automatically launch every feature.
mkdir -p ~/.termux/boot
ln -sf ~/automation/boot/start-automation ~/.termux/boot/start-automationKeep scripts executable. Launch only one instance of each monitor. Use Ctrl+C for foreground services, the menu Stop action for its GUI, or the music stop command:
bash bin/music-control.sh stop-gesturebash bin/diagnose.sh
bash bin/food-monitor.sh --self-test
python bin/music-gesture.py --self-testThese checks do not intentionally send SMS or trigger playback. Syntax/logic tests do not establish visual correctness or hardware/player response.
Logs and PID/lock state are local and ignored by Git. If a process is interrupted abnormally, inspect its PID and process ownership before removing locks; do not delete active lock files blindly.
Android versions, permissions, GUI binding versions, sensors and screen dimensions vary. Validate visual overlays, terminal shutdown, boot behavior and media gestures on the target device. No universal full-screen lockout or guaranteed emergency delivery is claimed.