Enable wireless adb?

79 views
Skip to first unread message

Luca Olivetti

unread,
May 29, 2023, 11:29:07 AM5/29/23
to Automate
Hello,

in my flow I need to use the "adb shell command" block, but for that to
work wireless debugging has to be enabled.
Unfortunately, it disables itself every time it connects to a different
access point (even if I already authorized the AP).
The "system setting set" block can enable adb but *not* wireless debugging.
The best I came up with is:

- configure the quick settings toolbar with an icon for wireless debugging

- interact block with the "quick settings" action
- delay 1 second (it's needed, otherwise the next step wouldn't work)
- interact touch click (over the wireless debugging icon)
- interact touch click at 0,0 (to close the quick settings)


The problem, beside the fact that it shows the quick settings toolbar
for a second, is that the location of the icon changes depending on the
orientation, so the above only works in landscape (in portrait it clicks
on a different icon). I didn't test if it works with the sceen off, that
could be another potential problem.
Is there a better way to enable wireless debugging?

Bye
--
Luca

FurriousFox

unread,
May 29, 2023, 11:49:40 AM5/29/23
to automa...@googlegroups.com
The "system setting set" block *can* enable wireless debugging, though it isn't part of the default list that comes with automate.

Category: Global
Name (Fx): "adb_wifi_enabled"
Value: 1

Op ma 29 mei 2023 17:29 schreef Luca Olivetti <oliv...@gmail.com>:
--
You received this message because you are subscribed to the Google Groups "Automate" group.
To unsubscribe from this group and stop receiving emails from it, send an email to automate-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/automate-user/9b602595-064a-cbf7-ee65-6fe7e4dcf2a8%40gmail.com.

Luca Olivetti

unread,
May 29, 2023, 12:34:50 PM5/29/23
to automa...@googlegroups.com
El 29/5/23 a les 17:49, FurriousFox ha escrit:
> The "system setting set" block *can* enable wireless debugging, though
> it isn't part of the default list that comes with automate.

Thank you, but it doesn't work:


05-29 18:31:13.651 F 113@7: android.os.RemoteException: Remote stack trace:
at
com.android.providers.settings.SettingsProvider.enforceWritePermission(SettingsProvider.java:2065)
at
com.android.providers.settings.SettingsProvider.mutateGlobalSetting(SettingsProvider.java:1283)
at
com.android.providers.settings.SettingsProvider.insertGlobalSetting(SettingsProvider.java:1237)
at
com.android.providers.settings.SettingsProvider.call(SettingsProvider.java:395)
at android.content.ContentProvider.call(ContentProvider.java:2448)


Same error if I try the "adb_enabled" action. I guess I need root, but I
don't have root on this device (otherwise I wouldn't need the "adb shell
command" block.

>
> Category: Global
> Name (Fx): "adb_wifi_enabled"
> Value: 1
>
> Op ma 29 mei 2023 17:29 schreef Luca Olivetti <oliv...@gmail.com
> <mailto:oliv...@gmail.com>>:
> <mailto:automate-user%2Bunsu...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/automate-user/9b602595-064a-cbf7-ee65-6fe7e4dcf2a8%40gmail.com <https://groups.google.com/d/msgid/automate-user/9b602595-064a-cbf7-ee65-6fe7e4dcf2a8%40gmail.com>.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Automate" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to automate-use...@googlegroups.com
> <mailto:automate-use...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/automate-user/CANqBeZ1-H4FJ_A_4y6OW9obDqCbXTvUPdgg3mPgdX3a8a1pY6g%40mail.gmail.com <https://groups.google.com/d/msgid/automate-user/CANqBeZ1-H4FJ_A_4y6OW9obDqCbXTvUPdgg3mPgdX3a8a1pY6g%40mail.gmail.com?utm_medium=email&utm_source=footer>.

FurriousFox

unread,
May 29, 2023, 5:21:42 PM5/29/23
to automa...@googlegroups.com
to allow automate to edit the system settings, execute the following adb command:

pm grant com.llamalab.automate android.permission.WRITE_SECURE_SETTINGS

Op ma 29 mei 2023 18:34 schreef Luca Olivetti <oliv...@gmail.com>:
To unsubscribe from this group and stop receiving emails from it, send an email to automate-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/automate-user/5c043942-aa0b-80a2-cdbe-6bf6d1b79e3b%40gmail.com.

Henrik "The Developer" Lindqvist

unread,
May 29, 2023, 5:25:01 PM5/29/23
to Automate
Ensure you've granted the "write secure system settings" permission, see:

Apparently it should be possible on some devices at least, see:

Luca Olivetti

unread,
May 30, 2023, 3:57:20 AM5/30/23
to automa...@googlegroups.com
El 29/5/23 a les 23:21, FurriousFox ha escrit:
> to allow automate to edit the system settings, execute the following adb
> command:
>
> pm grant com.llamalab.automate android.permission.WRITE_SECURE_SETTINGS

Great! That worked! Thank you.

Bye
--
Luca

Luca Olivetti

unread,
May 30, 2023, 4:03:39 AM5/30/23
to automa...@googlegroups.com
El 29/5/23 a les 23:25, Henrik "The Developer" Lindqvist ha escrit:
> Ensure you've granted the "write secure system settings" permission, see:
> https://llamalab.com/automate/doc/adb.html

Thank you! As I said to FurriousFox, granting the permission worked.


>
> Apparently it should be possible on some devices at least, see:
> https://www.reddit.com/r/Android/comments/128eak8/you_can_start_shizuku_automatically_on_boot/

that's interesting too (I mean the shizuku part) .

Bye
--
Luca

Reply all
Reply to author
Forward
0 new messages