"Bluetooth set state" block will prompt "Allow Automate to enable Bluetooth? Deny/Allow"

209 views
Skip to first unread message

P.P.Foong

unread,
Feb 8, 2019, 11:25:19 PM2/8/19
to Automate
The "Bluetooth set state" block has been working well for my previous phones and tablets to automatically enable and disable Bluetooth based on condition set in Automate.

However, it will prompt for "Allow Automate to enable Bluetooth? Deny/Allow" before perform the task and continue with the flow in my new phone running Android 9.0. This user prompt has defeated the automation purpose.

I am not sure whether this user prompt is coming from Automate, or the Android system.

Is there any workaround or solution so that it will set the Bluetooth state without prompting the user, just like before?


Henrik "The Developer" Lindqvist

unread,
Feb 8, 2019, 11:27:54 PM2/8/19
to Automate
For what i know, it's an custom Huawei/Xiaomi "feature". I don't know if there's any workaround.

S377

unread,
Feb 18, 2025, 8:50:55 AM2/18/25
to Automate for Android
Hi,
Seems that it's still happening (I'm on a Xiaomi 14 with HyperOs 1).
Has a solution/workaround been found to avoid that prompt to showing up ?

Henrik "The Developer" Lindqvist

unread,
Feb 18, 2025, 10:09:28 AM2/18/25
to Automate for Android
Use the "Privileged" option for the "Bluetooth workaround" setting. Also, ensure to setup an "Privileged service start method" in settings, e.g. using the "Android Debug Bridge" option unless your device is rooted.

S377

unread,
Feb 18, 2025, 10:31:28 AM2/18/25
to Automate for Android
Yep, it did the trick! 🎉
Thank you very much !

PS: I'm rooted.

Leeroy

unread,
May 1, 2025, 3:09:33 PM5/1/25
to Automate for Android
Is there a way for this Privileged service start to work on non-rooted Huaweis? Trying with a P60 Pro.

Privileged service start via Android Debug Bridge fails in my case because there is no Wireless debugging option, only USB debugging in Developer options.
I tried to follow the instructions available at https://llamalab.com/automate/doc/adb.html
1. USB debugging
2. Confirm RSA key on phone
3. adb tcpip 5555
4. adb devices show device connected
5. `adb shell sh /sdcard/Android/data/com.llamalab.automate/cache/start.sh && echo Worked` confirms the script executed

Going back to Automate it's still stuck on "Follow the instructions shown on screen to pair Automate with ADB on this device". Rebooted phone, Privileged service start still disabled.

Use case is a button to connect to Bluetooth speakers and turn on Do Not Disturb. Both actions seem broken LOL. I couldn't have picked a more brittle script to rely on if I tried.

Henrik "The Developer" Lindqvist

unread,
May 1, 2025, 4:24:09 PM5/1/25
to Automate for Android
  1. Choose the "Manually" option as "Privileged service start method"
  2. On USB connected PC execute:
    adb shell sh /sdcard/Android/data/com.llamalab.automate/cache/start.sh
  3. Done. Run a flow a block with a using the Privileged service, e.g. the Shell command privileged.
Reply all
Reply to author
Forward
0 new messages