AdguardTeam / AdguardTeam/AdguardForAndroid

Automatically skip ads in apps using Accessibility Services

Aperta
#5,092 2 commenti 14 reazioni 0 assegnatari Vedi su GitHub
Feature request Priority: P4 TechAudit Voting
Lingua principale
Nessun dato sulla lingua
Stelle
1.9k
Fork
121
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

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

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.