[PR #3409] fix(android): skip split tunneling apps that are not installed #3286

Open
opened 2026-11-07 17:58:57 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/amnezia-vpn/amnezia-client/pull/3409
Author: @OverFitted
Created: 11/5/2026
Status: 🔄 Open

Base: dev ← Head: fix/android-skip-missing-split-apps


📝 Commits (1)

  • f2021eb fix(android): skip split tunneling apps that are not installed

📊 Changes

1 file changed (+11 additions, -2 deletions)

View changed files

📝 client/android/protocolApi/src/main/kotlin/Protocol.kt (+11 -2)

📄 Description

Summary

Skip app split tunneling entries for packages that are not installed instead of crashing the VPN service.

Problem

Protocol.buildVpnInterface() calls VpnService.Builder.addAllowedApplication() / addDisallowedApplication() for every package in the app split tunneling list. Both throw PackageManager.NameNotFoundException when the package is not installed. Nothing catches it: AmneziaVpnService.connectionExceptionHandler does not list it and rethrows, so the :amnezia*Service process dies.

The list easily contains such entries: an app that was uninstalled after being added, or a backup restored on another device. The service is restarted with the same config (START_REDELIVER_INTENT, Always-on), so the crash repeats until the user finds and removes the entry.

Changes

  • Catch NameNotFoundException around each call, log a warning with the package name and continue, the same way AppListProvider handles missing packages.

In Only apps from the list mode, if every listed package is missing, no application filter is set and all traffic goes through the VPN, which fails safe.

Verification

  • git diff --check
  • Not built locally: I don't have an Android toolchain set up. The change is limited to the two loops in Protocol.kt and one import.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/amnezia-vpn/amnezia-client/pull/3409 **Author:** [@OverFitted](https://github.com/OverFitted) **Created:** 11/5/2026 **Status:** 🔄 Open **Base:** `dev` ← **Head:** `fix/android-skip-missing-split-apps` --- ### 📝 Commits (1) - [`f2021eb`](https://github.com/amnezia-vpn/amnezia-client/commit/f2021eb5042a7da1c74f70a5a9ca8cccbc5c4fc1) fix(android): skip split tunneling apps that are not installed ### 📊 Changes **1 file changed** (+11 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `client/android/protocolApi/src/main/kotlin/Protocol.kt` (+11 -2) </details> ### 📄 Description ## Summary Skip app split tunneling entries for packages that are not installed instead of crashing the VPN service. ## Problem `Protocol.buildVpnInterface()` calls `VpnService.Builder.addAllowedApplication()` / `addDisallowedApplication()` for every package in the app split tunneling list. Both throw `PackageManager.NameNotFoundException` when the package is not installed. Nothing catches it: `AmneziaVpnService.connectionExceptionHandler` does not list it and rethrows, so the `:amnezia*Service` process dies. The list easily contains such entries: an app that was uninstalled after being added, or a backup restored on another device. The service is restarted with the same config (`START_REDELIVER_INTENT`, Always-on), so the crash repeats until the user finds and removes the entry. ## Changes - Catch `NameNotFoundException` around each call, log a warning with the package name and continue, the same way `AppListProvider` handles missing packages. In *Only apps from the list* mode, if every listed package is missing, no application filter is set and all traffic goes through the VPN, which fails safe. ## Verification - `git diff --check` - Not built locally: I don't have an Android toolchain set up. The change is limited to the two loops in `Protocol.kt` and one import. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
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#3286
No description provided.