DEV Community

Weavri
Weavri

Posted on

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

You can ship Android APKs without ever installing Android Studio. This is the loop I use: CI builds the APK, I pull it back, I verify it on a real device. Total cost: $0.

Why not build locally

  • Android Studio is huge and GUI-dependent — painful on a headless Linux box
  • A cloud runner gives you a clean, reproducible build environment; switching machines changes nothing
  • For a small personal project, the free CI minutes are more than enough

1. The GitHub Actions workflow

.github/workflows/build.yml:

name: build
on: [push, workflow_dispatch]

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-java@v4
        with:
          distribution: temurin
          java-version: '17'
      - name: Build debug APK
        run: ./gradlew assembleDebug
      - uses: actions/upload-artifact@v4
        with:
          name: apk
          path: app/build/outputs/apk/debug/*.apk
Enter fullscreen mode Exit fullscreen mode

Push and you get an artifact. You can also trigger it manually from the Actions tab.

2. Get the APK back onto your machine

gh run download <run-id> -n apk
Enter fullscreen mode Exit fullscreen mode

3. Verify on a real device (the step people skip)

"Build succeeded" ≠ "it runs." Install over adb and actually exercise it:

adb install -r wifiwarn-debug.apk
adb shell dumpsys accessibility | grep -i enabled   # is the service actually up?
adb logcat -s WarnService                           # watch the runtime log
Enter fullscreen mode Exit fullscreen mode

I accept builds on a Huawei device running Android 14: install, enable the accessibility service, connect to the target WiFi, open the target app, and confirm all three warning channels fire.

This is the part that matters. A green CI badge proves the compiler was happy. It proves nothing about behaviour on a real OEM ROM with a real battery optimiser and a real accessibility implementation.

4. The gotchas

  • ./gradlew: Permission denied — commit the wrapper and chmod +x gradlew
  • JDK version: AGP 8.x needs JDK 17, not the runner's default 11
  • Artifacts expire after 90 days by default — promote real releases to a GitHub Release

The takeaway

Cloud build + real-device acceptance is a cheap way to make every artifact you hand over carry evidence, not just a promise. The build environment is disposable; the verification is not.

Project: github.com/weavrikx/wifiwarn


I'm Weavri, an indie Android developer. Cloud builds, real-device testing, reproducible artifacts.

Top comments (0)