Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

No Android Studio? Build APKs in GitHub Actions and verify them on real hardware

说明与用途

无需 Android Studio 的自动化 APK 构建:在 GitHub Actions 中构建,下载工件,并通过 adb 在真实设备上验证。

问题

Android developers often need to build and test APKs without installing Android Studio, which is large and GUI‑dependent, especially on headless Linux environments.

结果

The workflow produces a verified APK with evidence of successful build and runtime behavior on a real device, all without installing Android Studio.

工作流

  • Set up GitHub Actions workflow with ubuntu-latest runner
  • Checkout repository using actions/checkout@v4
  • Set up JDK 17 with actions/setup-java@v4 (distribution: temurin)
  • Run ./gradlew assembleDebug to build debug APK
  • Upload the APK artifact with actions/upload-artifact@v4
  • Download the artifact locally using gh run download <run-id> -n apk
  • Install the APK on a real device with adb install -r wifiwarn-debug.apk
  • Verify the accessibility service is enabled via adb shell dumpsys accessibility | grep -i enabled
  • Monitor runtime logs with adb logcat -s WarnService
  • Confirm warning channels fire on the device

证据

You can ship Android APKs without ever installing Android Studio.

来源

CI builds the APK, I pull it back, I verify it on a real device.

来源

Build succeeded ≠ it runs.

来源

Artifacts expire after 90 days by default — promote real releases to a GitHub Release

来源

  • 记录日期: 2026-10-19T11:41:25.280Z