[Android Apps and Games] zgfg:
Good point about resolv.conf but please make sure how you name the file (not resolve.conf).

Also, domainname.local is placeholder for your domain, and you can IMO better omit (comment it out), hence I tried with this resolv.conf:

## Systemless Hosts must be enabled in Magisk
## Put this file as /data/adb/modules/hosts/system/etc/resolv.conf
## Reboot and Magisk will mount to /etc/resolv.conf

# domain my.domain.local
# search my.domain.local

# Use Quad9 DNS servers
nameserver 9.9.9.9
nameserver 149.112.112.112

# Enable DNS debugging
options RES_DEBUG

nsswitch.conf:

## Systemless Hosts must be enabled in Magisk
## Put this file as /data/adb/modules/hosts/system/etc/nsswitch.conf
## Reboot and Magisk will mount to /etc/nsswitch.conf

# Use local /etc/hosts file first, then DNS service
hosts: files dns

and system.prop:

## Systemless Hosts must be enabled in Magisk
## Put this file as /data/adb/modules/hosts/system.prop
## Reboot and Magisk will mount the properties

# Quad9 DNS servers
net.rmnet0.dns1=9.9.9.9
net.rmnet0.dns2=149.112.112.112
net.rmnet1.dns1=9.9.9.9
net.rmnet1.dns2=149.112.112.112
net.rmnet2.dns1=9.9.9.9
net.rmnet2.dns2=149.112.112.112
net.wlan0.dns1=9.9.9.9
net.wlan0.dns2=149.112.112.112
net.ppp0.dns1=9.9.9.9
net.ppp0.dns2=149.112.112.112
net.eth0.dns1=9.9.9.9
net.eth0.dns2=149.112.112.112
dhcp.wlan0.dns1=9.9.9.9
dhcp.wlan0.dns2=149.112.112.112
net.gprs.dns1=9.9.9.9
net.gprs.dns2=149.112.112.112
net.dns1=9.9.9.9
net.dns2=149.112.112.112
net.pdpbr1.dns1=9.9.9.9
net.pdpbr1.dns2=149.112.112.112

rebooted, checked and both conf files were mounted together with the properties changed by system.prop but still all that together did not help -

again, on the WLAN network where DHCP pushes the DNS server 8.8.8.8 that server was still used, causing my Chrome to ignore /etc/hosts file and to pop-up ads

Btw, since my hosts file is generated by AdAway, it is syntactically correct, all metadata (date, time, hosts sources used, etc) at the top are properly commented out:

## Systemless Hosts must be enabled in Magisk
## This file will be generated by AdAway in root mode as /data/adb/modules/hosts/system/etc/hosts
## Reboot and Magisk will mount to /etc/hosts

# This hosts file has been generated by AdAway on: 2023-04-19 08:27:35
# Please do not modify it directly, it will be overwritten when AdAway is applied again.

# This file is generated from the following sources:
# - myAllowedList local:content://com.android.externalstorage.documents/document/primary%3AXiaomi%20Mi%2011%20Lite%205g%20NE%20(Lisa)%2FBackup%2FAdAway%2FmyAllowedList.txt
# - myBlockedList local:content://com.android.externalstorage.documents/document/primary%3AXiaomi%20Mi%2011%20Lite%205g%20NE%20(Lisa)%2FBackup%2FAdAway%2FmyBlockedList.txt
# - AdAway official hosts:https://adaway.org/hosts.txt
# - Pete Lowe blocklist hosts:https://pgl.yoyo.org/adservers/serverlist.php?hostformat=hosts&showintro=0&mimetype=plaintext
# - FadeMind hosts:https://raw.githubusercontent.com/FadeMind/hosts.extras/master/add.2o7Net/hosts
# - PolishFiltersTeam KADhosts:https://raw.githubusercontent.com/PolishFiltersTeam/KADhosts/master/KADhosts.txt
# - StevenBlack Alternate hosts:https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling-porn/hosts
# - StevenBlack Unified hosts:https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts
# - GoodbyeAds Xiaomi extension:https://raw.githubusercontent.com/jerryn70/GoodbyeAds/master/Extension/GoodbyeAds-Xiaomi-Extension.txt
# - AdGuard DNS:https://raw.githubusercontent.com/r-a-y/mobile-hosts/master/AdguardDNS.txt
# - 4PDA Hosts:https://schakal.ru/hosts/hosts.txt
# - Someonewhocares hosts:https://someonewhocares.org/hosts/hosts
# - Winhelp2002 hosts:https://winhelp2002.mvps.org/hosts.txt
# - Hostsfile.org hosts:https://www.hostsfile.org/Downloads/hosts.txt

127.0.0.1 localhost
::1 localhost

0.0.0.0 0-0-stagemn.net.daraz.com
:: 0-0-stagemn.net.daraz.com
0.0.0.0 0-000.store
:: 0-000.store

# Etc, etc (additional 319 K blocked sites)

And dnsmasq -d now correctly processes the resolv.conf and hosts files:

dnsmasq: started, version 2.51 cachesize 150
dnsmasq: compile time options: IPv6 GNU-getopt no-I18N DHCP no-scripts

dnsmasq: reading /etc/resolv.conf
dnsmasq: using nameserver 9.9.9.9
dnsmasq: using nameserver 149.112.112.112

dnsmasq: read /etc/hosts - 637204 addresses

Originally, both my Xiaomi phones with A11 and A12 come without nsswitch.conf and resolv.conf files (and now when provided and mounted, the files are ignored)

EDIT:

Later, by properly retesting with restarting Chrome I found that for me the Cloudeflare DNS servers 1.1.1.1 and 1 0.0.1 act like Google DNS servers 8.8.8.8 and 8.8.4.4 - all of them cause my Chrome to ignore the local hosts file (hence, there is no blocking/redirection and Chrome pops-out ads)

Instead, I have to choose from the following DNS servers (for any of them the local hosts file with blocking/redirection keeps the precedence):

Quad9 DNS:

9.9.9.9

149.112.112.112

DNSWatch:

84.200.69.80

84.200.70.40

OpenDNS:

208.67.222.123

208.67.220.123

OpenNIC:

185.121.177.177

169.239.202.202