adb-reset-permissions.bash: add adblocking and sleeping

This commit is contained in:
Aminda Suomalainen 2025-08-12 08:20:47 +03:00
parent 467bacb209
commit e1ea7d1815
Signed by: Mikaela
GPG Key ID: 99392F62BAE30723

View File

@ -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