I'm building an AOSP-based ROM (specifically crDroid) and I want to enforce a specific DNS server (e.g., CleanBrowsing) at the system level, so that:
- The system always uses my specified DNS servers
- Users (without root) cannot change or override this DNS setting
- Private DNS settings are disabled or ignored
- The configuration persists across reboots and different networks (Wi-Fi/mobile)
What I’ve considered so far:
- Hardcoding DNS in
system/netd/resolv/DnsResolver.cpp
or a similar layer