• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

AdHell 2 - Rootless Ad Blocking

Status
Not open for further replies.
Search This thread

mmotti

Senior Member
Nov 11, 2014
661
580
What's the reason to block port 53?

If it's possible to set app specific rules, would it be possible to extend adhell to block internet access completely for some apps?
I'm not sure if they've rolled it back, but at some point Google started using async DNS which effectively bypassed adblockers (including Adhell).

Theoretically it's possible to block all Internet access to specific apps - it's just having the coding knowledge / time to be able to code it in. There isn't really 'active' development on this app atm.
 
  • Like
Reactions: meduza

reglaspv

Senior Member
Sep 21, 2008
134
17
I take no credit for this, but hopefully this will help someone. Let me know if I missed/messed up a step.

Thanks for your effort but even if I tried all the steps, it's not working.

I even revoke the first license, generate a second one and tried again, but no luck and after I press Activate License, it takes some 20 seconds then a toast message, Activation failed.
 

Estebanquito

Member
Aug 22, 2012
22
0
It should say it on your main key page. If not, you didn't make a legacy key and need to make one.

Thanks man! I dont know why but the 1st key I generated doesnt allow me to revoke it. It was a Samsung Knox license key (yeah my bad). I make a new Enterprise one and it worked. I also changed the ap ID with android studio following the steps in page 179.
 

jed84

Senior Member
May 25, 2013
231
38
My key stopped working today. Followed all the steps. Generated new key and getting an error 'activation failed'.
Is there a fix already?
 

devilnat

Senior Member
Feb 7, 2013
58
22
https://github.com/mmotti/Adhell2

I have updated my Github. Port 53 should now only be blocked for Chrome packages (or the three that I am aware of - Standard, Beta and Canary).

If you were having issues with Netflix or another app, please give this a try and see if it resolves the issue. Otherwise it's likely an issue with a list that you are using.

It will require a manual build using the instructions that I have posted previously. I have not generated any APKs for this.

After install, disable and enable blocking.
First of all, Thank you. My Netflix and another streaming app are working again with your new update. So far this build is working fine for me and I haven't seen ads in Chrome. :good:
 
  • Like
Reactions: mmotti
J

joyrul96

Guest
https://github.com/mmotti/Adhell2

I have updated my Github. Port 53 should now only be blocked for Chrome packages (or the three that I am aware of - Standard, Beta and Canary).

If you were having issues with Netflix or another app, please give this a try and see if it resolves the issue. Otherwise it's likely an issue with a list that you are using.

It will require a manual build using the instructions that I have posted previously. I have not generated any APKs for this.

After install, disable and enable blocking.
Nice thanks again for all your work. I installed Adhell 2 with your instructions like last week and is activated and so far i had no problems and i don't use Netflix and only use Samsung Internet Browser i don't use Chrome so not sure if i should install this one instead aswell.

Is there a list of apps that had issues with blocking Port 53? Only streaming apps i use are Youtube Gaming and Twitch. I did have some random buffers on Twitch not sure if that's just my internet connection or to do with Adhell 2. Thanks.
 
Last edited:

mmotti

Senior Member
Nov 11, 2014
661
580
Nice thanks again for all your work. I installed Adhell 2 with your instructions like last week and is activated and so far i had no problems and i don't use Netflix and only use Samsung Internet Browser i don't use Chrome so not sure if i should install this one instead aswell.

Is there a list of apps that had issues with blocking Port 53? Only streaming apps i use are Youtube Gaming and Twitch. I did have some random buffers on Twitch not sure if that's just my internet connection or to do with Adhell 2. Thanks.

I'm not sure exactly what applications were having issues. The only reports I saw were of Netflix.
 

Shialie

Senior Member
May 5, 2013
82
86
i think so...

Adhell (1) deactivated itself today. I then tried Adhell2 and SABS and both fail to acticate the licence.
Am I dumb or did Samsung pulled the plug?
I'm on a S7, not S8

I tried everything possible you could imagine to get Adhell2 working again, including:
- Rebuild with Android Studio
- Complete new Samsung Account and "fresh" license Keys
- even uploadad the individual packagename and public hash
- tried every Licensekey that is listed in SEAP

And every damn time the "Activation failed.." toast-message appears.

:crying: i hate ads
 

mmotti

Senior Member
Nov 11, 2014
661
580
I tried everything possible you could imagine to get Adhell2 working again, including:
- Rebuild with Android Studio
- Complete new Samsung Account and "fresh" license Keys
- even uploadad the individual packagename and public hash
- tried every Licensekey that is listed in SEAP

And every damn time the "Activation failed.." toast-message appears.

:crying: i hate ads

Generate new key - > legacy keys (bottom) - > knox standard and select enterprise key.
 
Last edited:

snk012

Senior Member
Jun 16, 2009
90
19
Anybody able to activate? I've followed the steps and generated a legacy SDK enterprise key and I am still greeted with the license check fail..
 

bigeric828

Senior Member
Feb 24, 2011
70
16
boston
No problems on my end.

If it's failing to activate, list your phone model and current OS version, which version you downloaded, etc.

Remember, most likely, you will need to change the package name slightly for it to even have a chance at working as Samsung blocked it.
 

snk012

Senior Member
Jun 16, 2009
90
19
No problems on my end.

If it's failing to activate, list your phone model and current OS version, which version you downloaded, etc.

Remember, most likely, you will need to change the package name slightly for it to even have a chance at working as Samsung blocked it.
I'm using a Samsung Galaxy S8+ on Verizon. I've downloaded the apk few pages back and renamed the apk using an apk editor to something conspicuous. I've also named the alias something that isn't adhell and was able to generate a legacy sdk key but when I submit the key and try to activate, I get the same license failure pop up

Sent from my SM-G955U using Tapatalk
 

bmszabo

Senior Member
May 19, 2007
361
42
Adhell 1 says 'activate license' (started few days ago), only option is to push this button, after what 'failure to license' message appears -but as far as I can judge, Adhell (v1) still works fine; blocks all the defined ad sites (easy check in my case is Facebook, as I have blocked it because of the horrible many ads coming through FB -and FB site is still blocked all right), so (I think) Adhell (1) still works, even with 'failure to license' message.

What I don't know is what happens if I want to uninstall Adhell (1) and re-install it (v2?); as far as I see now, the only way to do it is uninstalling package (license button is the only button I can push when starting Adhell), but would it stop all the firewall restrictions?
Any ideas on this (* Adhell working even with 'failure to license' and * uninstalling Adhell package stops restrictions)? Thanks!
 

Proday

Senior Member
Sep 19, 2010
271
36
I still don't have any problems with "activate licence" on adhell (1) on my s8 and my n8 too. But I disable update service and have firmware from july on s8 and from start of december on n8 (I never update firmware if it woarks well out of box...have malwarebutes for security).

Sent from my SM-N950F using Tapatalk
 
Status
Not open for further replies.

Top Liked Posts

  • There are no posts matching your filters.
  • 223
    5aHYJta.png

    AdHell 2

    Code:
    *** Disclamer
    
    I first want to note that the original developer did not help me in any way with this, he did not provide me with the code (it was found from public forks from his Github), nor guidance on modifying the app. I do not want to cause him any further inconvenience or trouble with his job.
    I simply forked the code and made some minor changes, so majority credit goes to the original dev, but as he is now dissociated from the project any other developers (including some of the contributors from the first version) are welcome to help continue. I take no responsibility for any issues this app may cause with your device.

    Introduction
    Hi everyone, since Adhell was removed from the Play Store and the code was taken down from Github, I (not the original developer) got a copy of the publicly available code and made some changes to remove dependence on the original developer's server and removed the subscription on the new permissions feature. It was a very quick and dirty edit, but it was just to ensure the app still works once the original developer takes down everything related from his website, which the app relies on.
    The way this app works was to utilize Samsung's Knox framework which included a Firewall feature that allowed ads to be blocked. The additional features such package disabling and permission blocking were also done through Knox. In order to make a Knox compatible app, a license has to be used, and the only way to get one is from Samsung unfortunately. It is fairly easy to get a "development" key from Samsung which lasts for 1-3 months (I believe) and so I have modified the app to require each user to enter their own key. I know this is not ideal, but it will keep working like this, and it reduces threat of Samsung revoking the license and disabling the app entirely for everyone. If any developer wants to help me rework the app, please let me know, help is definitely appreciated, and my code is still open source and available on Github. I'm a broke college student with very little time to work on this, and am by no means a professional dev, so I apologize in advance for slow updates and probably little in the way of additional features. I will do my best to keep it working.

    Installation instructions
    So to procure your own "developer" license, you need to go to this link, and either register for a Samsung account or sign into your own, and then enroll as a developer. After that proceed to this link and generate a Knox Standard SDK Enterprise license key with a generic "key alias" (I recommend something like "testing", not something like "adhell", just in case). Copy over the key to your device somehow (email, Join, Pushbullet, etc.) as it is pretty long. When you open up the new Adhell 2 app, you will see a popup asking you to enable device admin access, enter a key, and then enable license, do the three steps in that order. If the key is not entered correctly, the license will not activate.

    Download
    This link will randomize the package name to stop Samsung from blocking the app. Every 2 minutes you can rebuild the app, but please only do this if the current version stop working.
    http://adhell.nobelium.xyz

    Changelog
    Code:
    Current changelog: -- 8/27/17
    [note] -- Made all features free
    [changed] -- Changed app to rely on user supplied Knox license

    If anyone wants to donate, it is very much appreciated, and here is a PayPal link - this will go towards funding my college tuition which is too damn expensive.
    The app will be free and I will not be re-enabling the subscription or making any features premium.

    XDA:DevDB Information
    AdHell 2, Device Specific App for the Samsung Galaxy S8

    Contributors
    FiendFyre, Raymonf
    Source Code: https://github.com/MilanParikh/Adhell2


    Version Information
    Status: Beta
    Current Beta Version: 2.2.0
    Beta Release Date: 2017-11-27

    Created 2017-08-27
    Last Updated 2017-11-27
    27
    Maybe you give simple instruction, for correctly build unique personal app on local user machine in Android SDK?

    Manually building a debug APK using Android Studio:
    1. **First installation only: Turn off and delete / uninstall AdHell.
    2. On your phone, enable USB Debugging in Settings --> Developer Options
    3. Open my GitHub page: https://github.com/mmotti/Adhell2
    4. On the right-hand size, select Clone or Download
    5. Choose Download ZIP
    6. Once the download has completed, extract the zip file
    7. Download and install Android Studio (https://developer.android.com/studio/index.html)
    8. Open Android Studio
    9. Select Open an existing Android Studio project
    10. Navigate to your extracted zip file
    11. Select Adhell2-master and press OK
    12. At this point you may need to install SDK / build tools. Follow the onscreen instructions to do so.
    13. Wait until Gradle Build Running finishes (visible at the bottom).
    14. On the left-hand side, select the Gradle Scripts drop down
    15. Double click Build.Gradle (Module:app)
    16. Locate: applicationId "com.fiendfyre.AdHell” and change the digits after AdHell to a random sequence (e.g. “com.fiendfyre.AdHell14342”)
    17. You will see an alert at the top stating that Gradle files have changed. Click Sync Now.
    18. Wait for the Gradle Build process to finish
    19. Connect your phone VIA USB
    20. Press the Play button (triangle) at the top right
    21. Your phone should be visible – Select it and press OK.
    You may need to press allow on your phone at some point, too!

    Adhell2 should then be installed and launched. Enable Admin and activate it as you normally would.

    ** Remember what you set as your applicationId. If you set your unique numbers the same each time, there will be no need to uninstall AdHell… It will simply install the newer APK over the old one.
    26
    Easy (temporary) fix for the recent adblocking issues with Adhell

    I hope this helps everyone who is experiencing the recently surfaced issue with Adhell ad blocking in Chrome. Read on if you have recently started seeing ads in Chrome, while Firefox and other apps are unaffected and blocked.

    The cause of the issue is Chrome itself (not Adhell). It appears that Chrome has a built-in DNS client. Under certain conditions related to the accessibility of certain Google servers, Chrome bypasses the OS DNS client and starts using its own asynchronous DNS client. Thus, even if we are pushing our own hosts file using one of Knox APIs, Chrome (and only Chrome) will retain the ability to resolve the ad servers IPs.

    The current (temporary) fix for that is as follows:

    1. Go to chrome://flags
    2. Search for "dns"
    3. Set the "Async DNS" option to "Disabled". Close tab.
    4. Go to chrome://net-internals
    5. Select the DNS tab, and tap on "Clear Cache"
    6. Restart Chrome

    Voila - Chrome will fall back to the OS DNS client, and ad blocking will be back to normal.

    This is a temporary fix, as undoubtedly our friends at Google will remove the async DNS flag eventually. After all, why even bother to build in a horrible, insecure feature like this other than to fight hosts-based ad blockers? The long-term fix would be to block any and all DNS queries (UDP or TCP port 53) made by Chrome app directly. It really should not be doing that.

    I am contemplating a complete switch to Firefox after this fiasco.
    18
    OK. I have used a script to build 50 unique AdHell2 APKs and then uploaded them to a free web host (excuse the weird domain name – their choice, not mine).

    http://mmotti.epizy.com/

    The page will provide you with a random download link for one of the 50 APKs.

    I could not think of a quicker or simpler solution. As each APK takes between one and two minutes to build and an eternity to upload on my 1Mbps upstream, 50 is as many as my patience will allow for now.

    OP had a good solution in place, but this is simply a temporary measure until he is able to resolve the site issues.

    Edit: Expect slow download speeds.
    16
    I have credited you in a comment on your files and in a comment to the specific commit. How do I also credit you correctly on github? Can't find any option to add contributors or collaborators.
    Thanks, man :)

    If I'm honest, I'm not sure. I'm relatively new to Github myself :silly:

    ---------- Post added at 06:36 PM ---------- Previous post was at 05:54 PM ----------


    Download Adhell 2

    100 unique APKs generated and uploaded to:

    mmotti.epizy.com

    giphy.gif