How to use ADB in Termux by granting access to USB through APIs without root?
2 Likes
You need Android 11 and up
You need to be connected to a Wi-Fi network
Start Termux, install adb (androidtools or whatever)
Android Settings - System - Developer options (activate this first, see Internet), enable USB debugging and wireless usb
Open Wireless, see connect via code, use split screen to have both Settings and Termux on screen
In Termux write adb pair 127.0.0.1:portfromwireless press enter, enter code
Then when says success, write adb connect 127.0.0.1:portfromabovewirelessNOTwirelessport
The trick is to handle the split windows to copy that info, IF YOU MOVE THEM OFF-SCREEN THE PORTS AND CODE CHANGES
3 Likes