termux / termux/termux-api

LocalSocket Error on Android 16

Open
#799 5 comments 0 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

On Android 16, using command termux-usb -l returns blank and stuck at here.
At first, I thought it might be the new intent receiver bug, run termux-lib-start also returns blank.
Checking log, it said the intent receiver was blocked due to the new Android 16.
Then, I build up a new version but all exported="false" were set to exported="true". Now termux-lib-start works but 'termux-usb -l' still didn't work.
Then I dig the log, finding the UsbRecevier works. But the log touched native method which means I couldn't solve 😔.

Image

But I searched the LocalSocket about denied permission. Found that disable SELinux might work, I tested and it's true.

Anyway, I didn't know what it's a fault on termux, but I'm sure that it works on Android 15 before I updated.

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-usb -l on Android 16 and reviewing the logs around UsbReceiver, the native method, and the LocalSocket permission failure. Compare the behavior with Android 15 and verify that USB listing works on Android 16 without disabling SELinux or broadly changing exported receiver settings.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.