If you have a USB OTG adapter, you can connect a second phone to the phone running Termux. You can then install the android-tools package in Termux: pkg install android-tools
wget https://dl.google.com/android/repository/platform-tools-latest-linux.zip unzip platform-tools-latest-linux.zip cp platform-tools/adb platform-tools/fastboot $PREFIX/bin/ chmod +x $PREFIX/bin/adb $PREFIX/bin/fastboot
fastboot reboot
Connect the Host (with OTG adapter) to the Target device via USB cable.
You now have fastboot and adb ready – even if you can’t use them directly, you can push files via ADB over Wi-Fi.
Unlock Bootloader Using Termux Better 📍 💫
If you have a USB OTG adapter, you can connect a second phone to the phone running Termux. You can then install the android-tools package in Termux: pkg install android-tools
wget https://dl.google.com/android/repository/platform-tools-latest-linux.zip unzip platform-tools-latest-linux.zip cp platform-tools/adb platform-tools/fastboot $PREFIX/bin/ chmod +x $PREFIX/bin/adb $PREFIX/bin/fastboot
fastboot reboot
Connect the Host (with OTG adapter) to the Target device via USB cable.
You now have fastboot and adb ready – even if you can’t use them directly, you can push files via ADB over Wi-Fi.