Comment by lisdexan

1 month ago

I haven't tested it myself, but as far as I know you can run ADB in the phone itself via Termux. Perhaps it's possible to make a wrapper that install apps from F-Droid with ADB? It would mean that you would only need to be tethered to the your PC once.

Obviously they'll eventually remove this because Google is hostile to things like ReVanced / some spook wants this power.

ADB using two Android smartphones and Termux (https://github.com/termux/termux-app):

* Search for "Smartphone-1 to Smartphone-2" "adb tcpip 5555" in "Motorola moto g play 2024 smartphone, Termux, termux-usb, usbredirect, QEMU running under Termux, and Alpine Linux: Disks with Globally Unique Identifier (GUID) Partition Table (GPT) partitioning": https://old.reddit.com/r/MotoG/comments/1j2g5gz/motorola_mot... (old.reddit.com/r/MotoG/comments/1j2g5gz/motorola_moto_g_play_2024_smartphone_termux/)

* Search for "termux-adb" in "Motorola moto g play 2024 Smartphone, Android 14 Operating System, Termux, And cryptsetup: Linux Unified Key Setup (LUKS) Encryption/Decryption And The ext4 Filesystem Without Using root Access, Without Using proot-distro, And Without Using QEMU": https://old.reddit.com/r/MotoG/comments/1jkl0f8/motorola_mot... (old.reddit.com/r/MotoG/comments/1jkl0f8/motorola_moto_g_play_2024_smartphone_android_14/)

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...