yashsingh1/xdaforums huggingface dataset:
[Windows Phone 8 Development and Hacking] sandix:
When it comes out of beta I will publish source to github and yeah the UI is, how do I say..... Lacking if you will, but it is functional which is the idea behind a beta product LOL.

So far I found some bugs of my own:

2 of the 4 hosts files fail to download from a 406 error.

&

because of the first bug, not all ads are blocked. So i noticed some, not all, ads in some web sites and apps. but some are blocked.

I am also going to add a feature where a user can add his or her own entries, as well as adding their own URL's for Hosts files so those will be added/downloaded as well. ;)
[Windows Phone 8 Development and Hacking] carguy303:
What sources does this app use?
[Windows Phone 8 Development and Hacking] Ranomez:
[MENTION=3100103]sandix[/MENTION] great work, this app even works well on W10M with interop/cap unlock.
[Windows Phone 8 Development and Hacking] dxdy:
is ok but still many ads not blocked from web pages... second and third host download fail...
[Windows Phone 8 Development and Hacking] sensboston:
I could recommend to [MENTION=3100103]sandix[/MENTION], to get a blocking uri sources from the popular Android or desktop ad-blocking software (AdAway and/or AdBlock). Maybe it's not very ethical but these blocking lists are up to date and 24/7 available.
[Windows Phone 8 Development and Hacking] sandix:
This application is using the default sources from adaway for android, but 2 out of the 4 source get a 406 error, ill be releasing an updated version that fixes this issue so more ads will be blocked. The next version will also allow you to add your own sources as well ;)
[Windows Phone 8 Development and Hacking] sandix:
I am glad it is working on the W10M TP :) I haven't tested it on that yet so that is good news!
[Windows Phone 8 Development and Hacking] sensboston:
That's smart ;)
[Windows Phone 8 Development and Hacking] sandix:
Haha, thanks, it will be polished app soon enough ;) I want it to update in the background, but I have no idea how to do that yet. LOL
[Windows Phone 8 Development and Hacking] Ranomez:
Is that even a good idea?

I meant won't that risk breaking your hosts file if let's say your internet connection drops during the download?

Also a bit of a unrelated question: doesn't windows phone require a reboot after changing the hosts file just like PC windows does to actually apply the rules?

And you should add the hosts file from here too: http://winhelp2002.mvps.org/hosts.htm (note: not direct link to the hosts file, scroll down a bit) that's what I'm using on my pc and laptop in windows.
[Windows Phone 8 Development and Hacking] sandix:
That hosts al ready in the list, and if internet is dropped during download, that hosts file won't be included, worst case you have to reupdate the hosts file, but no damage would done regardless because I have a restore option in the app ;) and afaik I have not needed a reboot, but a reboot, if you would want to, would not damage anything either :)
[Windows Phone 8 Development and Hacking] sandix:
Added Update V3, includes some bug fixes and features, update now!
[Windows Phone 8 Development and Hacking] Ranomez:
With v3 this happens when I open the edit user list screen on W10M.

EDIT: Same error happens when I try to save the list and when I try to update the hosts file, can't be used on W10M anymore.
[Windows Phone 8 Development and Hacking] dxdy:
work fine, you must manually add (your) userList.txt
[Windows Phone 8 Development and Hacking] sandix:
That is weird thanks for telling me, I didn't have that issue, but I will fix it in the next release.

If you updated from the previous version, remove the app and then reinstall it and that should fix the problem I hope for now.
[Windows Phone 8 Development and Hacking] Ranomez:
Are you on W10M because for me WPPT can't add anything to any app's isolated storage?

---------- Post added at 07:04 PM ---------- Previous post was at 07:03 PM ----------

I did not update but clean install it.
[Windows Phone 8 Development and Hacking] dxdy:
no i have 8.1 GDR2 but get same error... after manually add folder DataFolder and userList.txt all working fine.. use File Manager on phone if WPPT not work for you...
[Windows Phone 8 Development and Hacking] Ranomez:
Ok, will try, thank you, and no need to use file manager cause I can just enable Full FS Access and do it that way.

EDIT: Worked, thanks.

Also [MENTION=3100103]sandix[/MENTION] is there any reason you removed the ability to read the current hosts file and are you going to add it back in the next version, it was quite a good feature to have to make sure your hosts have been applied?
[Windows Phone 8 Development and Hacking] sandix:
Version 4 released, hopefully fixed that weird userList.txt file not found bug.

Enjoy!
[Windows Phone 8 Development and Hacking] sandix:
Version 5 will have a proper hosts file reader, I found that if the host file was big, the old method (From version 2 or older) would cause the phone to lock up and reboot. So it is disabled for now, but will be back soon. :) Promise.
[Windows Phone 8 Development and Hacking] dxdy:
v4 crash every time when start (Lumia 640 LTE 8.1GDR2)

after adding DataFolder and userList.txt now start OK...
[Windows Phone 8 Development and Hacking] Ranomez:
Good to know, thanks.

Also as this can edit the hosts file are you planning to add the feature to add entries to be added yourself (like the list of custom hosts url's but instead of url's just add entries to be added to the end of the hosts file) that would be useful if people want to block some sites by themselves or for the other uses of the hosts file (like creating shortcuts to different sites)?
[Windows Phone 8 Development and Hacking] sandix:
Please read Original Post #1....

Yes the feature is there, but it is very basic right now. (Click "Edit User Hosts List" in app and you can add your own URLs, one per line.)
[Windows Phone 8 Development and Hacking] Ranomez:
I said about the feature to add url's to download a hosts file but I was asking about being able to add separate entries to be added to the hosts file, not a hosts file from a link, not even a local hosts file but simply being able to write for example "0.0.0.0 fr.a2dfp.net" and that gets written to the hosts file after the downloaded hosts.

So what I'm asking about is the ability to manually decide to add an extra line (or more) to your hosts file, without needing to download a hosts file from a link.
[Windows Phone 8 Development and Hacking] sandix:
Ah, yeah that is a plan for a future update (Around Version 7 maybe?)

---------------------------------------

Also: Version 5 just released adding back the option to edit hosts file manually.

Everyone Enjoy!
[Windows Phone 8 Development and Hacking] canapo92:
version 5.1 crash when i start it
[Windows Phone 8 Development and Hacking] dxdy:
try what i suggest before for v3 and v4...

after adding folder "DataFolder" now start OK for me...
[Windows Phone 8 Development and Hacking] canapo92:
pleaze, i lost windows power tools original, i have standalone and cheeky ghost edition , can someone provide me the original? i found it in one post some months ago, but i don't remeber where. i installed adblock with standalone but in isolated storage it doesn,'t appear:mad: thanks
[Windows Phone 8 Development and Hacking] dxdy:
you can add folder "DataFolder" with file manager on phone also (i use Aerize Explorer Pro)

here is stable WPPT from WPPT page
[Windows Phone 8 Development and Hacking] sandix:
Version 5.2 should fix the crashing on first startup. I redid the initialization process and it should now work properly.
[Windows Phone 8 Development and Hacking] sensboston:
[MENTION=3100103]sandix[/MENTION], you may use WebBrowser control for the quick editing large text files (see details in the WPTweaker sources); your current implementation is not really working on the real handsets (tried on L-822, get endless "loading...").
[Windows Phone 8 Development and Hacking] sandix:
Haha, well I was trying to keep it as neat as possible, didn't think about using a WebBrowser Control, I will look into that.

But the way I am doing it now is slow and inefficient, but it will eventually load lmao.

Can you PM me more details about using a WB Control? Would love to learn more!
[Windows Phone 8 Development and Hacking] sensboston:
https://github.com/sensboston/WPTweaker/blob/master/WPTweaker/Controls/XmlEditorPage.xaml.cs , contenteditable='true' in the <div>'s HTML do the trick.
[Windows Phone 8 Development and Hacking] sandix:
Nice, I just figured this out seconds before reading the source for that :)

Nice trick. Now I can just grab the data from the <div> using the ID. ;) it loads 10000x faster now lmao. Editing is still slow (Over 30,000 lines of hosts with the default Download URLs)
[Windows Phone 8 Development and Hacking] sensboston:
Large texts editing always will be slow on the handsets (and of course not useful). However if you want to implement indirect editing, you may play with javascript controls and popups.

BTW, why do you need a full text editor for the hosts file (as for me, viewer is enough)? Instead of that, add user hosts file (from phone memory/sd-card) merging, it's much more useful than manually input all user's urls. For the quick fixes, simple input dialog will do a job...

P.S. For the opening file from the handset memory technique, you may also check github sources (and copy&paste stuff to save your time).
[Windows Phone 8 Development and Hacking] sandix:
Well the editor is there to allow a user to make changes to the Windows HOSTS file.

As far as downloading, everything is merged from the URL sources that it downloads by ddefault and what you add to the Custom URL List.
[Windows Phone 8 Development and Hacking] zorroloko:
thanks!
[Windows Phone 8 Development and Hacking] sandix:
Updated to 5.3, added ability to disable and remove default hosts list, and you can also add your own easily.

Enjoy.
[Windows Phone 8 Development and Hacking] Abdulrazak_Kh:
:good: Thanks :) hope to see more updates soon
[Windows Phone 8 Development and Hacking] bnwg:
v5.3 works much faster in updating host than previous version.

Thanks for the good job.
[Windows Phone 8 Development and Hacking] sandix:
Thanks for the kind words, I optimized v5.3 with a better for loop and parsing function, so I hope it is much faster!

New idea - Everyone should share what they are using for their hosts lists, is it default, or did you add your own?

Let everyone know!
[Windows Phone 8 Development and Hacking] sagargjasani264:
Whene I update host file it stops my wifi sharing... I mean I cant use wifi hotspot... It always says that connection is limited.
[Windows Phone 8 Development and Hacking] qzem:
That is strange. Does anyone else has this problem? I am asking this just to be sure if I should put this app on my phone :).
[Windows Phone 8 Development and Hacking] dxdy:
i am on vacation and today i connected to various free WiFi hot spots without problems...
[Windows Phone 8 Development and Hacking] sandix:
Some WiFi hotspot service providers block AdBlockers by tryign to load an ad in your browser while connecting, if the ad cannot load, then they will block you.

This is common with a lot of FileSharing sites too. It is so that they keep making money. Worst case, AdBlocking can easily be disabled in the app if that is the case.
[Windows Phone 8 Development and Hacking] qzem:
It is working on windows 10 mobile 1536.1004, if someone wants to know :). Thanks for great app [MENTION=3100103]sandix[/MENTION] ! I think you could add the possibility to backup original host file and restore.

Does anyone knows which server should I remove from host file, so that my window s feedback reporting would still work?
[Windows Phone 8 Development and Hacking] djamol:
[MENTION=2682751]qzem[/MENTION] Hosts file is common for every device.
[Windows Phone 8 Development and Hacking] sensboston:
HOSTS file is usually empty (no records) on every device :)
[Windows Phone 8 Development and Hacking] sandix:
Yeah the hosts file is empty (minus the example documentation.) So just blanking the file removes the ad blocking.

I will be making AdBlockerWP use the default hosts file on restore in a future update for those who are paranoid, or just want the true original HOSTS file back.

;)
[Windows Phone 8 Development and Hacking] qzem:
[MENTION=3100103]sandix[/MENTION]

Ok I admit I was (am) a little bit paranoid :D.
[Windows Phone 8 Development and Hacking] sandix:
[MENTION=2682751]qzem[/MENTION] LOL ;)
[Windows Phone 8 Development and Hacking] Bnjalal:
I am not able to push the xap to W10M v10536, tells me error install failed please contact your software vendor. Am I missing something ? Interop/Capability unloced and using windows phone application deployment :c

I dont yet have vs2015 installed on my system, will look into that soon and hope that this will sove my issue

edit- successfully deployed after refreshing the device using ##777# in the dailer -_-''
[Windows Phone 8 Development and Hacking] crowjob:
Working properly on Lumia 1020 running latest W10M.
[Windows Phone 8 Development and Hacking] inejco:
Thank you for this. You are GOD.
[Windows Phone 8 Development and Hacking] dxdy:
tested with latest W10M build 10586.11 working fine :)
[Windows Phone 8 Development and Hacking] atsushiboy:
Hi

Is there a way to set a Whitelist for this?

The blacklist is working great but breaks some web page graphics until I add some URLs to whitelist.
[Windows Phone 8 Development and Hacking] zizu10:
Hello, I can not install this on my lumia 930 windows 10 latest build. I got this error error 0x81030120? Is there any hints what to do?
[Windows Phone 8 Development and Hacking] Ranomez:
First thing: do you have interop+cap unlock?

Second: do you know that you can only use WPPT to deploy xap files on W10M?

Third: do you know how to connect your phone to WPPT to be able to deploy apps with advanced capabilities? (connect in sideload mode and after switch to developer mode)

You should really always try to give as much information as possible if you want someone to help you (or at least try to), an error code, OS version and model is not enough.
[Windows Phone 8 Development and Hacking] augustinionut:
I use WPV XAP Deployer :D
[Windows Phone 8 Development and Hacking] sandix:
Wow, I sold my Lumia a month ago, glad to see this project going strong!!! I will dig up the source code and release it on GitHub.
[Windows Phone 8 Development and Hacking] sandix:
No whitelist, just remove the needed URI from the hosts file using the AdBlock built in editor (Buggy) or the Windows Phone MTP interface.
[Windows Phone 8 Development and Hacking] atsushiboy:
Ah I see.

I would love to see a whitelist feature in the future since I don`t want to manually remove it everytime I update the hosts.txt source.

Great tool anyways!
[Windows Phone 8 Development and Hacking] sensboston:
[MENTION=3100103]sandix[/MENTION], "whitelist" it's a really cool idea, and very easy to implement. It's a "must have" feature for any advanced ad blocker.
[Windows Phone 8 Development and Hacking] dxdy:
1. dont have interop unlock... just enabled developer unlock in phone settings

2. used "Windows Phone Application Deployment 8.1" tool from WP SDK tools (i installed full SDK with visual studio)...

2. and 3. forget WPPT with W10M... wont work...
[Windows Phone 8 Development and Hacking] sandix:
I agree, it would be nice to have a whitelist feature, but I am no longer maintaining this project, like I said I will be releasing the source code on GitHub so someone else can take over, or maybe someone just wants to learn from.
[Windows Phone 8 Development and Hacking] sandix:
Just the OP for a link to the Source Code for anyone looking for it.
[Windows Phone 8 Development and Hacking] Paleskin:
great job, now my windows phone is more usable than ever
[Windows Phone 8 Development and Hacking] MaDaLiNoSt:
I found a bug.. On my lumia 630 with GDR2, when Adblock is enabled wifi connecting time is doubled! Instead of 5 seconds i wait 10, sometimes 20 seconds to connect. And then, when I disable it, it becomes normal. Why?
[Windows Phone 8 Development and Hacking] sandix:
As blocker is probably blocking some Microsoft IP address
[Windows Phone 8 Development and Hacking] wifesabitch:
I'm getting the same error code as him and I'm using the Windows Phone Application Deployment 8.1.

Lumia 930 OS build: 10.0.10586.36

Any other ideas?
[Windows Phone 8 Development and Hacking] sandix:
Read OP guys. You NEED interop and full cap unlock!!! :mad:
[Windows Phone 8 Development and Hacking] wifesabitch:
I have that. At least as far as I know. I'm getting a pop-up saying "success".

Anyway to test it?
[Windows Phone 8 Development and Hacking] sandix:
If the app is telling you that is successfully applied, then it did, but to test: visit ******* or find an ad on a site and try to click it.
[Windows Phone 8 Development and Hacking] wifesabitch:
Sorry, it was the unlocking that gave me the "success" pop-up.

This ad-blocker install gave me the error code.
[Windows Phone 8 Development and Hacking] sandix:
Install using Windows Phone Power Tools.
[Windows Phone 8 Development and Hacking] wifesabitch:
Downloaded that. Then it said I need Microsoft,VisualStudio.OLE.Interop Version 7.1

Downloaded Microsoft,VisualStudio.OLE.Interop Version 7.1 Then it said I needed Microsoft NET Framework 4

Downloaded Microsoft NET Framework 4. Then it said I already had it on my computer. :eek:
[Windows Phone 8 Development and Hacking] sandix:
Download .NET 4.5.1
[Windows Phone 8 Development and Hacking] sandix:
You might need Visual Studio for Windows Phone to do the install so download the WP 8.1 SDK. Full version might be needed.
[Windows Phone 8 Development and Hacking] winphouser:
[MENTION=4311714]wifesabitch[/MENTION]

- WPPT doesn't work anymore; use WPV Xap Deployer.

- "Success" message from interop unlockers may not mean successful unlock! Unlock using vcREG 1.5.
[Windows Phone 8 Development and Hacking] wifesabitch:
WPV Xap Deployer didn't work either. Same error.

I've installed everything on this to get it to work. Visual Studio, WPPower Tools, AppDeployer, WP8.0 SKD Tool Lite, WP8.1 SKD Tool Lite. Still same error.

Think I'm going to have to wave the white flag on this one.
[Windows Phone 8 Development and Hacking] derausgewanderte:
WPPT still working fine here on on Windows 10 build 10586.36 version 1511 sideloading to W10M 10586.36 . I just sideloaded the adblocker app again via WPPT to confirm. No problems.

cheers

I suggest you try this on a different PC or laptop. Possibly some SDK dlls hosed.

PS: some of the issues I had were resolved after I installed Visual Studio Community 2015.
[Windows Phone 8 Development and Hacking] winphouser:
Did you "Restore NDTKsvc" using vcREG?
[Windows Phone 8 Development and Hacking] wuiyang:
After adding custom userlist and download it, my whole phone broke down (unable to connect to the phone, Wi-Fi, Bluetooth, USB transfer doesn't work)

phone: Nokia Lumia 520

added adblockplus easylist

help please :(

I don't want to hard reset my phone (I haven't backup anything)

EDIT: I can connect my phone with "Project My Screen App", only if there's other way to modify Hosts file....
[Windows Phone 8 Development and Hacking] augustinionut:
Mine had 10.9 MB. The adblocker cant restore original hosts file, lack of capabilities??
[Windows Phone 8 Development and Hacking] sandix:
Don't know why you guys are having issues, it can restore a default hosts file. It works fine on a spare Lumia for me. No issues.

Can you tell me your model and OS / software version?
[Windows Phone 8 Development and Hacking] wuiyang:
Nokia Lumia 520 Malaysia variant

Windows 10 Mobile 10.0.10586.36
[Windows Phone 8 Development and Hacking] augustinionut:
I think you need to ad some wm10 capabilities :)
[Windows Phone 8 Development and Hacking] titi66200:
[MENTION=6615698]augustinionut[/MENTION]

You can try to add capabilities in WMAppManifest.xml
[Windows Phone 8 Development and Hacking] augustinionut:
Yes, but what capability? Can write system file (hosts) but cant restore?
[Windows Phone 8 Development and Hacking] sandix:
I've tested on W10M and it ran flawless for me. I run a lumia 640
[Windows Phone 8 Development and Hacking] augustinionut:
Conect to wifi, restart phone, reconect to wifi...

127.0.0.1 localhost

I think here a # is missing. At the beginning of hosts file.

How to update a blank file from a server?
[Windows Phone 8 Development and Hacking] wuiyang:
[MENTION=3100103]sandix[/MENTION] My HOSTS file are unable to edit, replace, or delete. Any help please?
[Windows Phone 8 Development and Hacking] sandix:
Must be interop and cap unlocked.

For getting a blank file just click restore.
[Windows Phone 8 Development and Hacking] wuiyang:
I have interop and cap unlocked...

I put adblockplus easylist and broke the whole system down (weird errors everywhere)

Unable to write/modify/delete through any apps

Blank doesn't work.

I get (error writing hosts file (are you interop unlocked?) error
[Windows Phone 8 Development and Hacking] augustinionut:
SANDIX, look at mi post above.
[Windows Phone 8 Development and Hacking] titi66200:
You can't access with MTP to this file?
[Windows Phone 8 Development and Hacking] augustinionut:
I not, hardreseted my phone yesterday.

EDIT: now i can.
[Windows Phone 8 Development and Hacking] winphouser:
I think critical parts of the system become overwhelmed and unresponsive because of the SIZE of the hosts file... I think mine was >10 MB?

I got Permission denied on the file and had to reflash too.

I'm using the mvps hosts file now which is <400 kB with comments deleted. WM10586.63, no problems on 640XL.

Thanks for stellar crapblocking experience till now [MENTION=3100103]sandix[/MENTION] and for still supporting the app when you don't even have the phone! ⭐⭐⭐⭐⭐
[Windows Phone 8 Development and Hacking] sandix:
Well the source code is available to anyone on github. If I still had a windows phone id continue development on this app because it is so damn useful. I apologize for anyone that has had issues with it. It's been a good run! Maybe someone will find a new way to block ads on the phone.

Cheers!

~Sandix
[Windows Phone 8 Development and Hacking] wuiyang:
The only method to fix bricked HOSTS file is to use mass storage mode (Using Windows Phone Internal)

took me two days to figure it out...
[Windows Phone 8 Development and Hacking] BakedOnSomeSour:
When i update my host file on the lumia 640 my data and wifi completely stop working..........I dont understand why it is happening. Not even a hard reset can fix so i have to reflash a stock ROM
[Windows Phone 8 Development and Hacking] augustinionut:
OP, please change hosts source inside xap. Point to another server with a fine hosts file.
[Windows Phone 8 Development and Hacking] A AJAY:
same things occure for me...running on lumia720 introp unlock with wpinternals//can't disable it
[Windows Phone 8 Development and Hacking] BakedOnSomeSour:
http://winhelp2002.mvps.org/hosts.txt This host file works fine with windows 10 mobile!
[Windows Phone 8 Development and Hacking] augustinionut:
I dont see the point of

127.0.0.1 localhost

since localhost name resolution is handled within DNS itself. At least in windows 7.
[Windows Phone 8 Development and Hacking] rickk182440:
NOT THIS THE NERD When you connect WIFI ? WHEN YOU TYPE connects for the first time ?
[Windows Phone 8 Development and Hacking] forgreatsouce:
Patched Xap

I Edited the source code to change the default source files and added a second undo button.

Let me know if it solves the problem for anyone who is already affected.

I apologize if the app crashes. I really have no idea when it comes to Windows phone apps.

:confused:

OK..... So some research has been done on a 640

It turns out that on the old sources if you waited a few hours after install / reboot. everything would start working and you could start using the phone online.

I have a new "Optimized" Host file available that supposedly will only kill the internet for ~10 minutes after reboot. I will do further testing over night and if the 10 minute rule still applies then I shall upload the new file with a warning.

If anyone would like to test it. PM me and ill send over he new version.

Source