Skip to content

Commit f5c58ce

Browse files
committed
Record Waydroid experiment and return app diagnostics on failure
1 parent c675831 commit f5c58ce

2 files changed

Lines changed: 56 additions & 0 deletions

File tree

‎app/src/androidTest/java/net/megaproxy487/WaydroidSmokeInstrumentation.kt‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import net.megaproxy487.model.GlobalConnectionSettings
1111
import net.megaproxy487.model.ProxyConfig
1212
import net.megaproxy487.model.ProxyType
1313
import net.megaproxy487.vpn.ProxyVpnService
14+
import net.megaproxy487.vpn.PersistentDiagnosticLog
1415
import java.net.InetSocketAddress
1516
import java.net.Socket
1617
import java.util.UUID
@@ -71,6 +72,7 @@ class WaydroidSmokeInstrumentation : Instrumentation() {
7172
} catch (error: Exception) {
7273
result.putString("smoke", "failed")
7374
result.putString("reason", error.javaClass.simpleName + ": " + error.message)
75+
result.putString("diagnostics", PersistentDiagnosticLog.readTail(16_384))
7476
resultCode = Activity.RESULT_CANCELED
7577
} finally {
7678
ProxyVpnService.stop(targetContext)
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# Waydroid CI experiment — 2026-10-06
2+
3+
This is an experimental snapshot, not evidence of completed VPN coverage.
4+
The workflow is separate from required pull-request CI.
5+
6+
## Setup and test
7+
8+
GitHub-hosted Ubuntu 24.04, stock Azure kernel 6.17.0-1022-azure,
9+
Binder from the matching Ubuntu `linux-modules-extra` package, official
10+
Waydroid VANILLA image, software rendering, headless Weston and PulseAudio.
11+
No KVM, custom kernel or third-party kernel module was used.
12+
13+
`bundle exec fastlane android waydroid_smoke` builds debug and instrumentation
14+
APKs and runs a platform Instrumentation test. It writes a disposable SSH profile
15+
through real ConfigStore/Keystore, starts the production VpnService and requires
16+
an exact HTTP echo through JNI/TUN and OpenSSH. Docker supplies an isolated
17+
origin and disposable credentials. A host firewall rule blocks direct origin
18+
access; the test first verifies that a direct connection fails.
19+
20+
## Observed runs
21+
22+
- [Kernel preflight](https://github.com/andre487/AndroidMegaProxy/actions/runs/37470332052)
23+
passed after installing the matching modules package.
24+
- [First full run](https://github.com/andre487/AndroidMegaProxy/actions/runs/37471254591)
25+
built APKs but could not boot Android: Waydroid attempted to bind-mount a missing
26+
PulseAudio socket. The setup now starts PulseAudio before the Android session.
27+
- [Second full run](https://github.com/andre487/AndroidMegaProxy/actions/runs/37472951377)
28+
booted Android, installed both APKs and ran instrumentation. The direct-access
29+
assertion passed, but the production service did not reach its connected state
30+
within 45 seconds. Android repeatedly created and removed `tun0`; logcat also
31+
contained netd/iptables errors, including an unavailable `quota2` match and
32+
an IPv6 filter table. The SSH server logged no connections. These observations
33+
do not establish the cause: app diagnostics were not yet collected.
34+
- A follow-up run adds the app's persistent diagnostic log and a three-minute
35+
instrumentation timeout. Its result must be evaluated before claiming success.
36+
37+
Local instrumentation compilation, shell syntax, actionlint and
38+
`bundle exec fastlane android_checks` passed (184 JVM tests, lint, debug build,
39+
verified unsigned release build). The ordinary GitHub CI also passed.
40+
41+
## Limits and decision
42+
43+
Keep this optional until forwarding works and repeated runs establish useful
44+
reliability. A booted Android container alone does not prove VPN/JNI coverage.
45+
Do not change production code merely to accommodate this test environment.
46+
47+
VPN and notification permission UI are bypassed deliberately. This setup does
48+
not test API 26, physical radios, OEM policies, reboot recovery, DNS leaks or
49+
the complete release checklist. Sessions, Docker fixtures and the firewall rule
50+
are removed on exit; uploaded logs have seven-day retention.
51+
52+
No maintained setup action was identified in the search. The repository
53+
[waydroid-action-test](https://github.com/ikuaki1009/waydroid-action-test) provides
54+
an older example workflow, but its custom kernel-module approach was not reused.

0 commit comments

Comments
 (0)