Why does the app Automate require ADB?
3
votes
1
answer
1090
views
I need to set up an app-killing service for **unrooted** Android 9 devices using [Automate](https://llamalab.com/automate/) . The service has to launch automatically at device start and keep sending kill commands to selected system (!) services at regular intervals unless said services are in focus/in the foreground.
Unfortunately, setting up and running Automate seems unnecessarily [cumbersome](https://llamalab.com/automate/doc/adb.html) . I have used
adb
extensively, so no problem there. However, [step 5 in the setup manual](https://llamalab.com/automate/doc/adb.html#setup) says
> 5. On the PC, execute the shell command adb tcpip 5555
. **This step has to be repeated after every device reboot.**
[Also](https://llamalab.com/automate/doc/adb.html#privileged_service) :
> 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.
Having to hook up a *mobile* device to a PC after each and every reboot (e.g. due to empty battery) is completely impractical and contradicts the use of Android itself. Is there a way to set up Automate either 100% locally from within Android, or at least only once from a PC at the very beginning and then have the app run automatically even after a device reboot?
I have already set up a simple Automate flow as a minimal example and granted all necessary privileges, such as access to the SD card, executing shell commands, and access to Samsung accessibility service. Also, USB debugging is enabled in the developer options. But when running the flow, I get the following errors in the log output:
Flow beginning
Delay
App in foreground?
App kill
Failed to start privileged service
java.util.concurrent.CancellationException: Please execute: sh /sdcard/Android/data/com.llamalab.automate/cache/start.sh
java.util.concurrent.TimeoutException: Service startup timeout
Stopped by failure
Asked by srhslvmn
(299 rep)
Mar 7, 2024, 09:10 PM
Last activity: Mar 10, 2024, 09:13 PM
Last activity: Mar 10, 2024, 09:13 PM