Last active
May 15, 2022 15:20
-
-
Save MrCarb0n/1f3be90056ff8c238fc15ba8acb13f0a to your computer and use it in GitHub Desktop.
Yellow flashlight disabler for RedmiNote4 / mido
This file contains hidden or 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
#!/system/bin/sh | |
# Yellow flashlight disabler for RedmiNote4 (mido) | |
# Author: Tiash (@MrCarb0n) <[email protected]> | |
# Gist: https://gist.github.com/1f3be90056ff8c238fc15ba8acb13f0a | |
F=/data/adb/service.d/YellowFlashDisabler.sh | |
echo "#!/system/bin/sh | |
# Yellow flashlight disabler for RedmiNote4 (mido) | |
# Author: Tiash (@MrCarb0n) <[email protected]> | |
# Gist: https://gist.github.com/1f3be90056ff8c238fc15ba8acb13f0a | |
# Check if boot completed (in seconds) | |
while [ \"\$(getprop sys.boot_completed)\" != \"1\" ]; do | |
sleep 1 | |
done | |
# Decrease value to "0" to disable yellow flash | |
for i in led:torch_1 led:flash_1 | |
do | |
echo 0 > /sys/class/leds/\$i/max_brightness | |
done | |
# Execution done! | |
exit 0" > $F && chmod +x $F && sh $F |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment