[XAP] AdBlocker For Windows Phone 8.x+

Search This thread

sandix

Senior Member
Oct 25, 2010
839
447
USA
urgero.org
Hello everyone!

Today I release a beta build of my very first hand made app called AdBlockerWP!

***YOU NEED TO BE INTEROP-UNLOCKED AND HAVE ALL CAPABILITIES UNLOCKED AS WELL!

It is very simple, download the app from the attachments and install it using Windows Phone Power Tools or the use the deployer built into the SDK.


Then run it and then select "Update Hosts File" Then wait.

Boom it has blocked ads for you! Enjoy :)

There is also a feature to disable ad blocking.

Please please please let me know how this works for you and what model phone you have as I can only test on emulators and a Lumia 640, but this should work on any Lumia WP8.x Phone.



EDIT:
New Feature(s) Added:

  • Users can now specify their own URLS to download
  • Removed 2 default URLS, and changed 1 URL
Current Default Hosts URL List:


Change Log:
V4: Fixed userList.txt not being found when editing custom user hosts url list.
V5: Added option to edit Windows Hosts file, or just view. (Alpha feature, it is very slow on larger files)
V5.2: Fixed bug on first launch of crashing
V5.3: Default lists can be disabled by user, and better custom list parsing


Source Code: Download Here
 

Attachments

  • AdBlocker_Release_ARM_V5.3.xap
    245.6 KB · Views: 18,238
Last edited:

sensboston

Recognized Developer
Nov 18, 2009
2,165
814
Boston, MA
Good job, buddy!
Probably, your app needs some UI "polishing" and nice tile but at least it's functional & working :)
Do you have plans to publish app sources on the github? It will be nice.
 

sandix

Senior Member
Oct 25, 2010
839
447
USA
urgero.org
Good job, buddy!
Probably, your app needs some UI "polishing" and nice tile but at least it's functional & working :)
Do you have plans to publish app sources on the github? It will be nice.

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. ;)
 

sandix

Senior Member
Oct 25, 2010
839
447
USA
urgero.org
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 ;)
 

Ranomez

Senior Member
Jun 1, 2010
1,237
305
HTC One X+
HTC Desire HD
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

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.
 

sandix

Senior Member
Oct 25, 2010
839
447
USA
urgero.org
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.

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 :)
 

Ranomez

Senior Member
Jun 1, 2010
1,237
305
HTC One X+
HTC Desire HD
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.
 

Attachments

  • wp_ss_20150817_0001.png
    wp_ss_20150817_0001.png
    52.7 KB · Views: 476
Last edited:

sandix

Senior Member
Oct 25, 2010
839
447
USA
urgero.org
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.

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.
 

Ranomez

Senior Member
Jun 1, 2010
1,237
305
HTC One X+
HTC Desire HD
work fine, you must manually add (your) userList.txt

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 ----------

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.

I did not update but clean install it.
 

Ranomez

Senior Member
Jun 1, 2010
1,237
305
HTC One X+
HTC Desire HD
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...

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 @sandix 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?
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 27
    Hello everyone!

    Today I release a beta build of my very first hand made app called AdBlockerWP!

    ***YOU NEED TO BE INTEROP-UNLOCKED AND HAVE ALL CAPABILITIES UNLOCKED AS WELL!

    It is very simple, download the app from the attachments and install it using Windows Phone Power Tools or the use the deployer built into the SDK.


    Then run it and then select "Update Hosts File" Then wait.

    Boom it has blocked ads for you! Enjoy :)

    There is also a feature to disable ad blocking.

    Please please please let me know how this works for you and what model phone you have as I can only test on emulators and a Lumia 640, but this should work on any Lumia WP8.x Phone.



    EDIT:
    New Feature(s) Added:

    • Users can now specify their own URLS to download
    • Removed 2 default URLS, and changed 1 URL
    Current Default Hosts URL List:


    Change Log:
    V4: Fixed userList.txt not being found when editing custom user hosts url list.
    V5: Added option to edit Windows Hosts file, or just view. (Alpha feature, it is very slow on larger files)
    V5.2: Fixed bug on first launch of crashing
    V5.3: Default lists can be disabled by user, and better custom list parsing


    Source Code: Download Here
    4
    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
    3
    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 ;)
    3
    Hey Laicure, What is the appropriate key for disabling the DNSCache service in CurrentControlSet. I found it but I need the Dword key for that. Thanks in advance.

    Apologies for the late response, unfortunately my Lumia phone is not with me right now though I have a blurry memory of the registry path.
    It is somewhere..

    Code:
    HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services
    or HKLM\SYSTEM\CurrentControlSet\Services

    then find DNSCache
    set the Start to 4 to disable then Restart your phone.

    You can also disable the tracking services (useful for w10m, procedure same as above):
    - dmwappushsvc
    - diagtrack

    For the updated hosts file, see this link.
    2
    Ok, adblocking via host file is finally working on my Lumia 950DS.
    First, install vcReg http://xdaforums.com/windows-10-mob...creg-lumia-reg-editor-interop-unlock-t3451723
    Proceeded to step 3, but did not do the unlock.

    Then installed Interopt Tools http://xdaforums.com/windows-10-mob...app-interop-tools-versatile-registry-t3445271.

    Via the "system console" inside interopt tools i was able to copy the customized host file to C:\Windows\System32\Drivers\etc