This is a Magisk module used to boot update custom subscription hosts after booting.
You can download the release installer zip file and install it via the Magisk Manager App.
-
Please fill in the subscription address after installation.
-
Open
Systemless Hostsin Magisk Manager settings. -
Your subscription will be updated after every reboot.
- Fill in your subscription address in
/sdcard/Android/AnyHosts/hosts_link
- Fill in the directory of the local hosts file in
/sdcard/Android/AnyHosts/local_hosts
-
Fill your own rules in
/sdcard/Android/AnyHosts/black_list -
Fill in rules.
-
Fill in the
IPwill block all thisIP. (Fill in127.0.0.1to block all thisIP) -
Fill in the
DomainNameblock all and thisDomainNamerelated entry. (Fill in thegoogleto block all rules that contain this field) -
Fill in the
IP+DomainNameplease use=instead of space. (Block127.0.0.1 www.google.complease fill in the127.0.0.1=www.google.com)
-
Fill your own rules in
/sdcard/Android/AnyHosts/user_rules -
Please use
=instead of spaces
-
Parameters selected during installation
-
Modify the parameters in
/sdcard/Android/AnyHosts/select.inito control the boot-up update and start-up timing update
-
To control the opening and closing, modify the parameter of
regular_updateinCron.initoon/off, and then executeRegular_update.shto switch the working state -
Modify the parameters in
/sdcard/Android/AnyHosts/Cron.iniand executeRegular_update.shto apply.
- Uninstall the module via Magisk Manager App.
- The order of file executio is as follows
subscription hosts & local_hosts ---> black_list ---> user_rules
- Possible problems:
1.If you fill in the black_list 127.0.0.1=www.google.com and then fill in this entry in the user_rules, then there will be 127.0.0.1 www.google.com in the final hosts file
2.If you fill in the DomainName of the rule in the user_rules in the subscription hosts & local_hosts, then the relevant rules in the subscription hosts & local_hosts in the final hosts file will be deleted and the rules in the user_rules will be used
- Sh the following commands with su permissions
locale=$(getprop persist.sys.locale|awk -F "-" '{print $1"_"$NF}')
[[ ${locale} == "" ]] && locale=$(settings get system system_locales|awk -F "," '{print $1}'|awk -F "-" '{print $1"_"$NF}')
echo "${locale}"
- Create an output name file with
.inisuffix, translate related variables and submit pr