Wi-fi set state and new extensions - permissions

520 views
Skip to first unread message

Charlie

unread,
Jul 26, 2022, 6:41:46 AM7/26/22
to Automate
Hi,

A while ago I have been using Wi-fi set state on and off. That was working fine, probably with the old extensions, older android version, older MIUI. Now I am using the new extensions v1.0 for Automate v1.33.5+ and automate version 1.34.1. That works also, but the permissions are "Deny once" and " Allow once" in a security pop-up with name "Automate legacy extension" that is displayed for about 10 seconds. I haven't found a way to always allow and maybe it is not possible at all.
Could be that this is because of new security features in android 12, or maybe stock MIUI 13.0.4 is interfering with what I read somewhere they call "app behavior".

Could it be that the extensions apk needs more permissions?
But maybe I am off track.

Thanx, Charlie

Henrik "The Developer" Lindqvist

unread,
Jul 26, 2022, 12:42:01 PM7/26/22
to Automate
What's the name of the permission exactly, all of them?

Do you have to grant the permission every time, i.e. more than once?

Ensure to disable any "automatic permission revoke" feature, it's standard since Android 11 i think.

Charlie

unread,
Jul 28, 2022, 5:18:33 AM7/28/22
to Automate
I have made some screenshots for the security pop-up and legacy extensions permissions. Let me know if you need them also for the automate app.
I have to grant every time, see the pop-up below.
Automate legacy extension app has no option Automatic permission revoke. For the Automate app I see that option and already disabled that a while ago and still is disabled.

1.jpg2.jpg3.jpg

Henrik "The Developer" Lindqvist

unread,
Jul 29, 2022, 3:49:50 PM7/29/22
to Automate
The dialog in the first screen screenshot isn't part of standard Android.
The screen in the second screenshot is the regular permission screen in App settings, that's the only standard Android way of grating/revoking the permissions.
The third screen isn't part of standard Android either, but nothing seems related to Wi-Fi/network permissions.

Why MIUI would show the dialog, in the first screenshot, for the Legacy extension, but not for the not deprecated Automate network permission extension is very odd.

Apparently, "Xiaomi phones should have an extra special permission under the normal permissions area for the app. In here you can disable this popup", see:

Charlie

unread,
Aug 6, 2022, 5:57:35 AM8/6/22
to Automate
Hi, thank you for your information and thoughts.
It is definitely MIUI that is interfering. As comparison I have installed Macrodroid and the MDHelper. When installing MDHelper I even get a notice that an older version of Android is being used, but was allow to install it. The extra permission is not shown to manage wifi connections, same as with your legacy extensions. To be complete, the extra permission is visible in your main app, but that is not enough. MIUI is doing things I don't like, on top of what Android is doing nowadays to protect users with limited knowledge. Anyway game over, in this configuration with MIUI. I think it is time to switch to LineageOS.

The other option with adb listening on port 5555 solves the issue, but I just tried that as a test. I am not going to leave USB debugging activated all day.

Thank you for your time and great app, still using it (for other things than wifi toggle)

Op vrijdag 29 juli 2022 om 21:49:50 UTC+2 schreef Henrik "The Developer" Lindqvist:

Henrik "The Developer" Lindqvist

unread,
Aug 6, 2022, 8:16:13 AM8/6/22
to Automate
So the non-standard Wi-Fi dialog is shown for the MacroDroid helper app as well?

Charlie

unread,
Aug 6, 2022, 9:23:10 AM8/6/22
to Automate
Yes.

To be precise about the other dialog with MD Helper, it doesn't show with installation, but after first start when you give permissions. See screenshot below. I think this dialog is also non-standard.
IMG_20220806_145652.jpg
The non-standard Wi-Fi dialog below is the same for Automate and MacroDroid, except for the app name.
IMG_20220806_151934.jpg

Op zaterdag 6 augustus 2022 om 14:16:13 UTC+2 schreef Henrik "The Developer" Lindqvist:

Henrik "The Developer" Lindqvist

unread,
Aug 8, 2022, 6:48:43 AM8/8/22
to Automate
Thanks. I'd expect you should see the "old Android version" warning for the Automate legacy extension as well.

Charlie

unread,
Aug 8, 2022, 3:33:59 PM8/8/22
to Automate
Yes a bit strange. Today I made a backup of my flows and uninstalled your current Automate app and extensions. Then I installed version 1.33.4 (apkmirror) and the "old" connectivity extension from your site. Then I made a simple flow with Wi-Fi set state on. Works without any dialog.
Also in this case no warning for "old Android version". Weird. Looks like there is a difference but what.
The "old Android version" warning for MDHelper is shown when opening the MDHelper app. It has an own permissions screen. Your extensions are just installed but I cannot start the extensions app. Maybe there is a difference. But anyhow even then also MDHelper shows the annoying "allow once".
Using version 1.33.4 for your app is an option, not perfect of coarse.

Op maandag 8 augustus 2022 om 12:48:43 UTC+2 schreef Henrik "The Developer" Lindqvist:

Henrik "The Developer" Lindqvist

unread,
Aug 9, 2022, 5:55:54 AM8/9/22
to Automate
None of the Automate extensions, old and new, has an default app Activity, so they don't show up in the "app drawer" nor can be launched/started.
In Android 11+ Google broke how permissions are handled in "old" apps, s they should all be granted on install, but now they're not, and instead the permission settings screen is shown on first launch/usage.
Reply all
Reply to author
Forward
0 new messages