Last active
August 28, 2022 00:48
-
-
Save serianox/499d122e53e47c1eaad5 to your computer and use it in GitHub Desktop.
Very basic script for Android to set Google public DNS instead of mobile operator DNS
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/sh | |
# create a small script /sdcard/change-dns.sh that configures Google public DNS (requires to be run as root) | |
adb shell "echo \"#\0041/system/xbin/bash\" > /sdcard/change-dns.sh" | |
adb shell "echo \"su\" >> /sdcard/change-dns.sh" | |
adb shell "echo \"setprop net.dns1 8.8.8.8\" >> /sdcard/change-dns.sh" | |
adb shell "echo \"setprop net.dns2 8.8.4.4\" >> /sdcard/change-dns.sh" | |
adb shell "echo \"setprop net.rmnet0.dns1 8.8.8.8\" >> /sdcard/change-dns.sh" | |
adb shell "echo \"setprop net.rmnet0.dns2 8.8.4.4\" >> /sdcard/change-dns.sh" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment