Block websites at system level? Android way? Like hosts file in windows?


Recommended Posts

Hi. I want to block certain sites on my phone but I don't want an app that will keep track of all my site visits.

 

Can it be done, like in windows, by redirecting certain urls to local host at system level ?

 

I am on unjailbroken android 11 phone

  • +Random Stranger changed the title to Block websites at system level? Android way? Like hosts file in windows?

Not that I know of. The only thing I could think of is to find some sort of DNS service that you can use to block websites and then set that up as the Private DNS provider on your mobile. I use PiHole myself at home but that does not work when I leave the house.

On 18/01/2022 at 01:09, MarkusDarkus said:

Not that I know of. The only thing I could think of is to find some sort of DNS service that you can use to block websites and then set that up as the Private DNS provider on your mobile. I use PiHole myself at home but that does not work when I leave the house.

Well - this might work since I mostly want to stop procrastinating at home - and wasting time.

 

Outside home is less important

 

 

But surely there must be a way????

  • 4 weeks later...
On 18/01/2022 at 00:45, E.Worm Jimmy said:

Hi. I want to block certain sites on my phone but I don't want an app that will keep track of all my site visits.

 

Can it be done, like in windows, by redirecting certain urls to local host at system level ?

 

I am on unjailbroken android 11 phone

 

https://www.google.com/amp/s/www.modmy.com/how-modify-hosts-file-your-android-device%3famp

  • Like 1

android does have a hosts file but it requires root to modify (Adaway uses the hosts file and that's why it requires root to use as example)

 

if there's a way to modify the hosts file without root then I'm not personally aware of it.

 

note: I can't open techbeck's link here at work to see if it's a non-root method

On 15/02/2022 at 09:26, Brandon H said:

android does have a hosts file but it requires root to modify (Adaway uses the hosts file and that's why it requires root to use as example)

 

if there's a way to modify the hosts file without root then I'm not personally aware of it.

 

note: I can't open techbeck's link here at work to see if it's a non-root method

Try this.   

 

https://www.modmy.com/how-modify-hosts-file-your-android-device

 

Posts a method of non root but I personally have not tested it.  The hosts file as something that's always been on Android I believe. I've been messing with it for a while now.

On 15/02/2022 at 13:00, techbeck said:

The hosts file as something that's always been on Android I believe

oh yeah, with Android's Linux/Unix origins it's always had a hosts file.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • No. The file manager is a lost cause. After all, its dev receives all the undeserved praise he could evre wish from Neowin, without having actually earned it. This has never lead to improvements.
    • TechPowerUp GPU-Z 2.70.0 by Razvan Serea GPU-Z is a lightweight system utility designed to provide vital information about your video card and graphics processor. At launch, it automatically scans your system and reports the card name, GPU, release date and transistors, BIOS version, ROPs, memory type, and memory size. Main Features: Supports NVIDIA, AMD, ATI and Intel graphics devices Displays adapter, GPU and display information Displays overclock, default clocks and 3D clocks (if available) Includes a GPU load test to verify PCI-Express lane configuration Validation of results GPU-Z can create a backup of your graphics card BIOS No installation required, optional installer is available Support for Windows XP / Vista / Windows 7 / Windows 8 / Windows 10 (both 32 and 64 bit versions are supported) GPU-Z 2.70.0 changelog: Improved kernel driver security Added die size for Qualcomm Adreno 741 Added support for NVIDIA RTX 6000D, RTX Pro 500 Blackwell Embedded, Tesla V100-DGXS-32GB, PG500-216 Added support for Intel Arc Pro B70, B65, A60 ES, Alder Lake ES Added support for Qualcomm Snapdragon X2 Elite, 778G/782G Added vendor detection for HKC/Sambada, AWES Download page: GPU-Z 2.70.0 | 11.1 MB (Freeware) View: GPU-Z Website | Screenshot Get alerted to all of our Software updates on Twitter at @NeowinSoftware
    • I know I won't ever be using it to make my game. I'd rather pay humans.
    • Nah. For every indie dev that needs to create code for "stuff" or textures, it's a godsend enabler to possibly tackle a project that you may not otherwise. The end result and testing will tell the truth if everything works or doesn't, or a game is just mediocre slop, but now these tools are now there and it's the developer's duty to judge the outcome, and even more so for pro studios. And you gotta remember that they will be at an early stage.
    • whoosh my comment went over your head. Enjoy your notchless 3:2 OLED device
  • Recent Achievements

    • One Month Later
      Vincian earned a badge
      One Month Later
    • First Post
      Jocimo earned a badge
      First Post
    • Week One Done
      suprememobiles48 earned a badge
      Week One Done
    • One Month Later
      Windows Guy earned a badge
      One Month Later
    • One Month Later
      Prasann earned a badge
      One Month Later
  • Popular Contributors

    1. 1
      +primortal
      507
    2. 2
      +Edouard
      159
    3. 3
      PsYcHoKiLLa
      86
    4. 4
      Steven P.
      67
    5. 5
      neufuse
      64
  • Tell a friend

    Love Neowin? Tell a friend!