Don’t install SSH.
Is is likely that smartphone should not perform any server tasks.
Also don’t install any specific applications.
It is not Android where very basic tasks can be accomplished only by using 3rd-party GUI applications from their store.
Use serial port:
- On host:
$ sudo apt install picocom lrzsz
$ cd DIR_FOR_DL/
- Connect your mobile with cord and connect:
$ picocom -b115200 /dev/ttyACM0
- On target:
$ sudo apt install lrzsz
$ zsend /dev/ttyACM0 test
Vice versa works. Change port to /dev/ttyGS0 to send from target to host.
It may be needed to use sudo with picocom and zrecv/zsend on host even after adding your username to dialout group. (Don’t know why?)
Also the receiving side should execute zrecv, as I understand, only for the very first time you send something.
The both scripts are below.
$ cat ~/.local/bin/zrecv
#!/usr/bin/env bash
# From here (with some modifications):
#
# https://superuser.com/questions/604055/using-rz-and-sz-under-linux-shell
function use
{
echo "Usage: $0 port"
echo "e. g. $0 /dev/ttyGS0"
exit 1
}
if [ $# -ne 1 ]
then
use
fi
DEV="$1"
stty -F $DEV 115200
rz > $DEV < $DEV
$ cat ~/.local/bin/zsend
#!/usr/bin/env bash
# From here (with some modifications):
#
# https://superuser.com/questions/604055/using-rz-and-sz-under-linux-shell
function use
{
echo "Usage: $0 port filepath"
echo "e. g. $0 /dev/ttyGS0 /tmp/filename"
exit 1
}
if [ $# -ne 2 ]
then
use
fi
DEV="$1"
FILENAME="$2"
stty -F $DEV 115200
sz "$FILENAME" > $DEV < $DEV