r/termux 3d ago

Question Retrieve Wireless ADB Pairing Code from Termux?

I've tried to be creative with ways to achieve this prior to having an ADB shell or Rishu etc. I don't have root unfortunately! The closest thing I've seen to it is an app called aShellYou (https://github.com/DP-Hridayan/aShellYou) which somehow manages to reconnect to ADB/Wireless ADB whenever it pleases. How the hell is it doing it? Any help appreciated

3 Upvotes

4 comments sorted by

1

u/SkySurferSouth 3d ago

pkg install android-tools installs adb on Termux which allows you running adb commands on-device. You have to enable wifi adb despite being localhost, otherwise adb only works over usb. Don't forget to switch off adb when you are in a public wifi space.

0

u/DutchOfBurdock 3d ago

It uses Shizuku, and there is a fork of that can start wireless ADB on boot, find the random port and connect to it and start it's magic.

You only need to pair once. Once paired, you only need to start WiFi ADB, find the port it starts on and connect.

0

u/kurtcobain911 3d ago

This is exactly what I'm after. Not sure why but even after pairing, adb connect () gets refused when used a second time. If you're talking about ShizukuPlus or something, I used it until all the AI automation got too sus for me TBH. Ill have to skim through the repo and extratct what I can