termux / termux/termux-api

termux-microphone-record: cannot record into fifo or block device files

Open
#612 1 comment 5 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-microphone-record isn't capable of writing to nonstandard files. This is caused by MicRecorderAPI.java:254 checking if the target file exists, which for fifos and block devices under current file handling, it does.

Steps to reproduce

mkfifo myFifo
termux-microphone-record -f myFifo # File: myFifo already exists! Please specify a different filename
termux-microphone-record -f /dev/stdout # File: stdout already exists! Please specify a different filename

Expected behavior
The module should be able to write to fifo/block device files.
This would also allow directly processing output using other applications, as well as streaming over the network.

Additional information

  • termux-api application version: 0.50.1
  • termux-api package version (installed through apt): 0.57
  • Android OS version: 11 (lineage_twolip-userdebug 11 RQ3A.211001.001 1003680)
  • Device model: Redmi Note 6 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 at MicRecorderAPI.java:254 and reproduce the issue with a FIFO or /dev/stdout using termux-microphone-record. Trace the existing-target check and verify that recording can write to FIFO and block-device paths while preserving the different-filename error for regular files.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java
Domain
cli, mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.