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
[Android 10] termux-api hangs on sshd #301
Comments
Same problem here. Android 10, Pixel 4. Works fine on device, freezing via sshd. |
My workaround for this has been to start a tmux session on the device, detach, and Android 10, Pixel 1 FWIW |
Thanks for the workaround, @matthewgrossman For the record, if someone is scripting ssh commands, it may be possible with I had this command to send the X selection of my laptop to my phone:
Which stopped working with the same symptoms described in this issue. With tmux, it can be done like this :
The I also used to have the reverse ( |
I'm also experiencing this issue on Samsung S10 Plus Android 10. |
I run tmux on phone firstly, then login through ssh, but it cannot work for any termux-api command. |
Minimal example code for workaround with GNU screen.
Note that the output will printed in the screen session, but not returned over ssh. |
I reproduced the same issue on Samsung Galaxy S9 earlier. The command The good news is, that the issue was resolved recently on my device, probably by an automatic update. I am now running termux This is just a heads-up; you might want to try the latest termux. It might solve the problem for you as well. |
The issue was resolved on my Pixel 3a on Android 10, but once I upgraded to Android 11 it came back. |
termux-open has even weirder behavior. Failed the first 10+ times I tried it.. and then magically started working. termux-clipboard-get/set still broken alas and a core part of my use case for Termux. Correction: -set works fine. I'll assume this is something about Android 10+ security model preventing random clipboard copies. Maybe termux api needs new more extensive permissions? |
Hello!
I have a Pixel 4 (Android 10 Q) with installed termux-api and apk Termux:API from Play Store.
Granting all permissions and disabled battery optimization for termux:api.
Running sshd in termux terminal.
Using termux-api (for example
/data/data/com.termux/files/usr/libexec/termux-api BatteryStatus
) works well when using termux directly on the phone, but via ssh it is hanging at:11-10 12:50:10.015 20878 20878 W bash : type=1400 audit(0.0:11281): avc: granted { execute } for name="ps" dev="dm-4" ino=12791 scontext=u:r:untrusted_app_27:s0:c512,c768 tcontext=u:object_r:app_data_file:s0:c512,c768 tclass=file 11-10 12:50:10.015 20878 20878 W bash : type=1400 audit(0.0:11282): avc: granted { execute } for name="ps" dev="dm-4" ino=12791 scontext=u:r:untrusted_app_27:s0:c512,c768 tcontext=u:object_r:app_data_file:s0:c512,c768 tclass=file 11-10 12:50:10.015 20878 20878 W bash : type=1400 audit(0.0:11283): avc: granted { execute_no_trans } for path="/data/data/com.termux/files/usr/bin/ps" dev="dm-4" ino=12791 scontext=u:r:untrusted_app_27:s0:c512,c768 tcontext=u:object_r:app_data_file:s0:c512,c768 tclass=file 11-10 12:50:10.015 20878 20878 W ps : type=1400 audit(0.0:11284): avc: granted { execute } for path="/data/data/com.termux/files/usr/bin/ps" dev="dm-4" ino=12791 scontext=u:r:untrusted_app_27:s0:c512,c768 tcontext=u:object_r:app_data_file:s0:c512,c768 tclass=file 11-10 12:50:10.035 20878 20878 W ps : type=1400 audit(0.0:11285): avc: granted { execute } for path="/data/data/com.termux/files/usr/lib/libtermux-exec.so" dev="dm-4" ino=13421 scontext=u:r:untrusted_app_27:s0:c512,c768 tcontext=u:object_r:app_data_file:s0:c512,c768 tclass=file 11-10 12:50:10.035 20878 20878 W ps : type=1400 audit(0.0:11286): avc: granted { execute } for path="/data/data/com.termux/files/usr/lib/libprocps.so" dev="dm-4" ino=13422 scontext=u:r:untrusted_app_27:s0:c512,c768 tcontext=u:object_r:app_data_file:s0:c512,c768 tclass=file 11-10 12:50:10.039 20878 20878 W ps : type=1400 audit(0.0:11287): avc: denied { read } for name="osrelease" dev="proc" ino=195981 scontext=u:r:untrusted_app_27:s0:c512,c768 tcontext=u:object_r:proc:s0 tclass=file permissive=0 11-10 12:50:10.039 20878 20878 W ps : type=1400 audit(0.0:11288): avc: denied { read } for name="pid_max" dev="proc" ino=195983 scontext=u:r:untrusted_app_27:s0:c512,c768 tcontext=u:object_r:proc_pid_max:s0 tclass=file permissive=0 11-10 12:50:30.819 20884 20884 W bash : type=1400 audit(0.0:11292): avc: granted { execute } for name="ps" dev="dm-4" ino=12791 scontext=u:r:untrusted_app_27:s0:c512,c768 tcontext=u:object_r:app_data_file:s0:c512,c768 tclass=file 11-10 12:50:30.819 20884 20884 W bash : type=1400 audit(0.0:11293): avc: granted { execute } for name="ps" dev="dm-4" ino=12791 scontext=u:r:untrusted_app_27:s0:c512,c768 tcontext=u:object_r:app_data_file:s0:c512,c768 tclass=file 11-10 12:50:30.819 20884 20884 W bash : type=1400 audit(0.0:11294): avc: granted { execute_no_trans } for path="/data/data/com.termux/files/usr/bin/ps" dev="dm-4" ino=12791 scontext=u:r:untrusted_app_27:s0:c512,c768 tcontext=u:object_r:app_data_file:s0:c512,c768 tclass=file 11-10 12:50:30.819 20884 20884 W ps : type=1400 audit(0.0:11295): avc: granted { execute } for path="/data/data/com.termux/files/usr/bin/ps" dev="dm-4" ino=12791 scontext=u:r:untrusted_app_27:s0:c512,c768 tcontext=u:object_r:app_data_file:s0:c512,c768 tclass=file 11-10 12:50:30.822 20884 20884 W ps : type=1400 audit(0.0:11296): avc: granted { execute } for path="/data/data/com.termux/files/usr/lib/libtermux-exec.so" dev="dm-4" ino=13421 scontext=u:r:untrusted_app_27:s0:c512,c768 tcontext=u:object_r:app_data_file:s0:c512,c768 tclass=file 11-10 12:52:14.452 20912 20912 W bash : type=1400 audit(0.0:11304): avc: granted { execute } for name="termux-api" dev="dm-4" ino=61722 scontext=u:r:untrusted_app_27:s0:c512,c768 tcontext=u:object_r:app_data_file:s0:c512,c768 tclass=file 11-10 12:52:14.452 20912 20912 W bash : type=1400 audit(0.0:11305): avc: granted { execute } for name="termux-api" dev="dm-4" ino=61722 scontext=u:r:untrusted_app_27:s0:c512,c768 tcontext=u:object_r:app_data_file:s0:c512,c768 tclass=file 11-10 12:52:14.452 20912 20912 W bash : type=1400 audit(0.0:11306): avc: granted { execute_no_trans } for path="/data/data/com.termux/files/usr/libexec/termux-api" dev="dm-4" ino=61722 scontext=u:r:untrusted_app_27:s0:c512,c768 tcontext=u:object_r:app_data_file:s0:c512,c768 tclass=file 11-10 12:52:14.452 20912 20912 W termux-api: type=1400 audit(0.0:11307): avc: granted { execute } for path="/data/data/com.termux/files/usr/libexec/termux-api" dev="dm-4" ino=61722 scontext=u:r:untrusted_app_27:s0:c512,c768 tcontext=u:object_r:app_data_file:s0:c512,c768 tclass=file 11-10 12:52:14.452 20913 20913 W bash : type=1400 audit(0.0:11309): avc: granted { execute } for name="logcat" dev="dm-4" ino=12728 scontext=u:r:untrusted_app_27:s0:c512,c768 tcontext=u:object_r:app_data_file:s0:c512,c768 tclass=file 11-10 12:52:14.452 20914 20914 W bash : type=1400 audit(0.0:11308): avc: granted { execute } for name="coreutils" dev="dm-4" ino=12888 scontext=u:r:untrusted_app_27:s0:c512,c768 tcontext=u:object_r:app_data_file:s0:c512,c768 tclass=file 11-10 12:52:14.452 20913 20913 W bash : type=1400 audit(0.0:11310): avc: granted { execute } for name="logcat" dev="dm-4" ino=12728 scontext=u:r:untrusted_app_27:s0:c512,c768 tcontext=u:object_r:app_data_file:s0:c512,c768 tclass=file 11-10 12:52:14.452 20913 20913 W bash : type=1400 audit(0.0:11311): avc: granted { execute_no_trans } for path="/data/data/com.termux/files/usr/bin/logcat" dev="dm-4" ino=12728 scontext=u:r:untrusted_app_27:s0:c512,c768 tcontext=u:object_r:app_data_file:s0:c512,c768 tclass=file 11-10 12:52:14.452 20913 20913 W bash : type=1400 audit(0.0:11312): avc: granted { execute } for name="dash" dev="dm-4" ino=12795 scontext=u:r:untrusted_app_27:s0:c512,c768 tcontext=u:object_r:app_data_file:s0:c512,c768 tclass=file 11-10 12:52:14.534 20915 20915 D AndroidRuntime: >>>>>> START com.android.internal.os.RuntimeInit uid 10211 <<<<<<
The text was updated successfully, but these errors were encountered: