Android
Remote Control Device with scrcpy
settings > info > version > tap build 7x
settings > dev > enable USB debug
USB
sudo apt install scrcpy
# connect usb
scrcpy
WiFi (mobile phone’s host name is sx
)
adb tcpip 5555
adb connect sx:5555
adb devices
scrcpy
Termux
-
must install both the app and pkg
SSH
server
# install
pkg install openssh
# configure
cat <<'EOF' > ../usr/etc/ssh/sshd_config
PrintMotd no
PasswordAuthentication no
Subsystem sftp /data/data/com.termux/files/usr/libexec/sftp-server
EOF
# run
sshd
wifi wants to sleep. create script on mobile:
cat <<'EOF' > burn-battery
while true; do
sleep 0.1
date
done
EOF
chmod +x burn-battery
client
id -u
cat <<'EOF' >> ~/.ssh/config
# ssh s7 -t -- ./burn-battery >/dev/null
# to keep wifi from going to sleep
Host s7
Hostname Samsung-Galaxy-S7
User u0_a560
Port 8022
EOF
ssh s7
Termux API
Rabbit hole! :D
termux-notification \
--content "HELLO from termux" \
--group stuff \
--title 'hello world!' \
--action "termux-toast i am the on-click action handler"
termux-tts-speak -l en -n gb "hello world"
There is no termux-call-log any more. :( https://github.com/termux/termux-api/issues/257