yashsingh1/xdaforums huggingface dataset:
[Android Software Development] LarappsOfDongle:
Update

- Hosts is now present here: ratchetpanda.github.io/hosts.txt

Anyone can contribute and add lines.

- Combined many more sources so we are up to 3mb with 90000 unique entries.

- Located at /sdcard/hosts so you don't have to have root to edit it.

- Hosts can be updated by running hosts in terminal

If rooted type su before hosts

If not rooted a reboot is needed after updating.

- Installs Magisk if not present.

Newest is attached and I've also added it to OP.

- A small tutorial on auto updating using Tasker or another automation app.

1. Set event to whatever you want.

2. Set task to Run Shell and set the code to run to 'hosts'.

3. If you have root make sure to check the 'use root' option.

Hope you guys like it! :good:
[Android Software Development] steveo17:
just flashed this on Magisk V2 on my stock 6P. seems to work great.

edit:

Went to update the hosts file via Terminal. i don't think it worked though
[Android Software Development] LarappsOfDongle:
Can you get screenshot or log of the terminal?
[Android Software Development] steveo17:
just uploaded it. in the post above
[Android Software Development] LarappsOfDongle:
Hmm this is what mine looks like. Can you go to /sdcard and check to see if you have either 'hosts' or 'hosts.txt' there?
[Android Software Development] LarappsOfDongle:
[MENTION=3006212]steveo17[/MENTION]

This should fix your issues.

Just flash in recovery, small update to correct a couple of updater bugs.
[Android Software Development] steveo17:
I think that worked

Although it appears to have created another hosts file

---------- Post added at 06:04 PM ---------- Previous post was at 05:58 PM ----------

Update:

Unexpected side effect of flashing systemless adblock is that it seems to remove the magisk app.

Then when I flash phh supersu with the magisk app I can no longer toggle root
[Android Software Development] LarappsOfDongle:
If you updated to Magisk v2 you need to completely remove 1 before or the app will disappear.
[Android Software Development] steveo17:
remove v1 of magisk or this adblock?
[Android Software Development] :
Remove v1 of magisk by deleting magisk.img at /data and flashing a new boot.img then flash v2
[Android Software Development] steveo17:
welllll thats annoying.
[Android Software Development] :
Well no one ever said modifying your device would be easy. If that was the case there wouldn't be ten year olds all over XDA asking dumb questions.
[Android Software Development] steveo17:
not sure if this is a dig

just a pain in the ass because of the time it takes to rebuild all of the cache
[Android Software Development] :
Yeah I'm glad they got rid of that in N
[Android Software Development] bond32:
I'm not sure why, but I am getting reboots back into TWRP. I was on on preview 5 (N6) with your 8/3 mod on elite kernel and I did this:

- Was already using SuperSU so flashed "unSU"

- rebooted fine, everything works as should

- installed Magisk v2, phh's Superuser, Android Pay works as should, everything works well

- attempted to install your adblock v3 but reboots back into TWRP
[Android Software Development] Ranguvar:
Using Magisk v2 or Magisk v3, installing your adblock, it seems to work - install works correctly, hosts file placed in /sdcard/.

It doesn't block ads though, and when I try to ls -l or read /system/etc/hosts, I get 'Transport endpoint is not connected'.
[Android Software Development] :
The new Magisk's bind /magisk/hosts and /system/etc/hosts which makes it where it overwrites mine at /sdcard. I'm working on something different. :good:
[Android Software Development] :
8.12.16 Update 600k Unique entries!

Changelog

- 4 different hosts options

- Sped up blockage time by changing the redirection from 127.0.0.1 to 0.0.0.0

- The newer ones block temptations

1. Master = Ad & Malware block

2. Gambling = Gambling block

3. Pornography = Pornography block

4. Social = Social Media block

- All four hosts can be used at once or just two if that's what you want

- New and improved 'hosts' terminal program

- Over 600,000 unique entries!

- Updated to Magisk v3

How to use 'hosts' terminal program

1. Type 'su' then type 'hosts'.

2. When selecting an option, you can combine multiple options into one.

3. For example, 'gps' as option would block ads, malware, gambling, pornography and social.

4. Note: The 'master' option is in all of the options so no need to include it.

5. Note: Some devices may need a reboot after updating even if ran as root.

Hope you guys like the update!
[Android Software Development] Ranguvar:
Thanks RatchetPanda!

That said I think your updater needs to be updated again for the new changes.

Running hosts as root, I get:

rm: hosts: No such file or directory
rm: hosts.txt: No such file or directory
rm: hosts.txt.1: No such file or directory
<normal operation here>
sh: /magisk/post-fs-data.d/bind_hosts: No such file or directory
Done!

And then after, I have a hosts.old file on /sdcard that cannot be deleted, even as root.

Once I reboot to recovery, it can be deleted.

/system/etc/hosts seems stock, not sure if it should be a symlink or different.

Also, the uninstaller fails with a "Unable to extract zip file!"

On a clean install, no running 'hosts', I have a stock hosts in /system/etc/, and another stock hosts in /magisk/.

Not sure where the new one is.
[Android Software Development] rgawenda:
~$ su
root@bacon:/data/data # hosts
sh: hosts: not found
127|root@bacon:/data/data #
[Android Software Development] :
Well what should happen is it starts downloading the file and then it merges it with the one at /magisk.

What's the output of 'wget' in terminal?
[Android Software Development] :
Can you check /system/bin for a file named hosts?
[Android Software Development] :
Just for reference this is what its supposed to look like

(Attached screenshot)
[Android Software Development] rgawenda:
It isn't there. I've phh's SU, and systemless closed running fine under Magisk v3 on stock CyanogenOS (latest, august patch level). I'm going to reflash to get recovery log.
[Android Software Development] :
Don't yet. Flash v6 I'm testing now.

Edit not yet, need to fx one thing real quick.
[Android Software Development] :
[MENTION=1924605]rgawenda[/MENTION]

Try this, pretty sure it'll fix your issues.
[Android Software Development] rgawenda:
Yes! This one worked. Thank you.
[Android Software Development] :
It downloaded and installed? Woohoo!
[Android Software Development] rgawenda:
Flawlessly.
[Android Software Development] :
8.13.16 Update

Changelog

- Fixed updater & install issues.

Zip attached, if you had previous problems flash this.
[Android Software Development] Ranguvar:
So hold on, flash this over v5 if you had issues? It doesn't replace v5 then?

It looks like it places files on /system, won't this break Android Pay and such?

I had 'wget' and 'hosts' in /system/bin, so I don't think this will change anything.
[Android Software Development] :
I updated the hosts script, it should not break AP if it does lemme know.
[Android Software Development] joe_clasher!:
Thanks for this, works good for me :good:
[Android Software Development] hideous:
Having some issues. Nexus 6 Stock 6.0.1 running Magisk v3, rooted with phh-su (magisk).

First, could I get some clarification, does v5 need to be installed prior to v6? I have tried it both ways, just v6 and v5 + v6. (I would reinstall system / boot and wipe /data/magisk.img in between)

When I run su then hosts in the terminal, I get no menu and it just brings up a new line (like hitting enter with nothing typed).
[Android Software Development] :
8.15.16 Update

Changelog

- Added update option to installer so you don't have to download full hosts file each time.

- When choosing update it'll display the update details including the date updated & number of new entries.

- Added option to disable ad-blocking, basically uninstall.

Notes

- If you'd like to contribute PM me.

- New hosts-update.txt is located on my GitHub.

- If you have suggestions, mention them! I'm always open to new ideas and or features.

- Expect updates every couple days or so.

- You can subscribe to my PushBullet to be notified when updates are released.

https://www.pushbullet.com/channel?tag=rpdev

Link

Zip attached.
[Android Software Development] hideous:
No change with v7. Any clue as to what I might be doing wrong?
[Android Software Development] :
No change when you run 'hosts' in terminal?
[Android Software Development] :
Can you screenshot this?
[Android Software Development] steveo17:
v7 works for me now.

i haven't tried this since v3. I went and uninstalled magisk v1 and everything as well
[Android Software Development] njunxuan:
Just flashed v7 over v1. Tried running hosts and I get a "sh: hosts: not found"

On magisk v3

When flashing v7, I don't get any "installer" to download the full hosts/uninstall, could this be my issue? Its just like any other zip, flash and then twrp asks whether to reboot/wipe cache.
[Android Software Development] :
No, the zip is just a regular zip. I added an update option to the hosts executable. Can you flash it again and then check for hosts at /system/bin?
[Android Software Development] njunxuan:
Just flashed it again. there is no hosts at /system/bin. if its any help I'm running magisk v3 superpph v2 root and systemless xposed on a OP3
[Android Software Development] :
Extract the zip and copy the two files in the system/bin folder to /system/bin and give all perms
[Android Software Development] joe_clasher!:
thanks for the update. saves my mobile data
[Android Software Development] njunxuan:
wouldn't this break the systemless nature?

as a side note, the original Uninstaller provided doesn't work. is there any way to completely remove the adblocker before reflashing?
[Android Software Development] :
Deleting the two files in /system/bin as well as deleting hosts at /magisk
[Android Software Development] njunxuan:
alright I have deleted the hosts file in /magisk and the rp-afblock folder. I checked system/bin but there was nothing there. Then I reflashed magisk v3 for good measure and v7.

Good news is the ad blocking seems to be working. But the hosts is still not in system/bin :(
[Android Software Development] :
If that file is not in /system/bin ad-blocking with not work.
[Android Software Development] njunxuan:
there is a hosts file in system/etc but not in /bin
[Android Software Development] :
Put the two files in /system/bin from the zip in /system/bin and give 0777 perms.
[Android Software Development] njunxuan:
isn't magisk suppose to do that? if I manually add it in, I won't be able to update OTA or use android pay right
[Android Software Development] :
Dude Magisk cant add new stuff to system, if it broke AP I wouldn't do it. I pass safetynet even with those files, heck I even pass with xposed active!
[Android Software Development] Mar-cel:
It doesnt work for me...
[Android Software Development] :
Did you run it as root? Do you have magisk? I need more info than it just doesn't work because as you can see it works for most.
[Android Software Development] Mar-cel:
I have flashed v7 and followed the instruction on the first page with su in terminal

Gesendet von meinem SM-G900F mit Tapatalk

---------- Post added at 07:22 PM ---------- Previous post was at 07:07 PM ----------

Installing Magisk v3 solved the problem

Gesendet von meinem SM-G900F mit Tapatalk
[Android Software Development] :
8.20.16 Update

Changelog

- Added support for Magisk v5

Notes

- Don't use this if not on Magisk v4+
[Android Software Development] hugohthuang:
"disable" can't use

magisk V6 & superuser v17 & rp-adblock v8

After run "hosts" and choose "d".

But it show

/system/bin/hosts[57]: umount: not found
[Android Software Development] mati_boy:
gives me this error too, but still adblocker is disabled after that
[Android Software Development] :
I've moved all my Magisk modules into one thread, it's been updated there with support for Magisk v6.
[Android Software Development] steveo17:
is there any particular to be done to remove v7? or just flash Ad-Block over it?

i am on v6 of Magisk already
[Android Software Development] :
You can flash ovrr
[Android Software Development] jsaxon2:
I just installed version 8 and AI have Magisk v6. I'm getting a 404 not found when trying to update. Any ideas?
[Android Software Development] :
I'm working on the website right now so it's down.. Trying to get it back up by tonight
[Android Software Development] jsaxon2:
So do I have to do the update for it to work initially, or should it work after flashing. Reason I ask is cause I am still seeing ads.
[Android Software Development] :
Yes. I'm working on the site as we speak
[Android Software Development] :
Hosts and website is back up so no more 404 errors.

Just a couple quick things I wanted to clear up.

- The installer does NOT block ads until you run the hosts in terminal.

- Don't run the update option first, run the regular options then use update once you already have the other ones.

- Any domains you'd like white listed or added to list just say something.
[Android Software Development] putridfoetus:
Hi, i'm hoping this is something stupid I've missed, but after i flashed the zip and ran hosts in terminal, i get an error "missing url"
[Android Software Development] grep_i:
I guess his site is down and he is already working on it as stated in the comments before you.

Just be patient.
[Android Software Development] :
That doesn't look like the hosts in the zip, see sceeenshot
[Android Software Development] zzzhead:
I get a stdout no space on device error..
[Android Software Development] :
Make sure /Magisk isn't full and has space
[Android Software Development] zzzhead:
Is there any way I can increase the space without deleting any stuff?
[Android Software Development] :
Type su in terminal get root

Then run resize2fs /data/magisk.img 100M

That makes it 100MB
[Android Software Development] zzzhead:
That works! However, can't write to hosts-gps read only file system.

Im trying not to mount system as rw as I would like to use android pay.. Will this break the functionality?
[Android Software Development] steveo17:
wrong thread
[Android Software Development] :
It should write to magisk, unless he's changed perms so I can't.
[Android Software Development] putridfoetus:
Exactly my concern, because i flashed the zip from your other thread. Ad-Block-Magisk.zip. I thought it was the same thing as this. After flashing the v8 zip in this thread, i still get nothing when i run hosts. no message, no options, just a new line.
[Android Software Development] :
Does the one from other thread work fine?
[Android Software Development] zzzhead:
I didn't change any permission, using by magisk, with superuser, v4a and xposed.
[Android Software Development] putridfoetus:
Neither one works. The one from the other thread is the one that gave me the missing url error.
[Android Software Development] :
The site was down.
[Android Software Development] zzzhead:
Any idea where the hosts-gps file is stored? I'll replace my hosts file manually!
[Android Software Development] putridfoetus:
Just tried again, still not getting anywhere with either zip. Maybe the symlink didn't get created? I can run the commands from the hosts script manually, but get the stdout no space error when i run cat hosts-master.txt > hosts. Resizing /data/magisk.img did not help.

Could lingering SuperSU files be affecting this? I didn't flash the unsu zip, i just flashed stock boot and system before i did the magisk stuff. Maybe i need to start from fresh again and wipe userdata?

*Edit: So i found a supersu folder was still around. Deleted that from recovery, deleted the ad-block folder from /magisk, then flashed the v8 zip from this thread. Ads seem to be blocked now, but i still get nothing when i run hosts from terminal. Weird...
[Android Software Development] :
ratchetpanda.GitHub.io/hosts-gps.txt
[Android Software Development] :
Flash the one at the magisk collection thread and then see if that still have stdout no space error.
[Android Software Development] putridfoetus:
OK i flashed the one from the magisk collection thread, and this is what i get in terminal:
[Android Software Development] putridfoetus:
Finally got it to work manually. I had to resize magisk.img in the recovery terminal instead of inside android. The hosts script still doesn't run, but i can do it manually so it's actually blocking ads now. Thanks for your help and sorry for blowing up your thread!
[Android Software Development] :
I'm implementing the resize into the script itself so there's always enough space.
[Android Software Development] Lycidias:
Please whitelist "eporner.com" :) thx
[Android Software Development] :
Which section is this in? Ads?
[Android Software Development] Lycidias:
I'm using Master, don't know :o
[Android Software Development] putridfoetus:
Then it's probably blocked for a reason. Disable ad blocking If you want to get to whatever that site is serving.
[Android Software Development] :
Open the hosts file at /magisk/.core/hosts

Ctrl f your site to remove.
[Android Software Development] putridfoetus:
Respectfully requesting imgs.xkcd.com be removed from the master list. It's not Ad/Malware (just comics), and apparently i can't edit hosts on my phone lol.:silly:
[Android Software Development] Kellwa:
I have working correctly

Installed Magisk V6 - phh's super user - xpoed

Installed the v8 adblocker from this thread http://xdaforums.com/attachment.php?attachmentid=3848555&d=1471698886

Typed hosts in terminal and it's updating the hosts file

Update:

The hosts file is located in /magisk/.core/hosts

In Adawy settings i set the hosts to this location

Then disabled ad blocking from in the app to restore empty hosts then updated the file

After that adaway will ask to create symlink and i choosed No

The ads is blocked and every thing is fine
[Android Software Development] smeejaytee:
Mate any chance of this for non systemless?
[Android Software Development] :
Um prolly not for now
[Android Software Development] smeejaytee:
Good answer lol
[Android Software Development] _litz:
This apparently completely breaks iHeartRadio .....

Edit : after using AdAway as configured above to re-write the hosts file created by this module, IHR now opens normally

(note: do NOT allow it to create the /system/etc/hosts symlink; just cancel. It actually DID update the hosts file, even though it shows as deactivated)
[Android Software Development] metrize:
Terrible, blocked porn and stuff when I didn't want it to, how can I uninstall this ****
[Android Software Development] :
You made my day.
[Android Software Development] Depressed Man:
Not sure if I installed this correctly. I flashed the zip in this thread. Rebooted. Using Termux, I typed in su. Gave it su permissions. And I'm root@shamu. Typing in 'hosts' responds with not found. Is there another terminal I should be typing this in from? E.g. Recovery?
[Android Software Development] :
Go to Magisk module thread in the Magisk forum, updated zip there
[Android Software Development] Fentadroid:
Installed this module, everything works but when i type option "d" for disable: /system/bin/hosts[57]: unmount not found.

I want to try the other zip, but.. how can i uninstall this one?

EDIT:

Flashed over the other zip, but option "d" doesn't work......
[Android Software Development] elreydenj:
Where exactly? I'm trying to find an ad blocker that works with PHH 266 suhide
[Android Software Development] D-dy:
Maybe this....

http://xdaforums.com/apps/magisk/collection-magisk-modules-t3445257
[Android Software Development] grep_i:
Maybe Magisk is a bit overkill for such a simple task check out adguard or disconnect, the only prerequisite is root but as I always used SuperSU I don't know for a fact if it works on phh superuser but you can try it even without Magisk.
[Android Software Development] adikri:
Will this work with normal war rooting i.e supersu?
[Android Software Development] RijuSarkar:
If I only type su hosts and then nothing else...what will happen?? It will block all the ads in the website right??? And if I give the command porn (p) or social( s) it will block the entire website like pornhub or Facebook?? Am I right?

---------- Post added at 06:32 AM ---------- Previous post was at 06:31 AM ----------

Whitelist the porn command
[Android Software Development] realista87:
what's the difference with the MoaAB (Mother of All AD-BLOCKING) project? https://xdaforums.com/showthread.php?t=1916098

and why didn't u use this source?

seems that BOTH are merging other lists to creare ONE BIG host file......

but basically, what is the difference, none? just 2 parallel projects... what have the same GOAL to merge all sources into one big host?

and last question, what is the SOCIAL NETWORK list? what does it block?.... i don't think any social... like facebook and others...it would be an odd thing to do!!
[Android Software Development] Zackptg5:
This module hasn't been updated for a long time and so I've continued it here: https://xdaforums.com/apps/magisk/magisk-unified-hosts-adblocker-t3559019

We chose unified hosts because they're open source, clear documentation of the addresses being blocked, multiple options tailored to user preferences, highly active development, and high quality sources. More details on exactly what unified hosts are are found on it's git here: https://github.com/StevenBlack/hosts

Basically, it's a high quality hosts file. Both projects have similar goals. Try both and see which one you like better :)

The social filter does exactly that: block all social networks. This includes facebook, twitter, etc. so it's aimed at people who don't use social networking and are annoyed with all of the share buttons and crap popping up all over the place
[OnePlus 3 Questions & Answers] DarkN3ss61:
Hi guys, so after a bit of research I found that you can add/enable bands on the OP1 as shown here

http://xdaforums.com/oneplus-one/general/guide-unlock-aditional-bands-qualcomm-t2877031

and Here

http://xdaforums.com/showpost.php?p=56577252&postcount=455

My question is can I add LTE band 3 to my OP3 A3000?

Mine currently supports:

North America model(A3000)

FDD-LTE: Bands 1/2/4/5/7/12/17/30

The other models support:

Europe / Asia model

FDD-LTE: Bands 1/3/5/7/8/20

TDD-LTE: Bands 38/40

China model

FDD-LTE : Bands 1/3/7

TDD-LTE: Bands 38/39/40/41

If anyone has done this or attempted to do this please let me know
[OnePlus 3 Questions & Answers] lethalfriend:
Looking for the same information.
[OnePlus 3 Questions & Answers] allluke:
Also been searching for this. Found another thread which says hopefully in the next month or two it will be looked into.

http://xdaforums.com/oneplus-3/help/unlocking-lte-bands-t3425871
[OnePlus 3 Questions & Answers] duluc:
Could this even be possible? Aren't bands hardware dependant?
[OnePlus 3 Questions & Answers] lummujaj:
Its possible to add bands in Qualcomm devices .. i added h+ band in my Xiaomi mi note 1year ago. (Snapdragon 801) ... Somewhere in xda exist a tutorial to add bands in xiaomi mi note pro. Try the steps in oneplus ... But make sure you nandroid backup and EFS backup.
[OnePlus 3 Questions & Answers] brooksilg:
This is what I'd assume as well, but it looks like some have been successful in the past with Oneplus devices. Especially since Oneplus' response to the band omissions seemed a bit vague IMO.
[OnePlus 3 Questions & Answers] DarkN3ss61:
Any updates?

I have a A3000 US model (Does not support LTE band 3)

AND NOW

I have just got a A3000 HK model (For my dad) (support's LTE band 3)

and the "about phone" part is identical apart from the baseband version.

Is there any way to tell them apart. And does this mean I can somehow unlock LTE band 3 on my US version of the OP3?

If there was someway to backup the basband and restore it on on my US OP3 that would also be great!
[OnePlus 3 Questions & Answers] bulletmark:
The HK model is A3003 so you actually have a China model.
[OnePlus 3 Questions & Answers] DarkN3ss61:
Opps, either way, it still has LTE band 3 which I need on my US version
[OnePlus 3 Questions & Answers] aqqalu:
Any news on adding bands to the OP3?