AdguardTeam / AdguardTeam/AdguardForAndroid

Automatically skip ads in apps using Accessibility Services

未关闭
#5,092 2 条评论 14 个 reaction 已指派 0 人 在 GitHub 查看
Feature request Priority: P4 TechAudit Voting
主要语言
没有语言数据
星标
1.9k
派生
121
PR 合并指标
30 天内没有已合并 PR

描述

## Issue Details

We are somewhat limited in our ability to block ads in apps; achieving normal HTTPS filtering isn't feasible. Moreover, this isn't always sufficient to block in-app advertising (which often involves hardcoded pop-ups requiring user action to close them).

## Proposed solution

We can attempt to use Accessibility Services to automatically close ad messages or skip ads. A good example is advertising on YouTube, which can be automatically skipped.

### Declarative rules

It's crucial in this task not to simply hardcode some rules, but to provide the ability through our filtering system to set rules in a declarative mode, which will govern the new module. When designing this new type of rule, it is essential to consider that we may implement them on other platforms in the future.

### Documentation

We also need to describe in our knowledge base the debugging tools that filter developers will need to use for studying the content of apps and automation (i.e., identifying element IDs, setting conditions for when to click, etc.).

### What capabilities will the new type of rules have?

Accessibility Services generally allow the emulation of user actions: clicking on elements, reading element contents, turning sound on and off (useful on YouTube and Twitch to mute ad sound), etc. To understand the capabilities we need, we should first gather information on real applications where this could be useful.

@AdguardTeam/filters-maintainers please add examples of such apps in comments to these issues. You can link tasks from AdguardFilters for that.

### Examples

1. Youtube app. Whenever there's an ad playing, we can do the following: disable volume, wait for the "Skip Ads" button and tap it. Real-life example: https://github.com/alfeugds/adskipper/blob/main/app/src/main/java/com/alfeugds/adskipper/AdSkipperAccessibilityService.kt

2. X (Twitter) app. Whenever there's an ad in the feed, we can automatically click "Not interested in this ad" and Twitter then will hide it.

## Alternative solution

To be honest, I see no alternative solution to this approach for blocking hard-coded in-app ads.

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。