MacroDroid Helper APK

sampleuserhere

Active member
I can execute it with just MacroDroid, with helper it says
Code:
Permission Denial: can't dump ActivityManager from from pid=22719, uid=10312 due to missing android.permission.DUMP permission
instead of package usage stats permission.

Indeed, it works just fine with MacroDroid. I was just testing the helper to see if it's 100% reliable or not, the native one has only about 90% successful rate.

Anyway, what happens to you is that you haven't granted android.permission.DUMP yet for the helper. Once granted, give dumpsys media_session a run, it will dump the correct data.

I forgot to mention that android.permission.PACKAGE_USAGE_STATS is not declared in the helper's manifest. So I couldn't grant the permission either by running pm grant com.arlosoft.macrodroid.helper android.permission.PACKAGE_USAGE_STATS.

Screenshot_2023-09-05-14-25-26-406_net.dinglisch.android.taskerm.png

This permission seems to be required to query existing apps information. The dev may need to add the said permission, otherwise dumpsys activity activities will always thrown an error.
 
Last edited:

MacroDroidDev

Administrator
Staff member
I've just uploaded a new helper file (1.12) which fixes an issue for Xiaomi users where it would always show the button to update the xiaomi helper file even when the latest is installed. No need to update if you have a non-Xiaomi device or everything is working ok.
 
Last edited by a moderator:

sampleuserhere

Active member
The helper file does not use PACKAGE_USAGE_STATS so their is no point trying to grant this,

Yes, exactly! I was just trying to prove that the permission is not declared. It's a different kind of "missing permission" than what Endercraft had at #260.

Anyway, PACKAGE_USAGE_STATS is required to execute dumpsys activity activities. See #259 below.

Running dumpsys activity activities via Shell Script returned:

Code:
Permission Denial: can't dump ActivityManager from from pid=17943, uid=10938 due to missing android.permission.PACKAGE_USAGE_STATS permission

Any chances you include this permission as well in the helper?

I have about 85-90% successful rate with Shell Script action, so I'd like to run a test with the helper instead.
 

RobW

New member
Thanks for the helper updates dev!

However i have reinstalled the new Xiaomi helper (1.3) and I still face the same issue where my macro won't turn off Bluetooth, the log shows as follows:

23-09-10 00:57:25 - [XiaomiHelper]: Please manually add Nearby Devices permission. 23-09-10 00:57:25 - [XiaomiHelper]: Bluetooth action failed: java.lang.SecurityException: Need BLUETOOTH permission 23-09-10 00:57:25 - [XiaomiHelper]: Bluetooth action failed: java.lang.SecurityException: Need BLUETOOTH permission 23-09-10 00:57:25 - [XiaomiHelper]: Received request to disconnect from: JBL Horizon (B8:D5:0B:5D:51:20) 23-09-10 00:57:24 - Sending request to xiaomi helper to configure wifi 23-09-10 00:56:52 - [XiaomiHelper]: Location permission granted[CODE]
 
Last edited:

Dimlos

Well-known member
Please check to see if the same permissions are granted as in my screenshot.
 

Attachments

  • App permissions.jpg
    App permissions.jpg
    199.1 KB · Views: 13
  • Other permissions .jpg
    Other permissions .jpg
    265.5 KB · Views: 14

Dimlos

Well-known member
If it is the same setting, try turning Nearby devices and Change Bluetooth connectivity off and on again.
 

RobW

New member
Thanks for the advice, however it seems worse now.
Code:
23-09-10 12:37:05 - [XiaomiHelper]: Please manually add Nearby Devices permission.
23-09-10 12:37:05 - [XiaomiHelper]: Bluetooth action failed: java.lang.SecurityException: Need BLUETOOTH permission
23-09-10 12:37:05 - [XiaomiHelper]: Bluetooth action failed: java.lang.SecurityException: Need BLUETOOTH permission
23-09-10 12:37:05 - [XiaomiHelper]: Received request to disconnect from: JBL Horizon (B8:D5:0B:5D:51:20)
23-09-10 12:37:05 - Sending request to xiaomi helper to configure wifi

I can verify nearby permissions is enabled etc.
 

Dimlos

Well-known member
It may be a good idea to turn permissions off and on several times, since it may appear that permissions have been granted but in fact they have not.
 

RobW

New member
Thanks again for your suggestions, however I did as you asked and disabled and enabled the permissions about 5 times each and still had the same alerts in the log. I did a full uninstall of macrodroid, MD Helper and Xiaomi Helper and reinstalled and still presents the same problem.

MI 11
MIUI Version: MIUI Global 14.0.6.0 (TKBEUM)
Android Version: 13 TKQ1.220829.002
Security Update Version: 2023-08-01
Model: M2011K2G
 

Dimlos

Well-known member
Sorry, Xiaomi may have problems only with certain devices.
I think you can get useful information from someone who has the same device.
 

Dimlos

Well-known member
It is unlikely, but I may be able to switch it with my home-made app.
This is a beginner's home-made app, so glitches may occur.
If you want to try this app at your own risk, please contact me via the conversation function.
 
Top