No description
Find a file
2024-12-22 20:35:07 +01:00
.gitignore Initial commit 2024-12-22 20:19:23 +01:00
go.mod Initial commit 2024-12-22 20:19:23 +01:00
go.sum Initial commit 2024-12-22 20:19:23 +01:00
main.go Retain availability 2024-12-22 20:35:07 +01:00
Makefile Initial commit 2024-12-22 20:19:23 +01:00
README.md Initial commit 2024-12-22 20:19:23 +01:00

Setup

Root android with magisk

Install busybox

Create init script at /data/adb/service.d/mqtt2exec.sh

#!/system/bin/sh
/system/xbin/start-stop-daemon -S -b /system/xbin/mqtt2exec -- tcp://ENDPOINT:1883 CLIENT_ID USERNAME PASSWORD
exit 0

Set it as executable: chmod +x /data/adb/service.d/mqtt2exec.sh

Install binary:

adb push mqtt2exec /storage/emulated/0/mqtt2exec
adb shell
su
mv /storage/emulated/0/mqtt2exec /system/xbin/mqtt2exec
chmod +x /system/xbin/mqtt2exec

Reboot :)