Wireless Debugging intent

chaoscreater

Active member
Does anyone know what the intent configurations is to get to the Wireless Debugging page, which is found under Developer Settings? I've tried a few different combinations and just couldn't get it to work.

Here's one of the links I found:
 
Last edited:

LF0

Member
Are you looking to quickly toggle the wireless debugging feature on and off? If so, I recommend using system setting actions. You can simply set it like this: 0 to turn it off, and 1 to turn it on.
1000088851.jpg
 

chaoscreater

Active member
Are you looking to quickly toggle the wireless debugging feature on and off? If so, I recommend using system setting actions. You can simply set it like this: 0 to turn it off, and 1 to turn it on.
View attachment 9345

Thanks for your reply. I'm already using that setting.

I'm looking to use the read screen action when I'm at the Wireless Debugging page. I need to get the IP address and the port and then pass that into Termux to do some other funky stuff.

At the moment, I can get to the page by sending an intent to open the Developer Settings page, then I use UI Automation to scroll down and click into the Wireless Debugging page. It's not ideal and I'd prefer to just send an intent to open the page directly.
 

LF0

Member
I searched for all declared activities in system settings, but unfortunately, wireless debugging is not among them. This means that the system settings do not provide a direct way to access the wireless debugging page.

I also wonder if anyone knows of any other methods to achieve this.
 

chaoscreater

Active member
I searched for all declared activities in system settings, but unfortunately, wireless debugging is not among them. This means that the system settings do not provide a direct way to access the wireless debugging page.

I also wonder if anyone knows of any other methods to achieve this.
This guy seems to have gotten it working though:

I just can't figure out how to take some of his settings and turn it into an intent. I wish there's some tool that shows you the intent behind the scenes, like when you click on a menu setting, it'll show you what the intent is.
 

chaoscreater

Active member
That's a nice tool, but I'm not sure how it would help here.

All I need to do is something like this:

1. Open the Wireless Debugging page
2. Get IP address and port on the page
3. Run adb connect ip_address : port with Termux via Termux Tasker plugin
4. Once connected, use Termux again to run adb tcpip 5555

If I run the same macro again, it will toggle from adb tcpip 5555 to adb usb. Essentially, I only want to allow adb tcpip 5555 on demand. I only need to use this when I need to wirelessly connect my PC to my phone using scrcpy, but I don't need my phone to always allow adb tcpip 5555, especially when I'm not using it.

I already have a systematic way to consistently turn on Wireless Debugging. You just need to use adb_wifi_enabled = 1. I don't really need a tool to turn Wireless Debugging on/off. What I need is just the IP address and port.

So far, I have everything working, but step 1 could be improved upon. At the moment, I have to open Developer Settings, then use Macrodroid UI automation to get to Wireless Debugging page.

With the app you recommended, I'd still have to use UI automation to look at the quick tile to get the IP address and port, or look at the widget on the desktop, which means I'll have to swipe pages just to get to the correct page. It'd be much easier if I can just open Wireless Debugging and get all the info I need there.
 

chaoscreater

Active member
Turns out that I don't even need the port!

I found this app from F-Droid called Wirebug. In the app, you can enable wireless debugging and after that point, you can then run adb connect IP_address, e.g. adb connect 192.168.0.140. Right after that, you can then run adb tcpip 5555. Both these can be passed into Termux via Termux Tasker plugin.

I'm not sure what's special about this Wirebug app. Because you can obviously toggle Wireless Debugging by either going to the page manually, OR use adb_wifi_enabled = 1 with adb shell command. But doing either of those will NOT allow adb connect 192.168.0.140 to work. You'd need to use the randomly generated port shown on the Wireless Debugging page, e.g. adb connect 192.168.0.140:34255.

However, by using Wirebug to enable wireless debugging from within the app itself, I can skip the need to use the port completely. No idea why, but it works. I've shared a macro that allows you to toggle a quick tile notification and it'll switch between adb usb and adb tcpip 5555 mode. Just makes it easy to use adb tcpip 5555 on demand, as I sometimes need to use scrcpy to screen mirror my phone using my PC and I want to do this wirelessly, which requires your phone to have adb tcpip 5555 enabled.

Macro ID and more details can be found here:
https://www.macrodroidforum.com/ind...g-mode-lost-on-restart.1273/page-6#post-41243
 

Dimlos

Well-known member
The WADBS widget can get the port even if it is not displayed on the screen, but it is not suitable for non-root automation because it relies on Shizuku.
I was able to build an app that opens wireless debugging, so I think this can be automated even with non-root.
 
Top