Problem description
The commands in ~/.termux/boot are not executed. This is the logcat output:
user@terminal:~$ adb logcat --pid=3535
--------- beginning of main
03-23 13:58:45.078 3535 3535 E com.termux.boo: Not starting debugger since process cannot load the jdwp agent.
03-23 13:58:45.143 3535 3535 D ApplicationLoaders: Returning zygote-cached class loader: /system/framework/android.test.base.jar
03-23 13:58:45.183 3535 3535 D NetworkSecurityConfig: No Network Security Config specified, using platform default
03-23 13:58:45.183 3535 3535 D NetworkSecurityConfig: No Network Security Config specified, using platform default
03-23 13:58:45.189 3535 3535 W com.termux.boot: type=1400 audit(0.0:154): avc: granted { execute } for name="start-sshd" dev="mmcblk0p23" ino=630413 scontext=u:r:untrusted_app_27:s0:c105,c256,c512,c768 tcontext=u:object_r:app_data_file:s0:c105,c256,c512,c768 tclass=file app=com.termux.boot
03-23 13:58:45.208 3535 3535 I termux : Executed files at boot: start-sshd
03-23 13:58:45.233 3535 3535 I termux : Executing job 1000.
^C
user@terminal:~$ adb logcat --pid=3577
--------- beginning of main
03-23 13:58:45.407 3577 3577 E com.termux: Not starting debugger since process cannot load the jdwp agent.
03-23 13:58:45.482 3577 3577 D ApplicationLoaders: Returning zygote-cached class loader: /system/framework/android.test.base.jar
03-23 13:58:45.554 3577 3577 D NetworkSecurityConfig: No Network Security Config specified, using platform default
03-23 13:58:45.555 3577 3577 D NetworkSecurityConfig: No Network Security Config specified, using platform default
03-23 13:58:45.774 3577 3577 E Termux:TermuxService: Failed to execute new TermuxTask command for:
03-23 13:58:45.774 3577 3577 E Termux:TermuxService: (1000) Execution Intent Command
03-23 13:58:45.778 3577 3577 E Termux:TermuxService: (1000) Execution Intent Command:
03-23 13:58:45.778 3577 3577 E Termux:TermuxService: Previous State: `Executing`
03-23 13:58:45.778 3577 3577 E Termux:TermuxService: Current State: `Failed`
03-23 13:58:45.778 3577 3577 E Termux:TermuxService:
03-23 13:58:45.778 3577 3577 E Termux:TermuxService: Exit Code: -
03-23 13:58:45.778 3577 3577 E Termux:TermuxService:
03-23 13:58:45.778 3577 3577 E Termux:TermuxService: Error Code: `2`
03-23 13:58:45.778 3577 3577 E Termux:TermuxService: Error Message:
03-23 13:58:45.778 3577 3577 E Termux:TermuxService: ```
03-23 13:58:45.778 3577 3577 E Termux:TermuxService: Failed to execute "(1000) Execution Intent Command" termux task command
03-23 13:58:45.778 3577 3577 E Termux:TermuxService: ```
03-23 13:58:45.778 3577 3577 E Termux:TermuxService:
03-23 13:58:45.778 3577 3577 E Termux:TermuxService: StackTraces:
03-23 13:58:45.778 3577 3577 E Termux:TermuxService: ```
03-23 13:58:45.778 3577 3577 E Termux:TermuxService: java.io.IOException: Cannot run program "/data/data/com.termux/files/home/.termux/boot/start-sshd" (in directory "/data/data/com.termux/files/home"): error=2, No such file or directory
03-23 13:58:45.778 3577 3577 E Termux:TermuxService: at java.lang.ProcessBuilder.start(ProcessBuilder.java:1050)
03-23 13:58:45.778 3577 3577 E Termux:TermuxService: at java.lang.Runtime.exec(Runtime.java:699)
03-23 13:58:45.778 3577 3577 E Termux:TermuxService: at com.termux.shared.shell.TermuxTask.execute(TermuxTask.java:96)
03-23 13:58:45.778 3577 3577 E Termux:TermuxService: at com.termux.app.TermuxService.createTermuxTask(TermuxService.java:432)
03-23 13:58:45.778 3577 3577 E Termux:TermuxService: at com.termux.app.TermuxService.executeTermuxTaskCommand(TermuxService.java:408)
03-23 13:58:45.778 3577 3577 E Termux:TermuxService: at com.termux.app.TermuxService.actionServiceExecute(TermuxService.java:392)
03-23 13:58:45.778 3577 3577 E Termux:TermuxService: at com.termux.app.TermuxService.onStartCommand(TermuxService.java:150)
03-23 13:58:45.778 3577 3577 E Termux:TermuxService: at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:4326)
03-23 13:58:45.778 3577 3577 E Termux:TermuxService: at android.app.ActivityThread.access$1800(ActivityThread.java:237)
03-23 13:58:45.778 3577 3577 E Termux:TermuxService: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1951)
03-23 13:58:45.778 3577 3577 E Termux:TermuxService: at android.os.Handler.dispatchMessage(Handler.java:106)
03-23 13:58:45.778 3577 3577 E Termux:TermuxService: at android.os.Looper.loop(Looper.java:223)
03-23 13:58:45.778 3577 3577 E Termux:TermuxService: at android.app.ActivityThread.main(ActivityThread.java:7656)
03-23 13:58:45.778 3577 3577 E Termux:TermuxService: at java.lang.reflect.Method.invoke(Native Method)
03-23 13:58:45.778 3577 3577 E Termux:TermuxService: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
03-23 13:58:45.778 3577 3577 E Termux:TermuxService: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
03-23 13:58:45.778 3577 3577 E Termux:TermuxService: Caused by: java.io.IOException: error=2, No such file or directory
03-23 13:58:45.778 3577 3577 E Termux:TermuxService: at java.lang.UNIXProcess.forkAndExec(Native Method)
03-23 13:58:45.778 3577 3577 E Termux:TermuxService: at java.lang.UNIXProcess.<init>(UNIXProcess.java:133)
03-23 13:58:45.778 3577 3577 E Termux:TermuxService: at java.lang.ProcessImpl.start(ProcessImpl.java:141)
03-23 13:58:45.778 3577 3577 E Termux:TermuxService: at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
03-23 13:58:45.778 3577 3577 E Termux:TermuxService: ... 15 more
03-23 13:58:45.778 3577 3577 E Termux:TermuxService:
03-23 13:58:45.778 3577 3577 E Termux:TermuxService: ```
03-23 13:58:45.801 3577 3577 W System : ClassLoader referenced unknown path:
03-23 13:58:46.112 3577 3577 D CompatibilityChangeReporter: Compat change id reported: 147798919; UID 10105; state: DISABLED
03-23 13:58:49.647 3577 3622 W libEGL : EGLNativeWindowType 0xe81cb068 disconnect failed
This is the latest start-sshd-file:
#!/data/data/com.termux/files/usr/bin/sh
date +'%a %F %T %Z' >> /data/data/com.termux/files/home/log.txt
date +'%a %F %T %Z' >> ~/log.txt
The file and its parent directories are all owned by the user. I don't know what else I can try.
Steps to reproduce
- Install Termux and Termux:Boot from F-Droid
- Add a script to
~/.termux/boot/
- Reboot
Expected behavior
The script is executed.
Additional information
- Termux application version: 0.118.0
- Android OS version: 11
- Device model: Homatics Box R 4K Plus
Problem description
The commands in
~/.termux/bootare not executed. This is the logcat output:This is the latest start-sshd-file:
The file and its parent directories are all owned by the user. I don't know what else I can try.
Steps to reproduce
~/.termux/boot/Expected behavior
The script is executed.
Additional information