Last active
May 14, 2020 09:17
-
-
Save larsvilhuber/548bcc3154ce9d9f6967fa8f96ca0da4 to your computer and use it in GitHub Desktop.
Add a Data Toggle Tile to Samsung devices without root
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Based on https://www.xda-developers.com/how-to-restore-mobile-data-quick-settings-tile-toggle-on-samsung-galaxy-devices/ | |
# This will work with minor adjustments to your installation of the Android SDK or wherever you put adb. | |
# Should work on Linux and Mac, but only tested on Linux | |
PATH=../android-sdk-linux/platform-tools:$PATH | |
outfile=list.$(date +%F) | |
adb devices | |
echo "Do you see your device? [y|N]" | |
read answer | |
case $answer in | |
y) | |
echo "Continuing" | |
;; | |
*) | |
echo Sorry | |
exit 2 | |
;; | |
esac | |
[[ -f $outfile ]] && rm -i $outfile | |
adb shell settings get secure sysui_qs_tiles > $outfile | |
#echo "Old Contents of sysui_qs_tiles" | |
#cat $outfile | |
echo "==============================" | |
cat $outfile | sed 's/DormantMode,/DormantMode,MobileData,/' > ${outfile}.new | |
echo "Changes we will be making" | |
diff $outfile ${outfile}.new | |
echo "==============================" | |
echo "Good to go? [y|N]" | |
read answer | |
case $answer in | |
y) | |
echo "Continuing" | |
;; | |
*) | |
echo Sorry | |
exit 2 | |
;; | |
esac | |
# Uncomment the following line once you are certain that everything is right | |
# Until then, this program does nothing to your Android device!!! | |
#adb shell settings put secure sysui_qs_tiles "$(cat ${outfile}.new)" | |
echo Done. Settings are now like this: | |
adb shell settings get secure sysui_qs_tiles |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi, would you make Data Saver visble into quick setting? Im using Samsung galaxy note9 but cant make it working!
thanks so much!