From e1ea7d18155a37372fa4aa8b3df3539194587fcf Mon Sep 17 00:00:00 2001 From: Aminda Suomalainen Date: Tue, 12 Aug 2025 08:20:47 +0300 Subject: [PATCH] adb-reset-permissions.bash: add adblocking and sleeping --- bash/adb-reset-permissions.bash | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/bash/adb-reset-permissions.bash b/bash/adb-reset-permissions.bash index d1e6ab3..807f2f5 100755 --- a/bash/adb-reset-permissions.bash +++ b/bash/adb-reset-permissions.bash @@ -1,7 +1,16 @@ #!/usr/bin/env bash set -x + +# Enable adblocking DNS-over-TLS +(adb "$@" shell settings put global private_dns_mode hostname &) +(adb "$@" shell settings put global private_dns_specifier noads.joindns4.eu &) +(adb "$@" shell cmd device_config put netd_native doh 1 &) + +sleep 5 + # As the GUI method did nothing for me, this will hopefully reset all # permissions of apps on an Android device. adb "$@" shell pm reset-permissions +sleep 5 adb "$@" reboot set +x