-
Notifications
You must be signed in to change notification settings - Fork 87
Description
- simple form of error (pure termux-docker):
CANNOT LINK EXECUTABLE "mpv": library "libOpenSLES.so" not found
linker: CANNOT LINK EXECUTABLE "mpv": library "libOpenSLES.so" not found
- reproduction steps for simple form:
docker run -it termux/termux-docker:aarch64
yes | pkg upgrade -y
pkg install -y libexpat
pkg install -y mpv
mpv- extended form of error (attempt to install
libOpenSLES.sointo termux-docker by combining redroid image into termux-docker image)
● Video --vid=1 (av1 480x360 30 fps) [default]
● Audio --aid=1 --alang=eng (opus 2ch 48000 Hz) [default]
[vo/x11] Warning: this legacy VO has bad performance. Consider fixing your graphics drivers, or not forcing the x11 VO.
Binder driver could not be opened. Terminating.
libc: Fatal signal 6 (SIGABRT), code -6 (SI_TKILL) in tid 6859 (mpv), pid 6859 (mpv)
Aborted (core dumped)
- reproduction steps for extended form:
mkdir termux-docker-redroid-fusion
cd termux-docker-redroid-fusion
FUSION_ROOTFS=$(pwd)
docker export $(docker create termux/termux-docker:aarch64) --output="termux-docker.tar"
docker export $(docker create redroid/redroid:9.0.0-latest) --output="redroid.tar"
tar -xvf "$FUSION_ROOTFS/termux-docker.tar"
docker run -it --rm \
-v "$FUSION_ROOTFS"/system:/system \
-v "$FUSION_ROOTFS":/mnt/rootfs \
debian \
bash -c 'tar -h --skip-old-files -C / -xvf /mnt/rootfs/redroid.tar'
docker run -it -p 5900:5900 \
-v "$FUSION_ROOTFS"/system:/system \
--ulimit nofile=1048576:1048576 \
termux/termux-docker:aarch64
export TERM=xterm
yes | pkg upgrade -y
pkg install -y x11-repo tur-repo
pkg install -y libexpat
pkg install -y tigervnc x11vnc xfce mpv-x
pip install yt-dlp
yt-dlp https://www.youtube.com/watch?v=FtutLA63Cp8 -o "video.%(ext)s"
vncserver :1 -xstartup xfce4-session
export DISPLAY=:1
x11vnc -noshm &
mpv video*Continuation of #27
Continuation of remote-android/redroid-doc#705
termux-docker can already run some packages, but because Termux and other Android apps have very permissive and easily compatible access, much more than most other APIs, to system OpenSLES, through the openal-soft package, we have a practice of sometimes building our packages depending on this, so if this depends also on Binder, it may also be necessary to install Binder, or more components, before all termux packages could run in termux-docker.
redroid supports "OpenSLES" and "Binder" , so when Termux App is installed inside a complete redroid container, these errors do not happen. The downside of that is that it takes too long to load and also too intensive to run especially on slow computers.
The goal of the idea is, trying to make termux-docker able to run official termux packages so it could be used as automated integration testing of binaries from the CI of termux-packages. It would not be necessary to get sound to actually play audibly, it would just be necessary to get a return code from each program in a basic functionality test, that matches the return code from the same build of the package on normal Android devices, without modifying the build.
The optimistic hope is that it might not be required to completely install and launch SurfaceFlinger in order to activate OpenSLES. If it is required to completely install and launch SurfaceFlinger in order to activate OpenSLES, then this would mean the entire Redroid has to be installed and there is no benefit to trying to create an "in between mixture" of termux-docker and redroid.
In the future I will next try merging other components like merging the docker entrypoints of redroid and termux-docker together to see if it would be possible to open a Termux Bash shell directly through docker run on a redroid image, then remove components from redroid until all components have been removed that are not necessary for Termux packages.