Created
August 15, 2022 18:17
-
-
Save Howard20181/cea5dcb86c7eb08725219f1b88e24a0c to your computer and use it in GitHub Desktop.
Put it to `/data/adb/service.d`
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 | |
# start after emulated storage is setup | |
while [ ! -d "/storage/emulated/0/Android" ]; do | |
sleep 3 | |
done | |
gethostip() { | |
ip=$(ip route list match 0 table all scope global | cut -F3) | |
if [ -z "$ip" ]; then | |
return 1 | |
else | |
echo $ip | |
fi | |
} | |
while ! (gethostip); do | |
sleep 3 | |
done | |
settings put global http_proxy $(gethostip):7890 | |
settings put global https_proxy $(gethostip):7890 | |
settings put global window_animation_scale 1 | |
settings put global transition_animation_scale 1 | |
settings put global animator_duration_scale 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment