-
-
Notifications
You must be signed in to change notification settings - Fork 11.1k
[stealth 09/11] Add stealth Android manifest filtering #8775
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
reflog
wants to merge
20
commits into
stealth/8769-novpn-proxy
Choose a base branch
from
stealth/8771-android-manifest-minimization
base: stealth/8769-novpn-proxy
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
f0bf1ca
Add stealth Android manifest filtering
reflog 96fdce7
Address review feedback for manifest filtering
reflog 94a4407
Fix stealth manifest filter output write
reflog 982358b
Add stealth manifest filter coverage
reflog 87f604b
test: run stealth manifest filter checks in CI
reflog 74e1ef5
fix: harden manifest filter build wiring
reflog a54dd0b
fix: neutralize stealth manifest components
reflog 34999ed
fix: allow configurable stealth manifest python
reflog a826e46
fix: validate stealth manifest inputs
reflog 238f584
fix: choose ndk prebuilt by host
reflog 41ccdef
merge no-vpn runtime for manifest stack
reflog 6c76ff3
Merge branch 'stealth/8769-novpn-proxy' into stealth/8771-android-man…
reflog 7fa55f2
fix: clean up manifest stack review issues
reflog f7ceb47
Merge branch 'stealth/8769-novpn-proxy' into stealth/8771-android-man…
reflog a0e7d82
Merge branch 'stealth/8769-novpn-proxy' into stealth/8771-android-man…
reflog 491f054
fix: clarify stealth manifest docs
reflog 8cf26ac
Merge branch 'stealth/8769-novpn-proxy' into stealth/8771-android-man…
reflog 85011ed
fix: harden stealth manifest build inputs
reflog e834a7d
fix: use unittest discover for stealth manifest filter test
Copilot 03076b1
docs: document stealth novpn compatibility flag
reflog File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
android/app/src/main/kotlin/foundation/bridge/StealthComponents.kt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| package foundation.bridge | ||
|
|
||
| import androidx.annotation.RequiresApi | ||
| import org.getlantern.lantern.LanternApp | ||
| import org.getlantern.lantern.MainActivity | ||
| import org.getlantern.lantern.service.LanternVpnService | ||
| import org.getlantern.lantern.service.QuickTileService | ||
|
|
||
| class AppHost : LanternApp() | ||
|
|
||
| class HomeActivity : MainActivity() | ||
|
|
||
| class NetworkService : LanternVpnService() | ||
|
|
||
|
reflog marked this conversation as resolved.
|
||
| @RequiresApi(24) | ||
| class ControlTile : QuickTileService() | ||
|
reflog marked this conversation as resolved.
reflog marked this conversation as resolved.
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| # Stealth build notes | ||
|
|
||
| Android stealth manifest minimization is opt-in through the Gradle project | ||
| property `STEALTH_MODE`. The Gradle task uses `-PstealthPython`, then `PYTHON`, | ||
| then `python3` to generate the filtered manifest, so Android stealth builds | ||
| require Python 3 through one of those paths. | ||
|
|
||
| ```sh | ||
| gradle -p android :app:assembleRelease -PSTEALTH_MODE=vpn | ||
| gradle -p android :app:assembleRelease -PSTEALTH_MODE=novpn | ||
|
reflog marked this conversation as resolved.
|
||
| ``` | ||
|
reflog marked this conversation as resolved.
|
||
|
|
||
| `-PstealthNoVpn=true` is kept as a compatibility switch for older automation. | ||
| When `STEALTH_MODE` is unset, it selects `novpn`; when `STEALTH_MODE=vpn` is | ||
| also set, Gradle fails fast because the two inputs conflict. Prefer | ||
| `-PSTEALTH_MODE=novpn` for new build scripts. | ||
|
Comment on lines
+14
to
+16
|
||
|
|
||
| `vpn` keeps the Android `VpnService` surface but removes app links, broad package | ||
| visibility, write-settings access, payment query declarations, wallet metadata, | ||
| boot receiver, and cleartext traffic allowance from the generated manifest. | ||
|
|
||
| `novpn` applies the same filtering and also removes Android VPN service | ||
| components, quick-tile VPN controls, and VPN-related permissions. | ||
| Runtime code must still be compiled or gated separately so no-vpn builds do not | ||
| attempt to start removed services. | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.