Install termux from fdroid, Google Play version is deprecated.
(optional)
$ termux-change-repo
Install packages:
$ pkg install vim jq socat make git mpv bc python
Patch some:
$ cd ~/.vim/pack/plugins/start/tsv_edl.vim/
$ find ./ -name *.vim -exec sed -i 's,/tmp/mpvsocket,~/mpvsocket,g' {} \;
$ sed -i 's,/usr/local/bin/,/data/data/com.termux/files/usr/bin/,g' Makefile
$ sed -i 's,sudo,,g' Makefile
$ make install-utils
The first time you run mpv
may use some patience. If "[ao/audiotrack] No Java virtual machine has been registered" occurs,
stay calm, wait for 20 secs until pulseaudio timeout. use mpv -ao opensles
instead of
$ find ./ -name *.vim -exec sed -i 's,mpv --,mpv -ao opensles --,g' {} \;
- FIXME: in termux, gnu sed doesn't support '-l'
in .termux/termux.properties
, uncomment this line:
allow-external-apps = true
Install some packages:
$ pkg install ./termux-x11.deb
$ xdg-open app-debug.apk #install this apk
$ pkg install x11-repo mpv-x
$ vi $PREFIX/etc/apt/sources.list.d/x11.list
deb https://mirrors.tuna.tsinghua.edu.cn/termux/apt/termux-x11 x11 main
$ export XDG_RUNTIME_DIR=${TMPDIR}
$ termux-x11 :1 &
$ export DISPLAY=:1
$ echo "vo=x11" >> $PREFIX/etc/mpv/mpv.conf
$ find ./ -name *.vim -exec sed -i 's,mpv --,mpv -ao opensles -vo=x11 --,g' {} \;
Some patient may be needed after press \\
.
Some commands:
$ mpv -vo=x11 ./video.mp4
Press 'f' to go fullscreen, to avoid only a portion of video is displayed.
# https://github.com/termux/termux-packages/issues/5057
$ passwd
$ sshd
from outside:
$ ssh -p8022 <username>@IP-OF-Android
mpv --vo=tct ./video.mp4
pkg install x11-repo
pkg install xorg-xauth
echo "X11Forwarding yes" >> $PREFIX/etc/ssh/sshd_config
sshd
$ ssh -X you@android-device