termux / termux-boot

Termux add-on app allowing programs to be run at boot.
https://f-droid.org/en/packages/com.termux.boot
931 stars 219 forks source link

Delays in termux:boot script execution #52

Closed riclin-au closed 3 years ago

riclin-au commented 3 years ago

Termux v0.99 with termux:boot etc Linux localhost 4.9.113 #1 SMP PREEMPT Mon Aug 17 19:34:10 CST 2020 armv7l Android Droidlogic X96Max_Plus2 S905X3 4G+64G Android 9.0

Issue: delays in the execution of boot scripts - typically a minute or longer. After the delay, all scripts execute normally. The scripts execute immediately if called via .bashrc or as termux-services, but this introduces other problems. I would prefer to run the scripts at boot only. Have resolved using a ~/../usr/etc/profile/d script to test for first boot then conditionally execute boot scripts, but have not sorted termux:boot.

termux:boot is correctly installed and scripts in correct location.

Similar delays with old release: Linux localhost 3.14.29 #1 SMP PREEMPT Thu Jan 5 12:02:30 CST 2017 armv8l Android Amlogic TX8 S905 2G+32G Android 6.0.1

A bug or a feature?

TIA.

ghost commented 3 years ago

Scripts are being executed as soon as Termux:Boot received the intent sent by Android OS. This typically happens when the OS is fully booted and ready to run user apps. Delays may differ between devices or ROMs.