Skip to content

Instantly share code, notes, and snippets.

@navhaxs
Last active June 5, 2019 22:27
Show Gist options
  • Save navhaxs/9b3b7a35d39e9c066825c5665bca88d6 to your computer and use it in GitHub Desktop.
Save navhaxs/9b3b7a35d39e9c066825c5665bca88d6 to your computer and use it in GitHub Desktop.
Magisk boot script to freeze spotify android app until sd card is ready: /data/adb/service.d/spotify.sh and don't forget to chmod 755
#!/system/bin/sh
A=$(getprop sys.boot_completed | tr -d '\r')
while [ "$A" != "1" ]; do
sleep 2
A=$(getprop sys.boot_completed | tr -d '\r')
done
pm disable com.spotify.music
A=$(find /storage/* -maxdepth 0 | wc -l)
while [ "$A" != "3" ]; do
sleep 8
A=$(find /storage/* -maxdepth 0 | wc -l)
done
pm enable com.spotify.music
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment