termux-boot
termux-boot copied to clipboard
Termux:Boot not working on Android Oreo
I have opened the Termux:Boot app several times.
Termux:Boot does not appear to be working under Android Oreo. My scripts are not executed at all. I use Ansible to deploy my configuration so I can be sure it is identical as Nougat. Although, I ended up removing all of my boot scripts since I discovered that termux-wake-lock does not work either under Android Oreo. Since my primary concern is having sshd running on startup I tried making that the only line in the only script. I tried just "sshd" and also just "sshd -D", neither worked. To ensure it wasn't a problem related to sshd I erased everything and just had a simple "echo test > ~/test" and that did not work either. Has anyone else run into this? Even without the wake lock it should run one line right? If I manually run sshd the daemon works fine and does not seem to exit even without the wake-lock.
The device is a OnePlus 3 running OOS 5.0 (Android 8.0.0).
same issue, pixel xl
same issue, Huawei p20 pro with Android 8. It can start sshd but not node-red.
@koalaeagle @sdrausty @silversquasher Did you disable the battery optimizations for Termux and Termux:Boot. Which one is/ are both required? (to inform other users about that/ show a permission request to disable the optimizations if possible)
Same here on Samsung A5 (2017) with LineageOS 16.0 20200309-microG-a5y17lte. Never worked
It's not working for me also Redmi Note 7 Pro
Did anyone find a solution? I have the same problem with a Honor 9 lite
Same here on Lava Iris
Solution add -D falg to sshd works great for me - Android 8.1 on LG/Nexus 5.x.
Here is complete check list.
- Disable Battery Optiomization for Termux and Termux.Boot.
Settings -> Apps & Notifications -> Adavanced -> Special app access -> Battery optiomization -> Not Optimized Should be listed
- Termux
- Termux.Boot If not, set "Do not optimize" for them. Other phones: may need to repeat this step with their policy/battery/security manager.
-
Check permissions on startup script , you should have rwx flags everywhere. (nexus:~)$ ls -ld ~/.termux ~/.termux/boot ~/.termux/boot/start.sh drwx------ 3 u0_a108 u0_a108 4096 Sep 19 22:19 /data/data/com.termux/files/home/.termux drwx------ 2 u0_a108 u0_a108 4096 Sep 19 23:08 /data/data/com.termux/files/home/.termux/boot -rwx------ 1 u0_a108 u0_a108 222 Sep 20 13:54 /data/data/com.termux/files/home/.termux/boot/start.sh (nexus:~)$ cat /data/data/com.termux/files/home/.termux/boot/start.sh
-
Add -D to sshd (last line) #!/data/data/com.termux/files/usr/bin/sh /data/data/com.termux/files/usr/bin/sshd -D
-
Run TermuxBoot app once, It needs to register boot receiver.
-
Reboot phone. It should start sshd after few minutes.
@ghost @sergey1369 Thanks.
Disabling battery optimization for Termux:Boot
solved problem for auto start of it on Xaiomi Redmi 4A
with Android 7
.
For Redmi 7A
with Android 10
Termux:Boot
works normally without disabling battery optimization for it.
Its not working for my Samsung Note 8