How to block a URL instead of whole domain - Xiaomi Redmi Note 3 Questions & Answers

Hey Guys,
Please tell me how can i block http://foobar.com/abc.php instead of blocking whole http://foobar.com.
I have tried adding 127.0.0.1 foobar.com/abc.php to the host file but it is not working. It is still loading for me.
Any help would be appriciated.

Related

[GUIDE] Howto Block/Unblock websites / ad servers without any app

ROOT ACCESS NEEDED
I found this method when I was trying to acces neobux.com. I tried to access this site. But I couldn't do it. Whenever I entered the address it always redirected me to localhost (127.0.0.1) I tried every browser, but only opera mini gave access to this. I thought about this & I found this. Opera mini app access internet from opera server. It doesn't directly get the webpage to our device. I spent so much time finding a solution and finally got it!
There's a file in android devices called "hosts" in "system/etc" folder. You have to open it in any text editor. There you will find lines like this,
Code:
127.0.0.1 www.counted.de
127.0.0.1 www.counter-gratis.com
127.0.0.1 www.counter-x.com
127.0.0.1 www.counter.bloke.com
127.0.0.1 www.counter.cz
It's syntax is- 127.0.0.1 website_name
127.0.0.1 is localhost
Think that you want to block facebook. Only thing you have to do is add "127.0.0.1 www.facebook.com" line into the file & save it. If you want to unblock any site just delete the lines containing the website name and save. That's all :good:
RavinduSha said:
ROOT ACCESS NEEDED
If you want to unblock any site just delete the lines containing the website name and save. That's all :good:
Click to expand...
Click to collapse
what the meaning of this bro?
AbaiiFunk said:
what the meaning of this bro?
Click to expand...
Click to collapse
This means your device has to be rooted
Check my rooting guide to find out how to root. If you don't know what root is, use the search or Google
Sent from my Nexus 4 running Android 4.3
Didn't work. What else is needed after saving the file?

[Q] How to redirect with hotspot mobile

Hi All!
i've got a project but actually i can't do it without an help, so please help me!
i want to create a mobile hotspot on my Nexus, when someone connect to it, automatically it must be redirected to a link or server, i have 2 choice, redirect to a example.aruba.com or redirect to a server created with kWs on my Nexus...
1- i tried to redirect to the aruba's link but it was redirected to the home of Aruba and not on my site.
2-i tried to start a server with kWs, put the html file in the phone and setted the "home directory" of kWs in mnt/sdcard/ where the html is locateda, but when i redirect with ds ploit to the ip and port of my server on the Nexus nothing happens...
please tell me what is the best solution and how to make it works.

Request: Need some files

Hey Everyone,
I was needing the following stock files, if someone would be so kind as to help me out:
system/app/GoogleHome.apk
system/priv-app/Velvet.apk
system/lib/libgoogle_hotword_jni.so
system/lib/libgoogle_recognizer_jni_l.so
Thanks!
I have most of the files on my sftp server (GoogleHome.apk is not in the stock image). Address is crackrobba.no-ip.biz, port is 2222, username is 'xda', password is 'xdapassword'. Attached a screenshot of AndFTP settings page just in case.

Host file edit not blocking reddit properly

Hi thanks so much in advance for your help.
My phone is a Moto z2 play
So I unlocked my bootloader and rooted my phone with the intention of blocking sites that make me unproductive; all as part of a new year's resolution. I used Magisk too root and am able to use ES file explorer to edit the host file and I've put in different lines '127.0.0.1 "website name"' in order to block all the sites that make me unproductive. This however doesn't work well for reddit.
What I'm seeing is that if I enter reddit.com in my url I'll be blocked. But if I am linked to reddit via google then it'll circumvent the block and I'll have access. From here on I can change the url to any subreddit and access it and the block doesn't work.
I've tried blocking with the prefixes www, m., https:// etc. it still doesn't block google links. Do any of you know what I can do to fix this?
Thanks again!

How to block apps from getting internet access in Android AOSP source code?

Anyone know how to block apps from accessing the internet in Android AOSP code automatically for Android 9-11?
I found some patch but don't understand how it works.
Just need an easy way to add the package names to block in the patch or to feed an external file like system/etc/blocked_apps.xml to the patch.
Patch
https://pastebin.com/0BsfEECq
For websites it's easy since you can just add them to the host file.
Android's host file is the correct place.
The hosts file is used by Android to map IP addresses to host names or domain names. This file acts as a local DNS service for your Android device, and it overrides the mappings from the DNS server that your Android device is connected to, through the network.
Here an example how to block all connections to Google.
So all you have to know which URL the app in question tries to connect to. This you can find it out with connection tracking tools, e.g. Packet Capture app, and even via Android's LOGCAT.

Categories

Resources