Why is the script need to start pre-boot?
the script enables debug mode allowing 123autoit to inject inputs on device. This script runs only in it's own cycle, once the cycle is break as in phone reboot, debug mode is deactivated and hence 123autoit will no longer function for the Automation part.
if you have trouble running the script, please let me know i will do my best to help you.
on the other hand you can try the following solution, if non-root method is not for you.
Solution 1: go ROOT and use the root version
Solution 2: use PC Nox Emulator and use the Root Version (http://123autoit.blogspot.tw/2016/12/nox-emulator-setting-nox.html)
Solution 3: UNCONFIRMED
there might be a way of bypassing it, not proven, theoretically works.
1) Prepare 2 mobile phone, Similar Android OS (4.4+)
2) OTG cable to hook to both device (the host must have the script installed once)
A: Hosted device (with daemon script installed once, and rebooted)
B: Slave device (no need to install script)
(both need to enable developer mode and ADB connection)
3) once they are connected, go to slave device start a terminal
and type: adb shell
4) you should see A Hosted Device has a pop ups, (make sure to confirm it)
5) once you get into the console, type
and then type
ps -x|grep autoit-native
just to confirm if the service is started.
6) start Hosted device with 123autoit-non Root.
What's in the script, and what does it do?
is kind of a trade secret, anyway all it does is Establish connection. allow Input injection as if you are using ADB debug mode. That's it.