Created
March 21, 2022 16:35
-
-
Save DerGoogler/c777fa4d58afdd375a3b8ce6dc587a17 to your computer and use it in GitHub Desktop.
Fake Shell Android Charger. Battery state will automatically reseted after successfully execution.
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
################################ | |
# 2022 (c) Der_Googler # | |
# Fake Shell Android Charger # | |
################################ | |
i=1 | |
while [ $i -le 100 ] | |
do | |
# Change the battery steps every by one | |
cmd battery set level $i | |
echo "Battery level => $i" | |
# Sleep to avoid an direct set | |
sleep 0.3 | |
i=$(($i+1)) | |
done | |
echo "Battery state will be rested in 2 sec." | |
# Sleep after successfully execution | |
sleep 2 | |
echo "Reset battery state" | |
# Reset the battery to the default sate | |
cmd battery reset | |
echo "Battery state successfully rested" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Note: This script requires Root (SuperUser) access and the
cmd
binary for Android. Without this will not work.Please make sure you're on the SuperUser level while you executes this script.