I am an avid user of LineageOS, both for the privacy benefits and the long term software support and headache / distraction free software experience. To limit my usage of social media (especially YouTube) and excessive impulsive reading of the news, I like to put in Adblock rules as firebreaks. The problem is that I would habitually ignore the adblock prompts and continue to the site regardless, so they ended up being mostly ineffective.
To properly block these sites, I would like to use a hosts file method. I however don’t run any root solution on my device (mostly because I forget to update Magisk every OS update!). So to edit the hosts file directly, I used the following method:
mount -o rw,remount /mnt/system
/tmp
busybox vi /mnt/system/system/etc/hosts
to edit the file and add the domains one would like to blockThe irony is this still requires manually redoing every OS update (once a month), but its a tradeoff for not running root on my device.