Access Termux in windows
Termux is an Android terminal emulator and Linux environment app that works directly with no rooting or setup required.
Termux has installation support for many programming languages as C, C++, Python, e.t.c. So termux can be used as a development environment. But there arrives an issue when it comes to writing the code. Despite mobile devices being powerful, it feels hectic to type code using mobile. So to resolve this, you can SSH into termux or use scrcpy.
Let’s see how !!
1. SSH
- Launch termux app & run these commands
- pkg upgrade
- pkg install openssh -y
- passwd (Typed text will not be visible)
- ssh-keygen (Skip user inputs by pressing enter)
- cd .ssh/
- cp authorized_keys id_rsa.pub
- termux-setup-storage
- mv id_rsa id_rsa.ppk
- cp id_rsa.ppk /sdcard/
- Now we have copied id_rsa.ppk file into our internal storage (Open file manager and transfer id_rsa.ppk file into PC )
- Type ifconfig (Snap below shows where to find ip)
- Now type sshd -d
- If error occurs like above just type — killall sshd and restart termux
Now we need putty to make access. (Download it from here according to the system architecture. 32-bit or 64-bit)
Launch putty — follow steps in snaphots below.
2. Scrcpy
- Connect mobile device via USB cable.
- Open phone settings and see if there is an developer option setting.
- If not got to About Phone and click on build number 6–7 times.
- Enable usb-debugging option in developer option.
- Open zip file downloaded — Double click on scrcpy-console windows batch file
- Done, the phone is visible on screen.