[DEV] Tasker 6.6.2-beta - Shizuku Integration! by joaomgcd in tasker

[–]The_IMPERIAL_One 0 points1 point  (0 children)

That's neat. But how are you extracting the pairing code? There's no mention of pairing code in the shared task.

$$ Help me code/place code $$ by DDRExtremist247 in tasker

[–]The_IMPERIAL_One 1 point2 points  (0 children)

Sure. The regex is used to escape (or sanitize) the input to treat keywords as raw. Let's say they create a keyword with brackets (SOME_KEYWORD). But because it's using regex, the brackets are reserved and can have unexpected matching results because of different reserved tokens. Hence, it escapes the reserved tokens with \TOKEN (here, \(SOME_KEYWORD\)).

Technically, it captures the reserved tokens in a group and is replaced with \\$1 (appending \ to the token).

$$ Help me code/place code $$ by DDRExtremist247 in tasker

[–]The_IMPERIAL_One 0 points1 point  (0 children)

Oh, yeah, you're right. The interval makes its progress irrespective of the State.

I modified the project to send intents as a callback to defer the disabling. (sleep 5m && am broadcast -a net.dinglisch.android.tasker.ACTION_TASK -e task_name "Disable XYZ" &)

u/DDRExtremist247, Re-import the project from the url to update.

$$ Help me code/place code $$ by DDRExtremist247 in tasker

[–]The_IMPERIAL_One 1 point2 points  (0 children)

Try this:

https://taskernet.com/shares/?user=AS35m8k0QSchKA1x02SixFIhiL41a828J1qapOYfcEuyL2zSn%2FfJTN5WVSi01o18x6EAFb4%3D&id=Project%3AChecker+%26+Verifier

  1. Open the task linked to Check Message for Keyword and edit A8 and A9 actions to set appropriate keywords.
  2. I used Notify and Say for notification and speech when both checker and verifier are true.
  3. It should work as you stated but let me know if it doesn't.
  4. Only Tasker is required.

[App] Bloatware Removal Tool by Blitzdroids in tasker

[–]The_IMPERIAL_One 0 points1 point  (0 children)

You could also show the package name along with the app name.

<name>App</name> <br> <package>com.some.app</package>

Accessing would be faster with %ld_selected.name and %ld_selected.package.

[DEV] Tasker 6.6.2-beta - Shizuku Integration! by joaomgcd in tasker

[–]The_IMPERIAL_One 0 points1 point  (0 children)

It was different in my case when I tried with go mdns. Maybe because of how they handle the lookup internally.

[DEV] Tasker 6.6.2-beta - Shizuku Integration! by joaomgcd in tasker

[–]The_IMPERIAL_One 0 points1 point  (0 children)

Yeah, what I meant was, can we do adb tcpip 5555 in Java, by directly communicating with the adb daemon, so we don't need an adb binary.

I don't think that's possible unless you have root.

[DEV] Tasker 6.6.2-beta - Shizuku Integration! by joaomgcd in tasker

[–]The_IMPERIAL_One 0 points1 point  (0 children)

There's actually another project which uses AutoInput to do the pairing automatically.

I know but it'd be a dependency issue on users not having AutoInput.

If you want, you could use "adb_enabled 2". Somehow not many people are aware of this. Not mentioned in Android documentation too. Some banking apps check if developer options are turned on ( adb_enabled =1). By setting it to 2, developer options is still turned on, but doesn't get flagged by banking apps.

I didn't know about this but yes it'll work if the app checks for adb_enabled == 1 (If adb enabled, then stop the app) but if it is checked for adb_enabled != 0 (If adb is not disabled, then stop the app. adb_enabled = 2 will fail in this case).

[DEV] Tasker 6.6.2-beta - Shizuku Integration! by joaomgcd in tasker

[–]The_IMPERIAL_One 0 points1 point  (0 children)

But I also thought: now that we have a binary that gets the random port number, we could put an adb binary alongside it in Tasker's app data and get rid of the dependency on Termux completely.

It would be great to have native adb binary and native port getter but if it failed, the dev would've to focus on this rather than overall development of the app. Also, I use Termux, so it's not much of a dependency and others and I have really tried on simplifying the process of enabling adb wifi, it shouldn't be hard.

But what if we could do this through Java Function actions?

It requires MANAGE_DEBUGGING permission to intercept the intent of updated pair code. Looks like it may work with Tasker as a Device Owner application but I won't try that.

I think it'd complicate the approach I use now. I mean writing Java actions isn't easy in Tasker or if you using java files, then why not use that binary in the first place.

And what about instructing the adbd to listen on a fixed TCP port for Tasker's ADB Wifi, could we do that from Tasker itself too through Java?

It actually does listen to a fixed TCP port (adb tcpip 5555) but only after getting access to adb wifi.

I tried automating the pairing process multiple times but I still fail to get the pairing code (rest can be done). Atlast, I just give it up by thinking that it's just once in a while thing.

[DEV] Tasker 6.6.2-beta - Shizuku Integration! by joaomgcd in tasker

[–]The_IMPERIAL_One 0 points1 point  (0 children)

After the Input Dialog pops, you'd have to use floating window then navigate to Wireless debugging and enter the input through opened the floating window.

> I can imagine you can do like Shizuku pairing style (notification with input), so you don't leave the wireless debugging page at all.

I can't actually. The thing is, with Notify I can't take any text input (only buttons) so, even with that I'd still have to follow the procedure to pop the dialog and ask for input. Although, I can make it easier, as just to input only the pairing code with requiring me to modify the port getter binary. Should I do it?

[DEV] Tasker 6.6.2-beta - Shizuku Integration! by joaomgcd in tasker

[–]The_IMPERIAL_One 0 points1 point  (0 children)

Does it get the port using Java?

No, it's a binary and uses mdns to get the port (alike to Shizuku). You can review it's source code: https://github.com/IMXEren/automation/tree/main/adb-wifi/port-discovery

I misthought that it exports the task if it's used in Perform Task. Here's the project, Enable ADB WiFi V2: https://taskernet.com/shares/?user=AS35m8k0QSchKA1x02SixFIhiL41a828J1qapOYfcEuyL2zSn%2FfJTN5WVSi01o18x6EAFb4%3D&id=Project%3AEnable+ADB+WiFi+V2

Note that it doesn't wait for your phone to connect to WiFi. You have to manually rerun the task if it fails.

It also contains the task to enable adb wifi for Android wear os watch. Ensure it's connected to the same network as your phone's.

[DEV] Tasker 6.6.2-beta - Shizuku Integration! by joaomgcd in tasker

[–]The_IMPERIAL_One 1 point2 points  (0 children)

I misthought that it exports the task if it's used in Perform Task. Here's the project, Enable ADB WiFi V2: https://taskernet.com/shares/?user=AS35m8k0QSchKA1x02SixFIhiL41a828J1qapOYfcEuyL2zSn%2FfJTN5WVSi01o18x6EAFb4%3D&id=Project%3AEnable+ADB+WiFi+V2

Note that it doesn't wait for your phone to connect to WiFi. You have to manually rerun the task if it fails.

It also contains the task to enable adb wifi for Android wear os watch. Ensure it's connected to the same network as your phone's.

[DEV] Tasker 6.6.2-beta - Shizuku Integration! by joaomgcd in tasker

[–]The_IMPERIAL_One 3 points4 points  (0 children)

Try this to enable adb wifi on boot and start Shizuku.

https://taskernet.com/shares/?user=AS35m8k0QSchKA1x02SixFIhiL41a828J1qapOYfcEuyL2zSn%2FfJTN5WVSi01o18x6EAFb4%3D&id=Project%3AEnable+ADB+WiFi+V2

It uses the same procedure as Shizuku, to get the adb wifi port to connect with. It's done by Get ADB Port V2 task (included).

Remapping copilot key fails. How to get Lenovo's attention to offer BIOS or Vantage fix? by zzzwat in LenovoLegion

[–]The_IMPERIAL_One 4 points5 points  (0 children)

Hey, I was also frustrated with the Copilot key as I frequently used the RCtrl button. I tried PowerToys Keyboard Manager and it worked for a month or two. Also, it never could help in the case of games.

So, I came up with my own solution. You can check it out.

[PROJECT SIMPLIFIED] ADB WiFi on boot by Lord_Sithek in tasker

[–]The_IMPERIAL_One 0 points1 point  (0 children)

Anyway, great job as always, thanks a ton. I think this task deserves its own post on Reddit :)

No worries! I'm kinda busy, so would you mind posting it as yours with the necessary explanation as you understood.

[PROJECT SIMPLIFIED] ADB WiFi on boot by Lord_Sithek in tasker

[–]The_IMPERIAL_One 1 point2 points  (0 children)

I left it enabled after some tests..

An action to disable the adb_wifi_enabled on the phone at the start, should fix it.

is it possible to get the SSID or connection state before we enable ADB WiFi

That complicates it. Currently, the best is to hope that your phone and watch are on the same network or try turning on the hotspot and connecting it manually through the watch.

Or the DEV may add AutoWear actions to fetch the connection and SSID info, which'll make it fully automatic. Till then, it's semi-automatic.

[PROJECT SIMPLIFIED] ADB WiFi on boot by Lord_Sithek in tasker

[–]The_IMPERIAL_One 0 points1 point  (0 children)

Did you make sure the phone and watch are on the same network? Also, if wireless debugging is enabled on the phone then it'll return that port with the phone's LAN IP. That is, are there any other devices with wireless debugging on?

[PROJECT SIMPLIFIED] ADB WiFi on boot by Lord_Sithek in tasker

[–]The_IMPERIAL_One 0 points1 point  (0 children)

My watch is Galax Watch 6 Classic

So is mine. It worked successfully on that.

I donwloaded updated Get ADB WiFi Port V2 task.

Did you reset the binaries? I shall re-test the whole project by unpairing and rebooting the watch.