Commit graph

30 commits

Author SHA1 Message Date
okhsunrog
98b05c256f fix(lsposed): skip version-mismatch warning for dev builds
Dashboard compared module.prop versions (e.g. 0.6.2) directly against
BuildConfig.VERSION_NAME (which carries the git-describe suffix
0.6.2-14-g1f2205e on dev builds), always flagging mismatch. Now uses
baseVersion() to strip -N-gSHA before comparison; pre-release tags
(-rc1, -beta) are preserved.

Adds unit tests for normalizeVersion, compareSemver, baseVersion and
versionsMismatch, and wires :app:testDebugUnitTest into CI so they
actually run.
2026-04-19 18:51:32 +03:00
okhsunrog
0a9fcef3c0 ci: rename vpnhide APK artifact + publish as draft release
Two tweaks driven by the same goal — make the artifact list on the CI
run page less ambiguous and give the release step a review gate.

- The APK artifact was named `vpnhide`, which blends in with the other
  module-zip artifacts (`vpnhide-kmod-*`, `vpnhide-zygisk`,
  `vpnhide-ports`). Rename to `vpnhide-apk` so every entry in the
  Artifacts list names the thing you actually get when you download it.
- Release-on-tag job now creates a DRAFT GitHub release instead of
  publishing directly. Gives a chance to eyeball the release notes and
  attached binaries before they go public, and avoids racing
  update-json.sh against the assets becoming reachable.

docs/releasing.md and the release.py post-run hints updated to reflect
the manual Publish step and the fact that update-json still has to
wait for the release to be *published*, not just drafted (draft
release assets sit behind auth).
2026-04-17 15:54:32 +03:00
okhsunrog
637761e678 fix(ci): don't dirty committed module.prop when injecting updateJson
Yesterday's Phase 2 commit left the zygisk and portshide CI artifacts
carrying a "-dirty" suffix in their module.prop version: CI appended
`updateJson=...` to the committed module.prop *before* calling
build-zip.sh, so when build-version.sh ran inside the script it saw
the dirtied working tree and `git describe --dirty` appended "-dirty".

Move the updateJson injection into build-zip.sh itself, gated on an
UPDATE_JSON_URL env var. CI sets the env var via the job step `env:`
block; committed module.prop files are no longer touched. Local dev
builds leave the var unset and ship without updateJson, matching the
previous behaviour.

kmod CI already did things in the right order (version computed
before any module.prop edits); left that step as-is.
2026-04-17 14:54:33 +03:00
okhsunrog
3fc735572a build: stamp git-describe build version into every artifact
Add scripts/build-version.sh — a single source of truth for the
effective version string:

  * HEAD on tag vX.Y.Z          -> "X.Y.Z"
  * N commits past tag          -> "X.Y.Z-N-gSHA"
  * working tree dirty          -> additional "-dirty" suffix
  * no git / no matching tag    -> VERSION file fallback

Wired into every packaging path:

  * zygisk/build-zip.sh and portshide/build-zip.sh now stage a copy of
    module/ and sed-patch `version=` in the staging copy, so committed
    module.prop files stay at the last-released version.
  * kmod/build-zip.sh now builds into a staging copy too.
  * The kmod CI step runs build-version.sh and sed-patches module.prop
    before zipping (git installed in the DDK container).
  * lsposed/app/build.gradle.kts exec's build-version.sh at configure
    time and assigns the result to `versionName` (versionCode stays
    static, still bumped by release.py).

All actions/checkout@v6 gained `fetch-depth: 0` so git describe sees
the full tag history inside CI containers.

Result: a locally built or CI-from-main APK shows up in Android
Settings as e.g. `0.6.1-16-gf86e5e5`, and the zip inside carries the
same string in module.prop; the Magisk/KSU manager displays it in the
update list. Release tag builds are indistinguishable from before —
clean `X.Y.Z`. Diagnostic bug reports now carry the exact commit in
the App version line of device_info.txt.
2026-04-17 14:42:40 +03:00
okhsunrog
a4426ec655 docs(changelog): add full CHANGELOG.md at repo root
Split the generated markdown into two files:

  - CHANGELOG.md at repo root — full history with the Keep a Changelog
    header. Human-facing, discoverable from the GitHub repo page.
  - update-json/changelog.md — still truncated to the last 5 versions,
    for the Magisk/KSU update popup.

Both are regenerated from changelog.json on every changelog-add.py
and update-version.py run.

Also switch the CI release-notes extraction to read CHANGELOG.md so
the body is future-proof once a tag ages out of the short popup file.
2026-04-16 00:42:59 +03:00
okhsunrog
9c13c761a3 ci(release): use changelog.md section as release notes body
Extract the current tag's section from update-json/changelog.md with
awk and pass it as body_path to softprops/action-gh-release. Keeping
generate_release_notes=true so GitHub still appends the auto PR list
and "Full Changelog" link below our handwritten summary.
2026-04-16 00:34:25 +03:00
okhsunrog
d99485a9fb ci: bump GitHub actions to Node.js 24 runtime
Bumps actions/checkout v4→v6, actions/cache v4→v5,
actions/upload-artifact v4→v7, actions/download-artifact v4→v8
to silence the Node.js 20 deprecation warnings GitHub is emitting
ahead of the June 2026 cutoff.

softprops/action-gh-release stays on v2 (third-party, wasn't in the
deprecation list and v3 would need a separate compatibility review).
2026-04-16 00:31:39 +03:00
okhsunrog
5341c07781 Wire portshide into release + update-json pipeline
Mirror the kmod/zygisk plumbing so KernelSU-Next / Magisk pick up
portshide updates automatically:

- scripts/update-version.sh bumps portshide/module/module.prop along
  with the other modules when VERSION changes
- scripts/update-json.sh writes update-json/update-ports.json pointing
  at the current release zip
- CI appends updateJson=.../update-ports.json to the portshide
  module.prop before zipping, matching kmod/zygisk
- Dashboard reports portshide version mismatches as issues, with the
  same up/down/different wording the other modules use
2026-04-15 16:45:58 +03:00
okhsunrog
7faeb5ce9a CI: build vpnhide-ports.zip
Adds a portshide job mirroring the simple kmod zip packaging (no build
needed, just zip the module directory). Artifact lands next to the
other release zips so the gh-release step picks it up for tagged
builds.
2026-04-15 16:41:38 +03:00
okhsunrog
5aadb0165b Rename APK artifact from vpnhide-lsposed to vpnhide 2026-04-14 03:00:10 +03:00
okhsunrog
6f80892f24 Move update JSON files to update-json/ directory 2026-04-13 23:05:01 +03:00
okhsunrog
8f522166ee Add Magisk/KSU auto-update support via updateJson
- update-version.sh generates per-KMI update JSON files for kmod and one
  for zygisk, pointing to GitHub Release artifacts
- CI injects updateJson URL into module.prop before packaging zips
- module.prop in repo stays clean (no updateJson), CI appends it per-variant
- Update version mismatch issue texts to direct users to KernelSU/Magisk
  Modules for updating
- Fix versionName/versionCode back to 0.4.2 (was accidentally 0.4.3 from
  test bump)
2026-04-13 21:15:35 +03:00
okhsunrog
14af7b7ec4 Rework Apps tab UI and fix lint issues
- Replace top bar filter icon with inline "Show system apps" checkbox
- Add hint card explaining L/K/Z layer toggles and Zygisk caveat
- Move showSystem state inside AppPickerScreen
- Fix RELEASE_OR_CODENAME lint error (requires API 30, min is 29)
- Mark technical check strings as translatable="false"
- Add Android lint step to CI
- Apply ktlint formatting
2026-04-13 20:48:26 +03:00
okhsunrog
69d2aa3903 ci: add Android SDK to CI image, revert lsposed job to container 2026-04-13 15:35:28 +03:00
okhsunrog
16f4746c9a fix: lsposed CI back to bare ubuntu with Rust+NDK setup (needs Android SDK) 2026-04-13 15:34:05 +03:00
okhsunrog
d1a547984a fix: use GITHUB_WORKSPACE env var instead of github.workspace in container 2026-04-13 15:30:53 +03:00
okhsunrog
12c082911e fix: use absolute paths in lsposed CI job (container workdir) 2026-04-13 15:27:37 +03:00
okhsunrog
892e3bb910 refactor: remove separate process, delete test-app, simplify diagnostics
- Remove CheckRunnerService and :checks process — the ECONNREFUSED
  issue was caused by Android per-app network restriction, not Vector
  runtime. Checks run directly in the main process now.
- Delete test-app entirely — all diagnostics are now in the VPN Hide app
- Remove test-app from CI, lint, .gitignore, and update-version.sh
- Add lsposed/native to version update script and CI lint
2026-04-13 14:58:52 +03:00
okhsunrog
567b377d47 feat: merge diagnostics into VPN Hide app
- Add native Rust checks library (lsposed/native/) with all 26 detection
  checks, ported from test-app with updated JNI package path
- Add NativeChecks.kt JNI bridge
- Add DiagnosticsScreen.kt with full test UI (sections, banners, cards)
- Add bottom navigation: Apps tab (target picker) + Diagnostics tab
- Update CI: lsposed job now uses CI container image (has Rust + NDK)
- Merge all diagnostic strings into lsposed strings.xml (EN + RU)
- Add cargo-ndk build task to lsposed gradle
2026-04-13 11:35:53 +03:00
okhsunrog
540d7cbfcc feat: add release signing for lsposed and test-app APKs
- Add signingConfigs to both build.gradle.kts files, reading keystore
  credentials from keystore.properties (gitignored, local absolute path)
- Both debug and release builds use the same signing key for consistent
  signatures between local and CI builds
- CI decodes keystore from ANDROID_KEYSTORE_BASE64 secret, builds
  assembleRelease instead of assembleDebug
- Add keystore-related files to .gitignore for test-app
2026-04-13 00:13:44 +03:00
okhsunrog
b4677cdb25 ci: add clang-format, ktlint, and cargo test to lint job
- Rename lint-rust → lint, add clang-format and ktlint checks
- Add cargo test step for zygisk unit tests
- Install clang-format and ktlint 1.8.0 in CI Docker image
2026-04-12 23:29:36 +03:00
okhsunrog
5107412d04 ci: rename APK artifacts to vpnhide-lsposed.apk and vpnhide-test.apk 2026-04-11 23:07:03 +03:00
okhsunrog
5d5bfaa482 ci: auto-detect clang version in DDK image 2026-04-11 22:58:41 +03:00
okhsunrog
f071e7877b ci: use DDK images for kmod, build all 7 GKI generations
Replace custom kernel source cloning + prepare with pre-built DDK
Docker images (ghcr.io/ylarod/ddk-min). These include kernel headers,
Module.symvers, and AOSP clang for each GKI generation.

Now builds for: android12-5.10, android13-5.10, android13-5.15,
android14-5.15, android14-6.1, android15-6.6, android16-6.12.

Drop sha256 files from releases.
2026-04-11 22:55:49 +03:00
okhsunrog
efed29f7d5 ci: add Rust lint job (fmt + clippy for both crates) 2026-04-11 22:29:40 +03:00
okhsunrog
e413debe45 refactor: replace C++ native checks with Rust
Port all 15 native VPN detection checks from C++ to Rust using
jni + libc crates. Gradle triggers cargo-ndk automatically via
a preBuild dependency — single `./gradlew installDebug` builds
everything.

- Remove CMakeLists.txt and native-lib.cpp
- Add test-app/native/ Rust crate with Cargo.toml and src/lib.rs
- Gradle buildRustNative task runs cargo-ndk, copies .so to jniLibs
- Update CI test-app job with Rust + NDK setup
- 23/23 checks pass on device
2026-04-11 22:19:59 +03:00
okhsunrog
fe2a104572 ci: unify into single workflow with parallel builds
Replace separate kmod/zygisk/lsposed workflows with one ci.yml.
Four jobs run in parallel: kmod, zygisk, lsposed, test-app.
A release job depends on all four and runs only on tag pushes,
creating a GitHub release with all artifacts and checksums.
2026-04-11 21:46:49 +03:00
okhsunrog
50176322d3 ci: add AOSP clang to PATH for host tool compilation 2026-04-11 21:07:57 +03:00
okhsunrog
5ee50935c4 ci: use AOSP clang in Docker image, fix kmod build
- Add Google's AOSP clang (clang-r487747c, same as Pixel kernel build)
  to the CI Docker image via sparse checkout. Distro clang caused ABI
  mismatches leading to bootloops on device.
- Update kmod workflow to use the Docker image + AOSP clang instead of
  system clang from apt.
- Replace symvers with real vmlinux.symvers from Pixel kernel build
  (8050 symbols vs 4060 from device .ko extraction).
- Add kmod build deps (bc, kmod, cpio, binutils-aarch64) to Docker image.
2026-04-11 20:53:20 +03:00
okhsunrog
12daca5c1a monorepo: combine vpnhide-zygisk, vpnhide (lsposed), and vpnhide-kmod
Unified repository for the complete Android VPN-hiding stack:
- zygisk/ — Rust Zygisk module (inline libc hooks via shadowhook)
- lsposed/ — Kotlin LSPosed module (Java API + system_server hooks)
- kmod/ — C kernel module (kretprobe hooks, invisible to anti-tamper)

CI workflows use path filters to build only the changed component.
2026-04-11 15:01:49 +03:00