Skip to content

Commit 8084108

Browse files
Merge branch 'master' into feature/AG-31991
2 parents 8013053 + f3a4cfd commit 8084108

File tree

1,612 files changed

+30630
-14970
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,612 files changed

+30630
-14970
lines changed

docs/adguard-browser-extension/mv3-version.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ The maximum number of simultaneously enabled filters is **50**.
5555

5656
**Dynamic rules:** a strict cap of **5,000** rules is imposed, which includes a maximum of 1,000 regex rules.
5757

58-
If this limit is exceeded, only **5,000 converted rules** will be applied in the following order: first Allowlist, then User rules, Custom filters, and finally — Quick Fixes filter.
58+
If this limit is exceeded, only **5,000 converted rules** will be applied in the following order: first Allowlist, then User rules and finally Custom filters.
5959

6060
> **Converted rules** are rules that have been transformed
6161
> to [DNR format] using the [declarative converter][github-declarative-converter].
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
---
2+
title: User Scripts API
3+
sidebar_position: 8
4+
---
5+
6+
:::info
7+
8+
This article is about AdGuard Browser Extension, which safeguards only your browser. To protect your entire device, [download the AdGuard app](https://adguard.com/download.html?auto=true).
9+
10+
:::
11+
12+
When adding a custom filter or user rule, a notification will appear asking you to enable the Developer mode to use these features in the extension.
13+
14+
![Notification *border](https://cdn.adtidy.org/content/Kb/ad_blocker/browser_extension/notification-allow-user-scripts.jpg)
15+
16+
Starting with version 5.2, AdGuard Browser Extension uses the User Scripts API. Chrome requires this new API to follow best practices for user safety.
17+
18+
## What is the User Scripts API?
19+
20+
The User Scripts API is a tool that allows extensions to run customized JavaScript scripts on webpages. These are often used to modify or enhance websites in ways that aren’t originally provided by the website itself.
21+
22+
With the shift to Chrome’s Manifest V3, many older methods of injecting scripts are limited or delayed. However, there is an exception for the User Scripts API.
23+
24+
Learn more about the impacts of the MV3 policies in our [blog post](https://adguard.com/en/blog/review-issues-in-chrome-web-store.html).
25+
26+
## How to enable the Developer mode
27+
28+
To use custom filters and JavaScript rules in the *User Rules* tab, you must set up your browser first. This will give the extension a reliable and secure method of injecting scripts into webpages at the optimal time. Follow the instructions below depending on your Chrome version.
29+
30+
### For Chrome versions prior to 138
31+
32+
You must enable Developer mode for extensions. To do so, open the Chrome menu by clicking the three dots in the upper-right corner, go to *Extensions**Manage extensions*, and toggle the *Developer mode* switch.
33+
34+
![Manage Extensions *border](https://cdn.adtidy.org/content/Kb/ad_blocker/browser_extension/developer-mode-enable1.jpg)
35+
36+
### For Chrome version 138 and later
37+
38+
You must enable the *Allow user scripts* toggle. To do so, open the Chrome menu by clicking the three dots in the upper-right corner, go to *Extensions**Manage extensions*, go to AdGuard Browser Extension’s *Details*, and toggle the *Allow user scripts* switch.
39+
40+
![Manage Extensions *border](https://cdn.adtidy.org/content/Kb/ad_blocker/browser_extension/allow-user-scripts1.jpg)

docs/adguard-for-android/features/features.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ General, advanced, and low-level settings that let you select the language and t
3535

3636
## Low-level settings guide
3737

38-
Descriptions of the low-level settings available in AdGuard v4.3 for Android and later.
38+
Descriptions of the low-level settings available in AdGuard for Android v4.3 and later.
3939

4040
[Low-level settings guide](/adguard-for-android/features/low-level-settings.md)
4141

docs/adguard-for-android/features/low-level-settings.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ To access *Low-level settings*, open the AdGuard app and tap the gear icon in th
2121

2222
## Low-level settings
2323

24-
For AdGuard v4.x for Android we’ve completely redesigned the low-level settings. We have reworked the list of settings and organized them into thematic groups with improved descriptions. We also added input validation and other safety valves.
24+
For AdGuard for Android v4.x we’ve completely redesigned the low-level settings. We have reworked the list of settings and organized them into thematic groups with improved descriptions. We also added input validation and other safety valves.
2525

2626
### DNS protection
2727

@@ -205,10 +205,6 @@ Here you can set the delay in milliseconds before AdGuard reschedules the restor
205205

206206
Here you can set the maximum transmission unit (MTU) of the VPN interface. This is the maximum size of the data packet used in your local VPN. The recommended range is 1500-1900 bytes.
207207

208-
#### Restore VPN automatically
209-
210-
If this setting is enabled, AdGuard’s local VPN will be automatically re-enabled after being turned off due to network absence, tethering, or low-power mode.
211-
212208
#### Packet capture (PCAP)
213209

214210
This setting enables logging of TUN interfaces. When enabled, AdGuard creates a file `timestamp.pcap`, such as 1682599851461.pcap, in the app cache directory. This file lists all network packets transmitted through the VPN and can be analyzed using the Wireshark tool.

docs/adguard-for-android/features/protection/private-browser.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ This article is about AdGuard for Android, a multifunctional ad blocker that pro
1111

1212
In v4.7, AdGuard for Android introduced an in-app private browser. You can access it from the main screen by tapping the *Private browser* button or from the *Protection* tab, where you can find some customization options.
1313

14-
![Private browser](https://cdn.adtidy.org/content/release_notes/ad_blocker/android/v4.7/agpb_en.png)
14+
![Private browser *mobile](https://cdn.adtidy.org/content/release_notes/ad_blocker/android/v4.7/agpb_en.png)
1515

1616
Here's what you can set up:
1717

docs/adguard-for-android/features/settings.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,12 @@ The *Local VPN* mode doesn't allow AdGuard to be used simultaneously with other
132132

133133
- *Automatic proxy* is an alternative traffic routing method that does not require the use of a VPN. One significant advantage is that it can be run in parallel with a VPN. This mode requires root access.
134134

135+
:::note
136+
137+
Please note that DNS filtering will still be active in *Automatic proxy* routing mode, and your device may not be able to filter DNS requests from specific apps. In *VPN* routing mode, apps are excluded from the local VPN by system means. Therefore, the system resolver sees which apps are included in the VPN and which are not. It either allows them into the local VPN or lets them bypass it. However, DNS requests come from the system resolver, not the application. In *Automatic proxy* mode, it is only possible to exclude traffic from applications, not their DNS queries, because AdGuard sees them as system queries.
138+
139+
:::
140+
135141
- *Manual proxy* involves setting up a proxy server on a specific port, which can then be configured in Wi-Fi settings. This mode requires root access for Android 10 and above.
136142

137143
## License

docs/adguard-for-android/solving-problems/adguard-for-android-tv.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,3 +58,31 @@ Done, AdGuard for Android TV is installed.
5858

5959
- In the terminal, enter the command `adb install Downloads/adguard_tv.apk`. If necessary, replace `Downloads/adguard_tv.apk` with your path.
6060
- Wait for a message in the terminal indicating the successful installation of the app.
61+
62+
## Installing AdGuard for Android TV via atvTools
63+
64+
**Important:** Your smartphone and TV with Android TV (TV box) must be on the same local network.
65+
66+
1. Install the [atvTools](https://play.google.com/store/apps/details?id=dev.vodik7.atvtools) app on your Android smartphone
67+
68+
1. Connect **atvTools** to **Android TV**
69+
70+
1. Enable developer mode on your Android TV device
71+
72+
`Settings``Device settings``About device` → Tap `Android TV build` until you see a message confirming that you have successfully obtained developer status
73+
74+
1. Enable USB debugging on your Android TV device
75+
76+
Go to `Settings``Device settings``For developers``Debugging`, allow and enable `USB debugging`
77+
78+
1. Launch **atvTools** on your smartphone
79+
80+
1. Find the desired **Android TV** device in the list and click it
81+
82+
1. Allow the connection on the TV
83+
84+
1. Download the [AdGuard for Android TV](https://agrd.io/tvapk) installer to your smartphone as an **APK** file
85+
86+
1. In **atvTools**, click **Install** on the main screen and wait (less than a minute) until the **AdGuard for Android TV** icon appears in the list of applications
87+
88+
![Main screen *mobile](https://cdn.adtidy.org/content/kb/ad_blocker/android/solving_problems/android-tv/main-screen.png)

docs/adguard-for-android/solving-problems/background-work.md

Lines changed: 41 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -173,17 +173,13 @@ To set up AdGuard's background work for Xiaomi devices you should pay attention
173173

174174
## Samsung
175175

176-
On many Samsung devices, any app that is unused for 3 days will not be able to start from background. You should turn off **Adaptive battery** and **Put apps to sleep** options wherever possible to prevent that. Note that after an app or OS update, these settings often revert to their default values and will need to be turned off again.
176+
On many Samsung devices, apps that have been unused for three days will not be able to start from the background. To prevent this, you should turn off the **Adaptive Battery** and **Put apps to sleep** options wherever possible. Note that after an app or OS update, these settings often revert to their default values and must be turned off again.
177177

178178
### Android 11+
179179

180-
On Android 11, Samsung will prevent apps (including AdGuard) from working in background by default unless you exclude them from battery optimizations. To make sure AdGuard will not get killed in the background:
180+
On Android 11, Samsung prevents apps (including AdGuard) from working in the background by default, unless you exclude them from battery optimizations. To ensure that AdGuard will not be terminated in the background:
181181

182-
1. Lock AdGuard in Recent
183-
184-
- Open **Recent apps**.
185-
- Find AdGuard.
186-
- Long-press the icon of the AdGuard app.
182+
1. Lock AdGuard in **Recent apps**: open **Recent apps**, find AdGuard, and long-press the AdGuard app icon.
187183

188184
1. To keep AdGuard working properly:
189185

@@ -195,51 +191,61 @@ On Android 11, Samsung will prevent apps (including AdGuard) from working in bac
195191

196192
![Samsung](https://cdn.adtidy.org/content/kb/ad_blocker/android/solving_problems/background-work/samsung-a11-optimize-2.png)
197193

198-
On some devices, the relevant setting may be named differently and be located in other places. Among the possible paths is:
194+
On some devices, the relevant setting may be named differently and be located in other places. Among the possible paths is **Settings****Apps** → (⁝) menu → **Special access****Optimize battery usage**. Find AdGuard on the list and uncheck it.
195+
196+
1. Disable automatic optimization:
197+
198+
Open **Battery** → (⁝) menu → **Automation** and toggle off all the settings there.
199+
200+
Again, the exact path may differ. For example, on some devices you should go to phone **Settings****Device care** → (⁝) menu → **Advanced** and isable **Auto optimization** and **Optimize settings**.
201+
202+
1. If your phone has this option, disable **Adaptive battery**:
199203

200-
**Settings** **Apps**(⁝) menu → **Special Access****Optimize battery usage** → Find AdGuard on the list and uncheck it
204+
Open phone **Settings****Battery****More battery settings** and toggle off **Adaptive battery**
201205

202-
1. Disable automatic optimization. To do so:
206+
1. Disable **Sleeping apps** (the exact name of this setting and the path to it may vary depending on the device):
203207

204-
Open **Battery**(⁝) menu → Choose **Automation** → Toggle off all of the settings there
208+
Open phone **Settings****Battery****Background usage limits** and disable **Put unused apps to sleep**
205209

206-
Again, the exact path may differ, for example on some devices you should go to:
210+
If you’re still experiencing issues, try these additional battery optimization adjustments:
207211

208-
Phone **Settings****Device care**Tap the (⁝) 3-dot menu → **Advanced**Disable **Auto optimization** and **Optimize settings**
212+
1. Navigate to **Settings****Apps****AdGuard****Battery** and turn on the **Optimised** option:
209213

210-
1. If your phone has it, disable Adaptive battery:
214+
![Optimised settings *mobile](https://cdn.adtidy.org/content/kb/ad_blocker/android/solving_problems/background-work/app__battery_optimised_mode.png)
211215

212-
Open phone **Settings****Battery****More battery settings**Toggle off **Adaptive battery**
216+
1. Go to **Settings****Battery****Background usage limits****Never auto sleeping apps**:
213217

214-
1. Disable Sleeping apps (the exact name of this setting and the path to it may vary depending on the device):
218+
![Never auto sleeping apps settings *mobile](https://cdn.adtidy.org/content/kb/ad_blocker/android/solving_problems/background-work/background_usage_limits.png)
215219

216-
Open phone **Settings****Battery****Background usage limits** → Disable **Put unused apps to sleep**
220+
1. Choose AdGuard from the list of apps. If you don’t see it, return to step 1 and make sure that the *Optimized* battery mode is active:
221+
222+
![Choose the app *mobile](https://cdn.adtidy.org/content/kb/ad_blocker/android/solving_problems/background-work/never_auto_sleeping_apps.png)
217223

218224
### Android 9 & 10
219225

220-
- Go to **Phone settings****Device care** → Tap on the **Battery** item(⁝) **3-dot menu****Settings** and uncheck **Put unused apps to sleep** and **Auto-disable unused apps**.
226+
- Go to **Phone settings****Device care**, tap the **Battery** item, go to (⁝) **3-dot menu****Settings**, and uncheck **Put unused apps to sleep** and **Auto-disable unused apps**.
221227

222-
- Check that **Phone settings****Apps****Sleep as Android****Battery** **Background restriction** is set to **App can use battery in background** for AdGuard.
228+
- In **Phone settings****Apps****Sleep as Android****Battery**, check that **Background restriction** is set to **App can use battery in background** for AdGuard.
223229

224-
- Remove AdGuard from Sleeping apps. To do that:
230+
- Remove AdGuard from **Sleeping apps**:
225231

226-
1. Go to **Phone settings****Device care**
232+
1. Go to **Phone settings****Device care**:
227233

228234
![Samsung *mobile_border](https://cdn.adtidy.org/public/Adguard/screenshots/android/samsung1en.png)
229235

230-
1. Tap **Battery**
236+
1. Tap **Battery**:
231237

232238
![Samsung *mobile_border](https://cdn.adtidy.org/public/Adguard/screenshots/android/samsung2en.png)
233239

234-
1. Tap the **3-dot menu****Settings**
240+
1. Tap the **3-dot menu****Settings**:
235241

236242
![Samsung *mobile_border](https://cdn.adtidy.org/public/Adguard/screenshots/android/samsung3en.png)
237243

238-
1. Tap **Sleeping apps**
244+
1. Tap **Sleeping apps**:
239245

240246
![Samsung *mobile_border](https://cdn.adtidy.org/public/Adguard/screenshots/android/samsung45en.png)
241247

242-
1. **Wake up** AdGuard using the trashcan icon
248+
1. Wake up AdGuard using the trash can icon:
243249

244250
![Samsung *mobile_border](https://cdn.adtidy.org/public/Adguard/screenshots/android/samsung6en.png)
245251

@@ -255,7 +261,7 @@ For early Samsung devices, there is no huge need for setting up the background o
255261

256262
![Samsung settings *mobile_border](https://cdn.adtidy.org/content/kb/ad_blocker/android/solving_problems/background-work/oldsamsung_2.png)
257263

258-
- Tap on the lock icon
264+
- Tap the lock icon:
259265

260266
![Samsung settings *mobile_border](https://cdn.adtidy.org/content/kb/ad_blocker/android/solving_problems/background-work/oldsamsung_3.png)
261267

@@ -267,19 +273,19 @@ Huawei and their Android customization **EMUI** belongs to the most troublesome
267273

268274
This feature may or may not be available for all devices or may be labeled differently.
269275

270-
1. Go to phone **Settings****Battery****App launch**
276+
1. Go to phone **Settings****Battery****App launch**:
271277

272278
![Huawei *mobile_border](https://cdn.adtidy.org/public/Adguard/screenshots/android/huawei1en.png)
273279

274-
1. Turn off **Manage all automatically**
280+
1. Turn off **Manage all automatically**:
275281

276282
![Huawei *mobile_border](https://cdn.adtidy.org/public/Adguard/screenshots/android/huawei2en.png)
277283

278-
1. Set AdGuard to **Manage manually** and enable all toggles.
284+
1. Set AdGuard to **Manage manually** and enable all toggles:
279285

280286
![Huawei *mobile_border](https://cdn.adtidy.org/public/Adguard/screenshots/android/huawei3en.png)
281287

282-
1. Disable **Startup manager** that prevents apps from running automatically after the phone starts up.
288+
1. Disable **Startup manager** that prevents apps from running automatically after the phone starts up:
283289

284290
Go to **Settings****All****Startup manager** → Toggle AdGuard off
285291

@@ -309,21 +315,21 @@ Unfortunately, this is a system app that can only be fully uninstalled using ADB
309315

310316
It is not confirmed, but it might be possible to just disable PowerGenie in **Phone settings****Apps**. If this setting is present in your device's settings, you may skip the following steps. However, it would need to be re-applied every time you reboot your device. If there is no such setting, follow this instruction:
311317

312-
1. [Install ADB](https://www.xda-developers.com/install-adb-windows-macos-linux/) on your computer;
318+
1. [Install ADB](https://www.xda-developers.com/install-adb-windows-macos-linux/) on your computer.
313319

314-
1. Connect your phone with a data cable;
320+
1. Connect your phone with a data cable.
315321

316322
1. Enable [Developer options](https://developer.android.com/studio/debug/dev-options.html);
317323

318-
1. Enable **USB debugging** within Developer options on your phone;
324+
1. Enable **USB debugging** within Developer options on your phone.
319325

320326
1. Run the following commands on your computer:
321327

322328
```adb shell pm uninstall --user 0 com.huawei.powergenie```
323329

324330
```adb shell pm uninstall -k --user 0 com.huawei.android.hwaps```
325331

326-
If AdGuard keeps getting killed, also try running
332+
If AdGuard keeps getting killed, also try running:
327333

328334
```adb shell pm stopservice hwPfwService```
329335

@@ -354,7 +360,7 @@ Old Huawei devices are the easiest to set up, it is enough to perform two simple
354360

355361
![Huawei recent apps *mobile_border](https://cdn.adtidy.org/content/kb/ad_blocker/android/solving_problems/background-work/huaweirecentapps.jpeg)
356362

357-
- Tap on the lock icon:
363+
- Tap the lock icon:
358364

359365
![Huawei lock *mobile_border](https://cdn.adtidy.org/content/kb/ad_blocker/android/solving_problems/background-work/huaweilock.jpeg)
360366

0 commit comments

Comments
 (0)