-
Notifications
You must be signed in to change notification settings - Fork 231
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not executing script at boot #5
Comments
Just to check - you've launched the Termux:Boot app once, right? After rebooting the device, can you check if the command |
Yes, I did launch Term:Boot. (More than once, actually; I presume that's not a problem.)
|
Same problem with a Nexus 9 running Android 7.1.1. |
I've modified my boot scripts, and I'm seeing different behavior. I'm testing using a Nexus 6 running Android 7.0, a Nexus 7 (2nd edition) running Android 6.0.1, and a Nexus 9 running Android 7.1.1. At the moment, I seem to be getting consistent behavior on all three. I've attached the four startup files I currently have in
Still nothing from |
@Keith-S-Thompson Hm, you can try running |
That seems to have done the trick. I was avoiding using Thanks. |
The problem is that the boot script exits. My solution is to keep the script running by not daemonizing:
Or something like:
|
I'm on an LG V30. This is what happened after I restarted my phone:
My And my I could not I'd like to lock in the $1.99, but it's not working for me. How can I help to troubleshoot this? |
Oh! the sheer effort to type 4 chars at boot... :-) Issue replicated on Android 7.1.1 on Chromebook x86-64 $ logcat -s termux:* $ cat ~/.termux/boot/start_tmux |
I am having the same issue on a Samsung A5, running a sshd start script as well as another. I can run the scripts using Termux:Widget or manually just fine. |
It looks like the forked daemon processes get killed asyncronously a few seconds after the start script exited:
Even if I start a new session and a new process group using
It looks like the problem is that the process-group is considered as empty and thus is a candidate to get killed: https://stackoverflow.com/questions/33335246/process-being-killed-on-marshmallow-but-not-on-lollipop Starting the same script with Tasker and the Termux::Task plugin triggered by a Device Boot event works fine though. Btw.: I had to additionally whitelist Termux from Android's standard doze mode on my Samsung Galaxy S7. |
Not working for me either on asus zenfone 2
|
I'm having the same issue on a Doogee T5 Android 6. wake-lock starts most boots, crond starts most boots, sshd never starts. |
sshd still not running at startup. autossh running OK (for a reverse tunnel) but as ssh not starting, no connection. |
crond now not starting either. |
Anyone alive? |
💀 |
Hi, I have same issue too. First and most important, Second, Third, After all, I end up with |
Thanks cs8425, |
Must admit, I'd have thought that the developers would have been all over this! They have shown no interest whatsoever! Won't be doing any more donations. |
I'm also having problems trying to get this to run at boot I've tried everything including the sshd example with termux-wake-lock but it seems to just hang on the beginning main part. also I installed both apps from FDroid |
while I have been unable to get the app to work I currently have a work around which is to write my commands in the ~/.bashrc file so the commands run whenever the app is started with root it is possible to just have a init script start the app at boot or without root there maybe another app to start termux at boot and run these commands |
my miui9 android6, works after adding the termux:boot to Autostart permission. |
|
idk if it can help someone but just saying i had the same problem testing in a zenfone phone, googled it and found out that zenfone blocks some apps to start when the phone boot, to allow termux to execute the scripts you need to give it permission to be executed at boot: |
根本没有启动 |
I'm on LineageOS 15.1, Oreo, XiaoMi MI5s
|
You guys looking for this?
I also have it starting a script called xTeVe in a "detached" screen, but you get the general idea..... |
This is the answer that works. I'm on a Samsung S8. Go into the Apps->Termux:Boot->Inactivate Optimizations |
None of this works for me. No idea whats going on |
That works on my old phone(Samsung J7008). Thank you! |
@uudruid74 I'm running Stock Android 9 and not a single thing worked 100% for me. I read somewhere about "DuraSpeed", and that is my case. Once I included termux and friends in this list (and everything this post suggest), I finally got my termux working for, now, 4h (my max was 20 minutes) ... let's see tomorrow. Maybe it is your case? |
What DuraSpeed list? Can you detail how you got it working? ...still does not work for me. Thanks!
|
My current It logs the output of the It's possible that I've sometimes thought that the startup script didn't run at all, when in fact it just hadn't run yet. As far as I can tell, it's now at least reasonably reliable. |
Clarified: I came here because of
|
This is what worked for me on an Android 7.0 device: ~ $ cat .termux/boot/1
#!/bin/sh
OUT=/data/data/com.termux/files/home/boot-test.txt
termux-wake-lock
echo "$(date +%c): Boot script starting" >> $OUT
HOMEDIR=~/
echo "Home: $HOMEDIR" >> $OUT
echo "Starting service daemon" >> $OUT
export SVDIR=$PREFIX/var/service
export LOGDIR=$PREFIX/var/log
service-daemon start >>$OUT 2>&1 I have a few services like It was only after updating my post boot script like so, that I was able to ssh into the device after reboot without any physical interactions with the actual device |
Hi All,
I am running Android 9 Can someone please help ! |
There's a good chance I've missed something obvious, but Termux:Boot isn't working for me.
I've installed Termux:Boot on my Nexus 6 running Android 7.0, and I've launched the app.
(The documentation doesn't say the script needs to be executable or have a
#!
line, but I figured it wouldn't hurt.)The script doesn't execute when I reboot the phone.
sshd
isn't running, and nothing is written to$HOME/.log
.The text was updated successfully, but these errors were encountered: