Allow connection without WiFi or Tethering
I use AndroidMic on a tablet connected via USB cable to my laptop.
The Tablet is connected to the internet via the laptop using reverse adb tethering. Thus its not defined as WiFi or USB-Tethering. This happens via gnirehtet; which connects to a "VPN" that is using the laptop as a proxy to access the internet.
AndroidMic refuses to connect as its not detecting WIFI nor USB tethering; Even though I could enable wifi for a sec, connect, turn off WIFI, and stays connecting "obviously its connecting to the laptop IP via its network IP and the proxy (gnirehtet) is doing the magic."
Please don't block connection request if no WIFI or usb tethering is detected!
As this is the only maintained opensource app doing this function, I'm willing to create a bounty for this issue to help the development of this project!
Thanks for your amazing work.
EDIT: Typos.
BTW I know there's ADB mode, which worked for me "for a short while" but then it somehow interfere with gnirehtet causing random disconnections.
Hi are you using the app from the release page, or compile the latest code locally? The app on the release page is outdated, with the latest code, there'a an option for USB serial which could help with your situation. For the VPN, is it possible to setup PAC rules so it doesn't pass the localhost connections through the VPN? I'm assuming adb is running on localhost
I tried compiling, but had some errors "was something like vscode and visual studio code not same or whatever" didn't have time to investigate why failed. So I used the app from release page.
The "VPN" part in here is not the conventional VPN, its just how gnirehtet working by creating a "VPN" in the Android client so it could pass all the traffic through adb reverse connection to the host "laptop" running ADB acting as a proxy for connections outgoing from the android device.
For now, I figured out that the adb part in your code is just an adb reverse command, the trick for me was not terminating the adb server gnirehtet starting, and that would only be possible if I started AndroidMic BEFORE I start the gnirehtet proxy.
Sadly, this still requires more intention, and kinda screws my automated setup, so allowing the android app to try to connect regardless of WiFi or Tethering activity would be much more efficient for my case.
Damn I need a mousepad. closed the issue by mistake.
For now, I figured out that the adb part in your code is just an adb reverse command, the trick for me was not terminating the adb server gnirehtet starting, and that would only be possible if I started AndroidMic BEFORE I start the gnirehtet proxy.
Probably because of this function https://github.com/teamclouday/AndroidMic/blob/31a9fe06ec5396fa7bc89ef4706e241d71ec0052/RustApp/src/streamer/adb_streamer.rs#L13
I think we need to remove only the ones we create, using this args https://linuxcommandlibrary.com/man/adb-reverse
That makes perfect sense.
Idk if this is correct to do or not, but I'm doing it with another script (to use DroidCamX via ADB) "via forward rule but the idea is.." I'm not removing any rules, so even if there was previously created rule in the session and I issue a command to create new one that won't hurt, it will just move one :) of course this doesn't sound wise to do >_<
But we can confirm if the rule is created or not via adb forward --list (same for reverse) and look for the intended rule.