Welcome to Headwind MDM Q&A, where you can ask questions and receive answers from other members of the community.

Please do not post bug reports, missing feature requests, or demo inquiries. If you have such an inquiry, submit a contact form.

0 votes

Could you add android.permission.CALL_PHONE permission so we can remotely control via runCommand the call forwarding of the devices?

For example schedule a daily action:

{action: "android.intent.action.CALL", data: "tel:%23%23002%23"}

04-24 16:45:02.029 2482 8968 D HeadwindMDM: Calling intent: android.intent.action.CALL 04-24 16:45:02.036 2482 8968 W HeadwindMDM: Calling intent failed: Permission Denial: starting Intent { act=android.intent.action.CALL dat=tel: flg=0x10008000 cmp=com.android.server.telecom/.components.UserCallActivity } from ProcessRecord{c798f3a 2482:com.hmdm.launcher/u0a118} (pid=2482, uid=10118) requires android.permission.CALL_PHONE

C:\platform-tools\adb.exe shell pm grant com.hmdm.launcher android.permission.CALL_PHONE Security exception: Package com.hmdm.launcher has not requested permission android.permission.CALL_PHONE java.lang.SecurityException: Package com.hmdm.launcher has not requested permission android.permission.CALL_PHONE at com.android.server.pm.permission.BasePermission.enforceDeclaredUsedAndRuntimeOrDevelopment(BasePermission.java:398) at


Thank you in advance!

ago by (180 points)
edited ago by

1 Answer

0 votes

Headwind MDM does not have call activities and cannot execute commands to forward calls.

I guess you need to explicitly indicate the package name for the call intent:

Push command type: runApp

Payload: {pkg: "com.android.server.telecom", action: "android.intent.action.CALL", data: "tel:%23%23002%23"}

ago by (45.5k points)
04-28 09:08:08.618  2482  3823 I HeadwindMDM: Got Push Message, type intent
04-28 09:08:08.627  2482 17057 D HeadwindMDM: Calling intent: android.intent.action.CALL
04-28 09:08:08.685  2482 17057 W HeadwindMDM: Calling intent failed: Permission Denial: starting
Intent { act=android.intent.action.CALL dat=tel:xxxxxx flg=0x10008000
cmp=com.android.server.telecom/.components.UserCallActivity } from ProcessRecord{c798f3a
2482:com.hmdm.launcher/u0a118} (pid=2482, uid=10118) requires android.permission.CALL_PHONE

I've tried with a simple android native app to check and this needs to be requested in android manifest: android.permission.CALL_PHONE

For example {pkg: "com.google.android.dialer", action: "android.intent.action.DIAL", data: "tel:%23%23002%23"} works, opens the app and dials the number perfectly, because android.intent.action.DIAL doesn't require the missing permission android.intent.action.CALL
...