termux / termux/termux-api-package
termux-api features hangs on Android 11 when executed from ssh session
Nobody has claimed this yet.
- Dominant language
- Shell
- Stars
- 1.7k
- Forks
- 523
- PR merge metrics
- No merged PRs in 30d
Description
Problem description
Termux-API implementations hang on execution under Android 11 and do not complete when executed from ssh process
Steps to reproduce
start ssh service:
#!/data/data/com.termux/files/usr/bin/bash
termux-wake-lock
/data/data/com.termux/files/usr/bin/sshd &
ssh to termux device
execute on remote remote host
ssh -p 8022 termux@XXX.XXX.XXX.XXX
from within ssh session
Execute any termux-api command:
$ termux-wifi-connectioninfo
>> no output
$ termux-battery-status
>> no output
$ termux-call-log
>> no output
$ termux-battery-status -h
Usage: termux-battery-status
Get the status of the device battery.
The executables do appear to work when executed from the ssh session and do not crash -- executing them with the -h option produces output as expected.
Expected behavior
Expect to see output from API process
Additional information
$ termux-info (master) ✗
Packages CPU architecture:
aarch64
Subscribed repositories:
# sources.list
deb https://main.termux-mirror.ml/ stable main
# game-repo (sources.list.d/game.list)
deb https://dl.bintray.com/grimler/game-packages-24 games stable
# science-repo (sources.list.d/science.list)
deb https://dl.bintray.com/grimler/science-packages-24 science stable
Updatable packages:
All packages up to date
Android version:
11
Kernel build information:
Linux localhost 4.9.223-g5bded8e40b62-ab6647920 #0 SMP PREEMPT Thu Jul 2 03:22:48 UTC 2020 aarch64 Android
If you are rooted or have access to adb then capture a logcat with logcat -d "*:W", from a adb or root shell.
I am not rooted - Stock android 11 on a Google Pixel 3
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the hang from an SSH session using termux-wifi-connectioninfo, termux-battery-status, and termux-call-log, and compare them with the -h behavior. Inspect the Termux-API command entry points and capture the requested logcat output on Android 11. Done means the API commands complete and return output when invoked over SSH.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, shell
- Domain
- cli, mobile-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100