termux / termux/termux-api

termux-battery-status, which uses termux-api, occasionally hangs, but not every time

Open
#861 4 comments 1 reaction 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

If I run termux-battery-status repeatedly from commandline, it will eventually (maybe after 10 or 20 times) lock up and never return. I have to Ctrl-C.

I noticed this because I am using termux-battery-status for my tmux status bar, which refreshes occasionally, and it builds up hung processes in the process list. I have had to implement a script that runs hourly that does killall -v termux-api.

Steps to reproduce

Run termux-battery-status repeatedly in a shell.

Expected behavior

Should never lock up / hang.

Additional information

  • termux-api application version: 0.53.0, versionCode=1002, targetSdk=28, minSdk=24.
  • termux-api package version (installed through apt): 0.59.1-1
  • Android OS version: 16, GrapheneOS
  • Device model: Pixel 9 Pro

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 repeated termux-battery-status calls and inspect the termux-api interaction described in the issue, using the reported Android and package versions as context. Done means repeated calls no longer hang and do not leave accumulating processes that require killall -v termux-api.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java
Domain
api, mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.