[GH-ISSUE #1580] AmneziaVPN for Android (Request for functionality extension - VPN Autostart) #660

Open
opened 2026-10-13 20:26:01 +00:00 by bsakaguchi · 2 comments
Owner

Originally created by @AKotov-dev on GitHub (May 12, 2025).
Original GitHub issue: https://github.com/amnezia-vpn/amnezia-client/issues/1580

Hi. Thank you for your work. Today I use AmneziaVPN_4.8.11.4_android9+_armeabi-v7a.apk on my Android-10 TV box. It works great. If you have some free time, could you add the autostart function on reboot? Thanks in advance.

UPD: 27.11.2025

Originally created by @AKotov-dev on GitHub (May 12, 2025). Original GitHub issue: https://github.com/amnezia-vpn/amnezia-client/issues/1580 Hi. Thank you for your work. Today I use [AmneziaVPN_4.8.11.4_android9+_armeabi-v7a.apk](https://github.com/amnezia-vpn/amnezia-client/releases/download/4.8.11.4/AmneziaVPN_4.8.11.4_android9+_armeabi-v7a.apk) on my `Android-10 TV box`. It works great. If you have some free time, could you add the **autostart** function on reboot? Thanks in advance. UPD: 27.11.2025
Author
Owner

@chebureque commented on GitHub (May 31, 2025):

<!-- gh-comment-id:2925031761 --> @chebureque commented on GitHub (May 31, 2025): +
Author
Owner

@AKotov-dev commented on GitHub (Nov 27, 2025):

Automatic VPN Launch on Android
Goal: Launch the AmneziaVPN GUI after the TV-Box boots and press the "Connect" button automatically.

Steps:

  1. Install MacroDroid (tested with v5.57.6).
  2. Enable Accessibility Services on the TV-Box — activate all MacroDroid services.
  3. Calculate the button coordinates on the screen (Here's an example for my screen):
adb shell wm size
Physical size: 1280x720

Screen resolution: 1280×720 pixels

Button position: horizontally centered (X), vertically at the center of the upper quarter of the screen (Y)

Coordinate calculation:

Horizontal coordinate X (center):
X = 1280 ÷ 2 = 640 pixels

Vertical coordinate Y (center of the upper quarter):
Upper quarter: 720 ÷ 4 = 180 pixels
Center of upper quarter: 180 ÷ 2 = 90 pixels

Resulting coordinates for MacroDroid (calculate your coordinates!):
X = 640, Y = 90

Note: If there is an ADB connection, the button coordinates can be calculated with a one-liner:

let x=$(adb shell wm size | awk -F'[: x]+' '{print $3}')/2; let y=$(adb shell wm size | awk -F'[: x]+' '{print $4}')/8; echo X=$x; echo Y=$y

Import amnezia-clickbtn1.mdr (from archive) into MacroDroid.

amnezia-clickbtn1.mdr.tar.gz

Substitute your button coordinates into the click-button macro and save.

Image

Reboot the TV-Box — the VPN should connect automatically on startup.

Suggestions for feature improvements are welcome! ))

p.s. метод подходит и для смартфонов...

<!-- gh-comment-id:3584764698 --> @AKotov-dev commented on GitHub (Nov 27, 2025): **Automatic VPN Launch on Android** **Goal:** Launch the AmneziaVPN GUI after the TV-Box boots and press the "Connect" button automatically. **Steps:** 1. Install MacroDroid (tested with v5.57.6). 2. Enable Accessibility Services on the TV-Box — activate all MacroDroid services. 3. Calculate the button coordinates on the screen (`Here's an example for my screen`): ``` adb shell wm size Physical size: 1280x720 ``` **Screen resolution:** 1280×720 pixels **Button position:** horizontally centered (`X`), vertically at the center of the upper quarter of the screen (`Y`) **Coordinate calculation:** Horizontal coordinate X (center): X = 1280 ÷ 2 = 640 pixels Vertical coordinate Y (center of the upper quarter): Upper quarter: 720 ÷ 4 = 180 pixels Center of upper quarter: 180 ÷ 2 = 90 pixels **Resulting coordinates for MacroDroid (calculate your coordinates!):** X = 640, Y = 90 **Note:** If there is an ADB connection, the button coordinates can be calculated with a one-liner: ``` let x=$(adb shell wm size | awk -F'[: x]+' '{print $3}')/2; let y=$(adb shell wm size | awk -F'[: x]+' '{print $4}')/8; echo X=$x; echo Y=$y ``` Import `amnezia-clickbtn1.mdr` (from archive) into `MacroDroid`. [amnezia-clickbtn1.mdr.tar.gz](https://github.com/user-attachments/files/23787909/amnezia-clickbtn1.mdr.tar.gz) Substitute your button coordinates into the `click-button` macro and **save**. <img width="1280" height="720" alt="Image" src="https://github.com/user-attachments/assets/e3f3ca99-4b9f-46f7-ba1d-1951b0cfa78e" /> Reboot the TV-Box — the VPN should connect automatically on startup. **Suggestions for feature improvements are welcome!** )) p.s. метод подходит и для смартфонов...
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
amnezia-vpn/amnezia-client#660
No description provided.