There's a great little cli script /usr/sbin/wifi.sh that I'd propose you give it a try ... it's
Set your android phones hotspot up and even with both the phones and laptops wifi and data disabled/disconnected running that wifi.sh script on your laptop should be able to find and connect to the phones wifi hotspot (antenna).
If you've set up your phone to have termux (from f-droid) installed, and within termux installed openssh, then running sshd within termux has it listen on port 8022 for ssh connections, when you initially wifi.sh connect to the phones hotspot from your laptop it shows the allocated IP address 192.168.200.100 (or whatever) and also the gateway IP address 192.168.200.110 or whatever and its that gateway IP that you ssh into from your laptop, so for example run ssh 192.168.200.110 -p 8022 in a terminal on your laptop
For the ssh password just run passwd within termux and enter whatever password you prefer.
It's nice being able to use your laptop keyboard/screen for running your phones termux terminal. If you also set up sshd on your laptop, or ftpd (the busybox version works fine), then you can scp or ftp files between the phone and laptop, and all without wifi or data being activated, so relatively secure.
Notes :
I installed termux from f-droid, i.e. used the phones chrome to visit the f-droid.org web site and install f-droid, which android didn't like, repeated warnings of 'not a recognised repo', but that I just ignored (accepted). Once f-droid app was installed I opened/used that to find and install termux emulator. With termux installed and opened I ran ...
Code: Select all
pkg install openssh
pkg update
pkg upgrade
Also in termux ran
Code: Select all
ssh-keygen
ssh-keygen -A
to create the user and server ssh keys files/folder
After that and running sshd in termux worked OK, just silently starts sshd in the background.
Running termux-setup-storage ... sets up a sub folder with sym-links to the phones main movies/pictures ..etc folders, making it easier to see/transfer files, you just have to select a video/picture and transfer that to the 'internal' videos/pictures storage area that termux can see.
For your laptops ftp server I found the easiest way was to use the regular busybox ftpd, run through tcpsvd i.e. syntax ...
tcpsvd -vE 0.0.0.0 21 ftpd -wA /root
where the -wA switches for ftpd permit uploading (write (w)) and automatic login (no password prompted), the /root final parameter is whichever folder you want the ftp server to serve/show.