WiFi - confirmation dialogue

BalkanCZE

New member
I have a problem with actions turning on or off wifi. I have the current versions of Macrodroid and MD Helper installed. When I use these actions, a dialog will appear asking for confirmation from the user (see attachment). Is it possible to bypass this dialog?

IMG_20220418_143142.jpg
 

Dimlos

Well-known member
By sending adb commands using ADB Shell [Tasker Plugin], you can turn Wi-Fi on and off without using MD Helper.

First, the USB connection of the Android device to PC and adb command to put the ADB daemon into TCP/IP connection mode is required.

adb tcpip 5555

This command is valid until the Android device is rebooted.
 

Attachments

  • enable-wifi.jpg
    enable-wifi.jpg
    221.8 KB · Views: 23
  • disable-wifi.jpg
    disable-wifi.jpg
    222.5 KB · Views: 20

FrameXX

Well-known member
May I ask you what device are you using? If you are using a xiaomi phone try to look into other app permissions for MD Helper and allow to turn on/off Wi-Fi without asking.
Settings > Apps > MD Helper > Other permissions > Turn on/off Wi-Fi > Allow always.

CZ: Pokud používáš Xiaomi telefon zkus se podívat do Nastavení > Aplikace > MD Helper > Ostatní povolení > Zapínání/vypínání Wi-Fi > Povolit vždy.
 

BalkanCZE

New member
MD Helper does not have permission to work with Wi-Fi on my phone (Poco F3). This permission is for Macrodroid only. The question is whether this is due to the system version or the manufacturer.

CZ: Na mém telefonu (Poco F3) není u aplikace MD Helper oprávnění pracovat s Wi-Fi. Toto oprávnění je pouze u aplikace Macrodroid. Je otázka jestli je to způsobeno verzí systému nebo výrobcem.
 

Dimlos

Well-known member
It worked on my acquaintance's POCO F3 without any confirmation dialog.
Of course, the same is true with the adb command.

MacroDroid v5.23.9 Pro
Poco F3 MIUI Global 13.0.4 Stable 13.0.4.0(SKHEUXM)
MD Helper permission App info > App permissions > All permissions > connect and disconctions from Wi-Fi (Cannot change)
 

MacroDroidDev

Administrator
Staff member
Xiaomi phones including Poco should have an extra special permission under the normal permissions area for the app. In here you can disable this popup.

Huawei devices on the other hand have no such option. (Don't buy HUAWEI)
 

satlover

New member
May I ask you what device are you using? If you are using a xiaomi phone try to look into other app permissions for MD Helper and allow to turn on/off Wi-Fi without asking.
Settings > Apps > MD Helper > Other permissions > Turn on/off Wi-Fi > Allow always.

CZ: Pokud používáš Xiaomi telefon zkus se podívat do Nastavení > Aplikace > MD Helper > Ostatní povolení > Zapínání/vypínání Wi-Fi > Povolit vždy.
can you tell me how to find this option?
 

satlover

New member
C:\Users\user\Downloads\platform-tools>adb shell pm grant com.arlosoft.macrodroid.helper android.permission.WRITE_SECURE_SETTINGS

Exception occurred while executing 'grant':
java.lang.SecurityException: grantRuntimePermission: Neither user 2000 nor current process has android.permission.GRANT_RUNTIME_PERMISSIONS.
at android.app.ContextImpl.enforce(ContextImpl.java:2343)
at android.app.ContextImpl.enforceCallingOrSelfPermission(ContextImpl.java:2371)
at com.android.server.pm.permission.PermissionManagerServiceImpl.grantRuntimePermissionInternal(PermissionManagerServiceImpl.java:1359)
at com.android.server.pm.permission.PermissionManagerServiceImpl.grantRuntimePermission(PermissionManagerServiceImpl.java:1341)
at com.android.server.pm.permission.PermissionManagerService.grantRuntimePermission(PermissionManagerService.java:559)
at android.permission.PermissionManager.grantRuntimePermission(PermissionManager.java:614)
at com.android.server.pm.PackageManagerShellCommand.runGrantRevokePermission(PackageManagerShellCommand.java:2692)
at com.android.server.pm.PackageManagerShellCommand.onCommand(PackageManagerShellCommand.java:291)
at com.android.modules.utils.BasicShellCommandHandler.exec(BasicShellCommandHandler.java:97)
at android.os.ShellCommand.exec(ShellCommand.java:38)
at com.android.server.pm.PackageManagerService$IPackageManagerImpl.onShellCommand(PackageManagerService.java:6553)
at android.os.Binder.shellCommand(Binder.java:1075)
at android.os.Binder.onTransact(Binder.java:895)
at android.content.pm.IPackageManager$Stub.onTransact(IPackageManager.java:4352)
at com.android.server.pm.PackageManagerService$IPackageManagerImpl.onTransact(PackageManagerService.java:6537)
at android.os.Binder.execTransactInternal(Binder.java:1351)
at android.os.Binder.execTransact(Binder.java:1282)

good or wrong ?
 

Endercraft

Moderator (& bug finder :D)
Yeah that's not supposed to happen.
Permission error when granting

On some devices there can be an error granting ADB permission that looks like this:

Neither user 2000 nor current process has android.permission.GRANT_RUNTIME_PERMISSIONS

In this case please check your phone's developer options and look for a setting called "Disable permission monitoring" or "USB debugging (Security settings)" or anything similar and enable/disable it as appropriate.
 

satlover

New member
maybe it doesn't works with hyperOS ?
 

Attachments

  • Screenshot_2024-02-22-19-02-58-743_com.android.settings-edit.jpg
    Screenshot_2024-02-22-19-02-58-743_com.android.settings-edit.jpg
    144.1 KB · Views: 3
Top