AFAICT it only works on non-rooted devices when used over USB to access another device, because without root it has no access to the adb server on the phone running termux.
I'm definitely not 100% sure about that though, so someone please correct me if not.
Just tested⁰, it works with WiFi ADB but it has some limitations.
- The pairing process is kinda awkward, you need to split screen Termux and the Wireless debugging submenu, if you change windows the pairing IP and code are changed.
- The pair survives a reboot and WiFi change. You can disable the 7day revocation, so the pairing process is a one time thing.
- After a pair you still need to connect (adb connect localhost:port) and the port changes after a WiFi change or disconnect. I searched for solutions and apparently it's simple as running nmap twice¹
- It obviously doesn't work without a WiFi connection (unless is there some dark magic to connect your phone to its own hotspot).
So a wrapper seems viable if you are ok only installing apps on trusted networks.
[0]: I'm on GrapheneOS but I believe the dev menu is the same.
[1]: https://www.reddit.com/r/tasker/comments/1dqm8tq/project_sim...
More googling, Shizuku² does this already in a polished way and exposes an API for other apps. Some related-ish apps are SAI³ (for installing split apks) and Canta⁴ (removing system apps).
EDIT: Even more googling, the whole setup already exists in Obtainium (i.e. F-Droid but with Github Releases) apparently so apps show up as being installed via Play Store and subsequently be usable in Android Auto⁵.
So hypothetically you can install stuff day one on a stock phone after this atrocity is turned on.
[2]: https://shizuku.rikka.app/
[3]: https://f-droid.org/en/packages/com.aefyr.sai.fdroid/
[4]: https://f-droid.org/en/packages/io.github.samolego.canta/
[5]: https://github.com/ImranR98/Obtainium/issues/1859
wifi adb is a clever workaround, lol. I haven't seen that before, but it does kinda make sense. I've used SAI before (though it has been having lots more problems in the past year or three), but haven't seen Shizuku.
thank you for the testing and details!