Sound in Termux
How sound from a distro in Termux reaches the phone's speakers through PulseAudio, and what to check if you hear nothing.
This page is for Andronix with Termux, on phones that can't run Linux in the app (Android 7, or no 64-bit ARM processor), or if you use the command-line installer. For Linux in the app, see Sound.
Sound works out of the box in Andronix 2.0. Anything that plays audio in your distro, like a browser or a music player, plays through the phone's speakers or headphones.
How it works
Your distro sends its sound to PulseAudio, a sound server that runs in Termux. Each time you start the distro (./start-debian.sh, andronix start or andronix desktop), Andronix makes sure PulseAudio is running, and installs it in Termux the first time if it's missing. There's nothing to set up.
PulseAudio only accepts connections from the phone itself (127.0.0.1), not from your network.
No sound?
-
Start the distro once from a Termux session (not with a one-off command like
./start-debian.sh ls). One-off commands never install packages, so PulseAudio only gets installed by an interactive start. -
Check PulseAudio is running. In Termux, run:
pulseaudio --check && echo runningIf it prints nothing, exit the distro and start it again.
-
Check the volume in the desktop's sound settings, and on the phone.
-
Look at the log: what Andronix did with PulseAudio is in
~/.andronix/logs/termux.log. Include it when you ask for help.
