如何阻止Android应用程序中的广告? -- ads 领域 android 相关 的问题

How to block ads in Android applications?


简体版||繁體版
27
vote

问题

中文

是否尝试阻止应用程序中的广告?例如,它似乎应该通过阻止Web请求到某些站点来理论上。

英文原文

Are there ways that attempt to block ads in applications? It seems that it should be theoretically possible, by blocking web requests to certain sites, for example.

  
 
 

回答列表

16
 
vote
vote
最佳答案
 

最流行的方法是用强制DNS查询到众所周知的广告服务器的内置主机文件替换内置主机文件,以导致127.0.0.1(localhost)。这有效地阻止了最常见的广告,以及应用程序中的大多数Google广告。

缺点是应用程序可以告诉广告被阻止,并且可以拒绝运行或以其他方式降低它们的实用性,而AD阻断有效。

此外,需要root访问权限替换主机文件。

除此之外,我还没有看到任何可以选择性地阻止Web请求的任意应用程序。对于仅使用ADS的Internet访问的某些程序,您可以使用防火墙应用程序来防止它们访问Internet或 - 如果您的ROM支持它(如最新的CyanogenMod) - 从应用程序中撤消Internet访问权限。< / p>

再次,root访问通常需要设置系统范围的应用程序级防火墙或替换您的ROM。

 

The most popular method is replacing the built-in hosts files with one that forces DNS queries to well-known ad servers to result in 127.0.0.1 (localhost). This effectively blocks most common ads, and most of the Google Ads in applications.

The downside is that applications can tell that ads are being blocked, and can either refuse to run or otherwise degrade their usefulness while the ad blocking is in effect.

Also, root access is required to replace the hosts file.

Beyond that, I haven't seen anything that can selectively block web requests for arbitrary apps. For some programs that only use internet access for ads, you could use a firewall app to prevent them from accessing the internet or -- if your ROM supports it (like the latest CyanogenMod) -- revoke the internet access permission from the app.

Again, root access is generally required to set up a system-wide app-level firewall or replace your ROM.

 
 
   
   
11
 
vote

有两个不同的应用程序, Adfree Android 和 adaway 那个块广告,理论上在所有应用程序中。您必须拥有一个扎根的手机才能使用这些手机。

Adfree Android由

工作

...向系统主机中的已知主机名订化请求 文件。

本质上是修改主机文件的自动解决方案,在这里由另一个用户提出。似乎adaway做同样的事情。

如果您没有rooted手机,则可以至少使用 Firefox浏览器使用Adblock Plus Addon(通过Firefox安装)。

 

There are two different apps, AdFree Android and AdAway that block ads, theoretically in all applications. You must have a rooted phone in order to use these.

AdFree Android works by

...nullifying requests to known host names in the system hosts file.

which is essentially an automated solution of modifying the hosts file, brought up by another user here. It appears that Adaway does the same thing.

If you do not have a rooted phone, you can, at the very least, use the Firefox Browser with the Adblock Plus AddOn (installed via Firefox).

 
 
4
 
vote

还可以使用防火墙或权限限制应用程序(例如,DROIDWALL或LBE PRITACY GUARD)来限制特定应用程序的Internet访问。这些也需要根。

 

You can also use a firewall or permissions-limiting application (DroidWall or LBE Privacy Guard, for example) to limit internet access for particular applications. These also require root.

 
 
3
 
vote
要禁用广告,您必须了解广告实际来自哪里。 有易于识别的广告服务器,通过编辑主机文件可以轻松避免这些(您可以通过ES文件管理器编辑rooted手机上的主机文件,或从终端会话到本地或从您的笔记本电脑/桌面上编辑)。

但是当广告服务器继续具有随机子域时,这可能是一个真正的努力,以继续追逐这些更新的服务器。 有应用程序(以前提到过)有助于缓解该任务 - 但它仍然是使用广告进行打击的同一种解决方案 - 然后阻止新服务器。 如果IP地址已硬编码,那么这些方法都没有工作。这是王牌。

另一个选项是启用拒绝特定应用程序的任何流量的防火墙。 这意味着:更新,广告,推统计等......不要使用您的数据计划,不要绑住手机。 avast!移动安全性(市场上免费或播放)为您提供粒度控制。 我在桌面和服务器上使用了avast,并在rooted gingerbread和cyanogenmod9(ICS)上运行它。 非常好的应用。

 

To disable ads, you have to understand where the ads actually come from. There are easy-to-identify ad servers, and those can be easily avoided by editing your hosts file (you can edit hosts file on a rooted phone through ES file manager, or from a terminal session be it local or from your laptop/desktop).

But when the ad servers keep having random subdomains, that can be a real chore to keep chasing those updated servers. There are applications (previously mentioned) that help to ease that task--but it still is the same solution of getting hit with ads--and then blocking the new servers. None of those methods work if the ip address gets hardcoded in. That is the trump card.

Another option is to enable a firewall that denies ANY traffic for a specific application. That means: updates, ads, pushing your stats, etc...don't use your data plan and don't tie up your phone. Avast! Mobile security (free on marketplace or Play) gives you granular control when you want it. I have used Avast on desktops and servers, and run it on rooted Gingerbread and CyanogenMod9 (ICS). Very good appl.

 
 
3
 
vote

除了基于DNS / IP地址的广告拦截器之外,我还推荐 minminguard (需要一个根手机和xposed框架)。它具有基于API的阻塞,其中广告网络SDK提供的功能呼叫被阻止。

minminguard是一个用Xposed框架的Android制作的广告remover。 Mininguard可以完全取消应用程序内的广告和 那些广告引起的空的空间。传统广告删除应用程序是 只能阻止广告内容,但广告的空间将会 仍然保持未使用(黑色)。迷人成功地删除了这一点 黑色空间,它扩展了应用程序窗口并制作您的 用户体验更好!

功能:

  • 完全删除广告。你可以注意到 adblock和adaway只停止显示广告内容,但它不能 删除最初由广告拍摄的空字段。 迷蒙可以完全取下空字段!
  • <轻巧。 删除应用程序(adblock等)的替代广告不断运行背景 VPN服务,在系统上造成沉重的负载。迷人 不需要运行VPN服务,因此它保存系统资源, 因此,延长电池寿命。
  • 每个应用设置。 Mininguard让您允许您 选择要从中删除广告的应用程序。如果你只想要 删除来自几个应用程序的广告,Mininguard是您的最佳解决方案。

minminguard屏幕截图

 

Aside from the DNS / IP address-based ad blockers, I'd also recommend MinMinGuard (requires a rooted phone and the Xposed Framework). It features API-based blocking, where function calls provided by the advertisement network SDK are blocked.

MinMinGuard is an Ad-remover made with Xposed Framework for Android. MinMinGuard can completely remove both the ads inside apps and the empty space caused by those ads. Conventional ads removing apps are only able to block the ad content, but the space taken by the ad will still remain unused (black). MinMinGuard successfully removes that black space, which extends the app window and makes your user-experience better!

Features:

  • Totally remove the advertisement. You can notice that AdBlock and AdAway only stops showing the ad content, but it can not remove the empty field that was originally taken by the ad. MinMinGuard can totally remove the empty field!
  • Lightweight. Alternative ad removing apps (AdBlock etc) constantly run a background VPN service, which puts a heavy loading on the system. MinMinGuard does not need to run a VPN service, so it saves system resources and, thus, extends the battery life.
  • Per App Setting. MinMinGuard lets you choose which apps you want to remove ads from. If you only want to remove ads from several apps, MinMinGuard is your best solution.

MinMinGuard screenshot

 
 
2
 
vote

Adblock Plus 现在可用于Android 。

这是 Lifehacker的评论:

如果您喜欢桌面上的Adblock Plus,您现在可以将其与您的Android手机一起使用。 Adblock Plus for Android在您浏览和甚至抑制广告支持的应用程序内的ADS上的Adds上的广告。最好的,这完全是免费的。

Adblock Plus for Android不需要对手机的root访问来抑制广告,但如果您的设备植被源,则最佳工作。如果您扎根,它将抑制超过3G / 4G和Wi-Fi的广告,无需其他配置。如果你没有植根而且你正在运行冰淇淋三明治,它会通过Wi-Fi块块,但不是3G / 4G。如果您的设备运行姜饼或更早版本,您必须设置adblock的代理手动让它工作。谈到代理,这就是Adblock Plus的Adroid Manage如何剥离所有这些广告:它通过他们的服务器路由所有流量,并在您的手机到达之前删除广告。

 

Adblock Plus is now available for Android.

Here's a snippet from Lifehacker's review:

If you love Adblock Plus on the desktop, now you can take it with you on your Android phone. Adblock Plus for Android blocks ads on sites while you browse and even suppresses ads inside of ad-supported applications. Best of all, it's completely free.

Adblock Plus for Android doesn't require root access to your phone to suppress ads, but works best if your device is rooted. If you're rooted, it'll suppress ads over 3G/4G and Wi-Fi with no additional configuration required. If you're not rooted and you're running Ice Cream Sandwich, it'll block ads over Wi-Fi but not 3G/4G. If your device is running Gingerbread or earlier, you'll have to set up Adblock's proxy manually to get it to work. Speaking of proxies, that's how Adblock Plus for Android manages to strip out all of those ads: it routes all of your traffic through their servers, and removes the ads before it gets to your phone.

 
 
 
 
1
 
vote

虽然不完整我有一个解决方案,适用于我。 我在我的LAN中配置了DNSMASQ DNS服务器,以提供0.0.0.0作为对指定广告主机名的响应。

Pro是我有一个解决方案,可以为我的平板电脑和手机修复这个解决方案,而无需root。 CON是它在我的WiFi上只能在家里工作。

 

Although incomplete I have a solution in place that is sufficient for me. I have configured the dnsmasq dns server in my lan to serve 0.0.0.0 as the response to a specified set of advertising hostnames.

The pro is that I have one solution that fixes this for both my tablet and my phone without the need to root either of them. The con is that it only works at home on my wifi.

 
 
1
 
vote

我喜欢防火墙方法。最近安装了 noroot防火墙并通过试验和错误找到如果我阻止访问l [ab] -in-f [0-9] {3} .1E100 .NET(实际上,应用程序不支持地址中的Regex),广告不会通过。< / p>

 

I like the firewall approach. Recently installed the NoRoot Firewall and by trial and error found that if I block access to l[ab]-in-f[0-9]{3}\.1e100\.net (actually, the app doesn't support regex in addresses), ads don't get through.

 
 
1
 
vote

我在现有的应用程序之前发生了类似的问题可以解决我的问题,而且我不能罗源我的公司电话临时政策。然后我意识到您可以单独为每个连接(WiFi和4g)配置代理。所以我安装了一个鱿鱼,配置为阻止大多数恼人的广告站点并在Docker中部署。 长话短说:

  docker run -d -p 3128:3128 --name squid-adblock andrassebo/squid-adblock   

然后在手机上配置代理以使用托管机IP地址和3128作为端口。

如果您想检查详细信息或简单地编译自己的图像,请在Github上找到源代码: source 和dockerhub:图像

 

I had similar problem before and non of the existing apps could solve my problems, furthermore I cannot root my company phone due policy. Then I realized that you can configure proxy for each and every connection (wifi and 4g) separately. So I installed a squid, configured to block most of the annoying ad sites and deployed in docker. Long story short:

docker run -d -p 3128:3128 --name squid-adblock andrassebo/squid-adblock 

Then configure the proxy on your phone to use the hosting machines IP address and 3128 as port.

If you would like to check details or simply compile your own image, the source code is available on GitHub: source and DockerHub: images

 
 
0
 
vote

最新的Android Market应用程序(我有3.15,这是我第一次注意到选项)可以选择允许您防止Google或Admob广告跟踪您并个性化广告为了你的兴趣。如果这就是你想要停下的那么,那么它只是一个标记箱。

打开市场应用程序,按菜单滚动到其他设置标题,您应该看到:

谷歌Admob广告:根据我的兴趣来个性化广告

选择 是否在移动应用程序中为Google和Admob个性化广告 这个设备。 了解更多

只需从该标记框中删除勾选:

选择退出

如果您选择退出,您的设备标识符信息将不是 谷歌使用用于广告前进,您不会收到 广告基于您的兴趣或推断人口统计数据。

 

The latest Android Market app (I have 3.15 which is the first time I've noticed the option) has an option to allow you to prevent Google or AdMob ads from tracking you and personalizing the ads to your interests. If that's all you want to stop, then it's just a tickbox away.

Open the Market app, pressMenu scroll down to the Other Settings heading where you should see:

Google AdMob Ads: personalize ads based on my interests

Choose whether to personalize ads from Google and AdMob in mobile apps on this device. Learn more

Just remove the tick from that tickbox to:

Opt out

If you opt-out, your device identifier information will not be used by Google for advertising going forward and you will not receive ads based on your interests or inferred demographics.

 
 
     
     
-2
 
vote

答案是:理论上是,实际上没有。几年来以来通过了问题,但广告软件甚至更糟糕。

"块广告" 的最佳方法是"摆脱产生它的代码" 。这是非常难以实现的,因为这需要摆脱与当前世界经济模型和企业家有关的广告软件。这就像恢复世界各地的所有人,非常彻底地反应广告和最终的广告:"无论是不使用Android OS /设备" 。这可能通过儿童教育,通过播种强烈的想法,如"广告是一种犯罪像色情/盗窃/欺骗和猜测/恐怖主义/恐怖主义/恐怖主义/毒品" ......在几代人一代广告之后最终会饿死,因为任何"与我们有关的活动" 都指的是将被视为将被认为的组织审议,应该适用和销售巨额罚款税,以及发布被判入狱的人。

存在其他,更快的方法:它是创建一个组,谁将开发Android替代固件,基本上与Android相同,但许可术语明确禁止使用广告,也许甚至一些禁止/防火墙引擎嵌入系统和用户轻松调谐。良好的实现将是非常昂贵的,并且需要时间在一个单一的电话上。但这将肯定强迫Android社区做出反应。

这是一些有效的方法,但任何真正的行动都应该涉及谷歌,这应该"改变它的思想并变成白色而蓬松" ,以便真正摆脱Android中的广告。这是不太可能实现的,具有当前的世界经济模型。

 

The answer is: theoretically yes, practically no. Several years passed since the question, but adware got even worse.

Best way to "block ads" is to "get rid of code that produces it". This is very hard to achieve, because this would require to get rid of adware roots, which are related to current world's economical model and entrepreneurship. It's like to rehabitate all people around the world, to react ads very drastically and ultimative: "either no ad, either no use of android os/devices". This could happen through children education, via seeding strong idea, like "ads is something criminal like porn/theft/deception and speculation/terrorism/narcotics"... In such way, after several human generations adware would eventually starve, because any "ad-related activity" would refer to organisation which will be considered "codnucting illegal activity" and enormous penalty tax should be applied, and person who publish ad jailed.

There exists other, faster way: It is to create a group, who would develop android alternative firmware, essentially same as android, but with licensing terms explicitly disallowing using of ads, and maybe even some banning/firewall engine, embedded into system and easily tunable by users. Good implementation would be very costly, and it would take time to put it on a very single phone. But that would definetely force android community to react.

That is some effective approaches, but any real action should involve Google, which should "change its mind and become white and fluffy" in order to really get rid of adware in android. This is very unlikely to achieve, with current world's economical model.

 
 
       
       

相关问题

0  在我的锁屏上出现的广告,无法识别Culprit应用程序  ( Ads appearing on my lock screen cannot identify the culprit app ) 
今天早上,这几乎没有锁定屏幕上。它似乎是间歇性的,只有在三次中替换真正的锁屏。有没有人看过它? ...

0  如何阻止OS应用程序弹出窗口?  ( How to block an os app popup ) 
我的智能手机上的东西每天发一条消息,有时我看到底部的一个微小的黑暗背景弹出窗口,说它是这样做的。 这种应用似乎与SIM卡相关,因为我收到的弹出窗口来自我的手机提供商/运营商/运营商。 一秒钟后我收到这个: app name是"serviçostim" 。 该应用程序包名称是"com.android.stk...

4  即使您的手机离线也仍然看到广告吗?  ( Do you still see ads even if your phone is offline ) 
矿山叔叔拒绝使用Astro文件管理器的免费版本,因为他不喜欢广告。 我告诉他只是离开他的3G休息(无论如何,他只使用它),无论如何,他不应该看到它们,因为我的期望是他们无法下载。 但这真的是真的吗?我用愤怒的小鸟试过它,然后关闭3G后,我不再看到任何广告,但这可能? ...

0  解锁后如何删除空白的白色屏幕  ( How remove blank white screen after unlocking ) 
我正在使用华硕z010d android智能手机。最近它在解锁后显示了一个白色的空白屏幕。我需要触摸后退按钮返回主屏幕。任何人都知道如何删除白色屏幕,请讲述说明。 =======更新======= 我的手机已被感染恶意软件,广告,以便在滑动时始终显示白色空白屏幕以解锁手机。我试图重新重置它,但无法恢复。实际上,如...

1  为什么我可以获得关于当地商店的购物车通知?  ( Why am i getting shopping trolley notifications about local store savings ) 
我正在经常出现"购物台车" 通知。 通知如下所示: 通知是关于当地超市的"储蓄" ,这是它! 是谷歌地图或谷歌助手等其他应用程序的通知吗?我正在努力找到特定的设置来禁用通知。 我也有兴趣知道此通知是否可以以任何方式进行目标,由商店生成的广告。我与商店的营销偏好是选择退出,这让我感到非常愚蠢的广告。肯定是谷...

0  Google Play的截图中的ADMOB广告[已关闭]  ( Admob ads in screenshots for google play ) 
关闭。这个问题是 off-topic 。它目前不接受答案。 想要改进这个问题?更新这个问题,所以它是关于android爱好者堆栈交换的主题。 关闭 ...

4  关闭WhatsApp后为什么会看到广告?  ( Why do i see adverts after closing whatsapp ) 
每次关闭whatsapp我得到某种广告。 根据他们的网站他们不宣传,但我看到广告喜欢关闭应用程序后: 单击较大版本 的图像 我已联系Whatsapp支持团队,他们的回复是: whatsapp不宣传。如果您看到了您的广告 设备,它来自您的设备而不是WhatsApp。 如何在它自己的方式通告?? ...

-1  在Android应用程序中禁用广告最有效的方法是什么? [复制]  ( What is the most effective way to disable ads in an android app ) 
这个问题已经在这里有答案: 关闭 8年前。 可能的重复: 它是否可以阻止Android应用程序中的广告? 我已经阅读了方法,但他们不会阻止/禁用广告。 ...

0  您的设备软件超出了广告软件  ( Your devices software is out of date adware ) 
我一直从各地带我到播放商店说我需要下载超级文件管理器。我最近从网络上安装了APK。我安装后知道它是一种病毒。该应用程序在设置中的"应用程序" 部分中未显示。我试图卸载它,但我找不到任何东西。在Moto Z解锁Android 6.0.1 ...

2  如何在Firefox中删除Android的底部促销横幅?  ( How to remove the bottom promo banners in firefox for android ) 
当您使用Firefox for Android时,您会定期查看横幅促进同步,主题等的应用程序功能。 有没有办法禁用它并摆脱冲浪的分散注意力? ...




© 2022 it.wenda123.org All Rights Reserved. 问答之家 版权所有