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 Hosts
in 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
IP
will block all thisIP
. (Fill in127.0.0.1
to block all thisIP
) -
Fill in the
DomainName
block all and thisDomainName
related entry. (Fill in thegoogle
to block all rules that contain this field) -
Fill in the
IP
+DomainName
please use=
instead of space. (Block127.0.0.1 www.google.com
please 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.ini
to control the boot-up update and start-up timing update
-
To control the opening and closing, modify the parameter of
regular_update
inCron.ini
toon/off
, and then executeRegular_update.sh
to switch the working state -
Modify the parameters in
/sdcard/Android/AnyHosts/Cron.ini
and executeRegular_update.sh
to 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
.ini
suffix, translate related variables and submit pr