termux / termux/termux-api

termux-api commands hang in terminal without any output

Open
#466 32 comments 14 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
4.3k
Forks
920
PR merge metrics
No merged PRs in 30d

Description

Problem description

termux-api commands do not work and hang in terminal without any visible output. The only thing I can do is Control+c for cancelling the command.
According to forum posts, I'm not the only encountering this issue.

Steps to reproduce

Newest version of termux-api and termux is installed from F-Droid and all permissions are granted in the app settings for both apps. Plus, battery optimization is turned off for all termux apps, so that termux apps are granted to run unlimited at all times. termux-battery-status is weirdly only working sometimes, it has only worked 2 or 3 times out of the many I tried. The other commands do not work at all. Rebooting and/or reinstalling the apps did not lead to any solution.

Expected behavior

Regular output of termux-api specific commands like termux-battery-status

Additional information
The phones were NOT rooted. Does the Android device really have to be rooted for termux-api to (fully) work all the time?

  • Termux application version: 0.117 and termux-api version 0.56
  • Android OS version: 9 and 10
  • Device model: Blu G60 and Blu G90

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing termux-battery-status and the other termux-api commands on the reported Android versions, checking whether they hang without output. No source files or tests are named in the report; done means identifying the cause of the intermittent and consistently hanging commands and verifying that they return their expected output.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java
Domain
cli, mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.