Smooth-E / wireless-adb-switch

An app that allows you to switch Android's Wireless Debugging feature on and off quickly. It provides several widgets and a quick settings tile to do this.
GNU General Public License v3.0
333 stars 20 forks source link

Please add an ability to set a fixed port #8

Open RichardBeisser opened 10 months ago

RichardBeisser commented 10 months ago

Hello,

today I installed your WADS. It would be great if you add 2 Features:

Thanks.

Smooth-E commented 10 months ago

Hello. Got to say that I find your suggestions pretty reasonable. However, I should say that starting wireless debugging on boot will only be possible in the root mode, because you need to manually activate Shizuku on every boot by connecting your device to the PC. Assigning a static port may be not possible (unlikely), but I will investigate this when I get to work on the next release (in a couple of months).

RichardBeisser commented 10 months ago

... starting wireless debugging on boot will only be possible in the root mode...

yes, i know that. all my devices are rooted with magisk.

by the way, there is already with the mentioned features, but the project seems to be maintained. https://github.com/RikkaApps/WADB this App doesnt work on all of my devices, but your's does.

Smooth-E commented 5 months ago

... set a fixed Port for ADB

I am back to working on this application for some time. Am currently a bit puzzled on whether it is even possible to set the port to some fixed value. The process of enabling wireless adb goes as follows as far as I understand by now:

  1. AdbDebuggingManager.setAdbEnabled(...) is called.
  2. Then the manager sends a message with AdbDebuggingHandler.MSG_ADBDWIFI_DISABLE.
  3. AdbDebuggingHandler catches the message to actually enable wireless debugging.
  4. After checking that you are connected to a valid network, it starts the ConnectionPoller which monitors the system property that should contain a port for a maximum of 10 seconds and fires back the listener with what it read from the property.

So for now it looks like the port is set internally when you connect to the network. I will dig deeper a bit later, but it is possible that I will abandon this idea.

yochananmarqos commented 3 months ago

@Smooth-E

...manually activate Shizuku on every boot by connecting your device to the PC.

There's a Wireless debugging toggle in Developer Options in recent versions of Android. I'm not sure when it was actually added, but it's been there officially since at least Android 12 on my Pixel 6. I had a OnePlus 6T and 7 Pro just before that. I think OnePlus added it at some point while I had my 7 Pro before it was available officially.

Either way, I don't believe there's any way to enable it on boot without root. I know I've seen Tasker users request the same thing.

Smooth-E commented 3 months ago

Hello @yochananmarqos!

There's a Wireless debugging toggle in Developer Options in recent versions of Android. I'm not sure when it was actually added...

I know this. It was added in Android 11 with addition of the wireless debugging feature itself.

There's a Wireless debugging toggle in Developer Options in recent versions of Android. I'm not sure when it was actually added, but it's been there officially since at least Android 12 on my Pixel 6. I had a OnePlus 6T and 7 Pro just before that. I think OnePlus added it at some point while I had my 7 Pro before it was available officially.

What is the point of this statement exactly? Excuse me, but I don't understand what you are trying to imply here. Be reminded that WADBS (my app) is just a widget provider for a system feature. I am not implementing wireless debugging myself.

Either way, I don't believe there's any way to enable it on boot without root. I know I've seen Tasker users request the same thing.

Yeah, and it's fine. I actually mentioned this here as you said.

Thanks for being interested in WADBS!

yochananmarqos commented 3 months ago

@Smooth-E Nevermind, I guess I misunderstood.