Android Debug Bridge (ADB) is a versatile toolset present on most Android devices that facilitates a variety of device actions, such as installing and debugging apps. Automate can use its features in multiple ways:
A device has to be configured before it allows ADB access. On Android 11+, simply enable the Wireless debugging option in system Developer settings, then Pair device with pairing code to authorize a connection, e.g. from a PC or Automate. On Android 10 or lower a USB connected PC is required:
adb
command-line tool.adb tcpip 5555
. This step has to be repeated after every device reboot.Warning! When a new ADB host connects or tries to pair, e.g. a PC or Automate, the user has to authorize. Never allow access when an unknown device tries to connect.
Choose Android Debug Bridge (ADB) as Privileged service start method in settings. On Android 5+, then follow the on screen instructions to pair/authorize Automate with ADB on the device. On Android 4.4 and lower, then follow the setup instructions.
If an EACCES SocketException
failure occurs, try disabling the system “Data Saver” feature, for just Automate or globally.
Once paired/authorized the service will start automatically when it’s first used, e.g. by a block using it, then run in the background until the system kills it, the device is rebooted, or the app is uninstalled or updated. On Android 10+ when using Wireless debugging the service will search for the port that ADB uses by its DNS Service Discovery (DNS-SD) announcement on the connected Wi-Fi network.
The privileged service can also be started Manually by a connected PC using the adb
command-line tool by executing:
adb shell sh /sdcard/Android/data/com.llamalab.automate/cache/start.sh
The privileged service uses a internal key-pair for authentication, it’s inaccessible to flows and not present on the public “key chain” in system Security settings. To revoke it, click the Forget privileged service ADB keys option in settings and/or the Revoke USB debugging authorizations in system Developer settings, or on Android 11+, the Wireless debugging screen in system Developer settings.
To make the service less unreliable:
adb tcpip 5555
on a USB connected PC.Either configure the privileged service to use Android Debug Bridge (ADB) then grant the permission in Privileges settings as any other, or execute its respective shell command on a connected PC:
adb shell pm grant com.llamalab.automate android.permission.CHANGE_CONFIGURATION
adb shell pm grant com.llamalab.automate android.permission.SET_VOLUME_KEY_LONG_PRESS_LISTENER
adb shell pm grant com.llamalab.automate android.permission.INTERACT_ACROSS_USERS
adb shell pm grant com.llamalab.automate android.permission.SET_PROCESS_LIMIT
adb shell appops set com.llamalab.automate MANAGE_ONGOING_CALLS allow
adb shell pm grant com.llamalab.automate android.permission.MODIFY_QUIET_MODE
adb shell pm grant com.llamalab.automate android.permission.WRITE_SECURE_SETTINGS
adb shell pm grant com.llamalab.automate android.permission.READ_LOGS
adb shell pm grant com.llamalab.automate android.permission.DUMP
Before the above commands take effect Automate may have to be restarted:
Some manufacturers require additional steps before development permissions can be granted:
Android 14 restricts installation of app APKs that "target" Android 5 or lower, e.g. like the Automate legacy extension,
but an official workaround
is provided to bypass this restriction using ADB. Download the APK to your PC then execute:
adb install --bypass-low-target-sdk-block FILENAME.apk