Skip to content

Instantly share code, notes, and snippets.

@Geofferey
Created August 28, 2019 08:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Geofferey/3fc6ac4439761b17b514bbd04864e122 to your computer and use it in GitHub Desktop.
Save Geofferey/3fc6ac4439761b17b514bbd04864e122 to your computer and use it in GitHub Desktop.
Start Android App Service at boot using init.d
#!/system/bin/sh
until [[ $(getprop sys.boot_completed) = 1 ]] && [[ $(getprop dev.bootcomplete) = 1 ]] && [[ $(getprop service.bootanim.exit) = 1 ]] && [[ $(getprop init.svc.bootanim) = stopped ]] && [[ -d /sdcard/Android ]]; do
sleep 3
log "[init.d] - Waiting for boot animation exit & data decryption to complete before continuing..."
done
sleep 1
log "[init.d] - Attempting to start LMT TouchService..."
until am startservice com.noname81.lmt/.TouchService; do
sleep 1
log "[init.d] - Re-attempting to start LMT TouchService..."
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment