Skip to content

Latest commit

 

History

History
160 lines (111 loc) · 3.62 KB

File metadata and controls

160 lines (111 loc) · 3.62 KB

Development

Build

Prerequisites:

  • Docker
  • adb (android-platform-tools) installed locally

Build notes:

  • make targets run Gradle from Docker containers and adb from host.
  • Compose is resolved by scripts/compose.sh (local docker compose plugin, or docker/compose container fallback).
  • Container platform is auto-detected from host arch (arm64 -> linux/arm64, x86_64 -> linux/amd64).
  • Gradle builds default to linux/amd64 containers (including Apple Silicon) for reliable aapt2.
  • Gradle container heap defaults to -Xmx1536m; override with ANDROBOT_GRADLE_JVMARGS.
  • Optional override example: ANDROBOT_PLATFORM=linux/amd64 make build-release

Validate tooling:

make doctor

Build release APK (default):

make build-release

Build release AAB (Google Play artifact):

make build-bundle

Release artifact output:

  • app/build/outputs/apk/release/app-release-unsigned.apk
  • app/build/outputs/bundle/release/app-release.aab

Debug Build

Use this for emulator/dev loops.

Build debug APK:

make build

Install

Install to Docker emulator:

make install

Manual emulator control:

make emu-up
make emu-logs
make emu-down

Test

Unit tests:

make test-unit

Device tests:

make test-device

CI emulator job also runs SMS integration verification (.ci/verify-sms-flow.sh):

  • installs debug APK
  • configures first trusted sender via debug test receiver
  • sends emulator SMS volume max from untrusted sender and verifies no volume change
  • sends invalid command from trusted sender and verifies no volume change
  • sends untrusted call me back and verifies call path is ignored
  • sends emulator SMS volume max
  • asserts media volume reaches max
  • sends trusted call me back and verifies callback path is reached
  • sends trusted wifi on and verifies command route reaches execution or graceful ignore

CI emulator job also runs app lifecycle verification (.ci/verify-app-lifecycle.sh):

  • installs debug APK
  • adds a trusted sender
  • kills app process and verifies trusted sender is preserved
  • upgrades app in place (adb install -r) and verifies trusted sender is preserved
  • uninstalls/reinstalls app and verifies trusted sender list is reset

CI emulator job also runs upgrade E2E verification (.ci/verify-upgrade-e2e.sh):

  • builds old debug APK with temporary lower version code
  • installs old APK and seeds trusted sender state
  • builds new debug APK with higher version code
  • upgrades in place (adb install -r) and verifies:
    • installed version code changed to new
    • trusted sender state persisted across upgrade

GitHub Actions runs emulator tests on both pixel_6 and pixel_7 profiles.

All tests:

make test

Full local CI pipeline:

make ci

Project Structure

  • app/src/main/java/com/androbot/app/ - app logic
  • app/src/main/res/ - UI resources
  • app/src/test/ - unit tests
  • app/src/androidTest/ - device tests
  • .github/workflows/android.yml - GitHub Actions CI
  • scripts/dev.sh - local command orchestrator (Dockerized tools)
  • scripts/gradlew.sh - Gradle launcher in ci container
  • scripts/compose.sh - Compose wrapper with arch detection
  • Makefile - convenience targets

Advanced Debug: Emulator UI in Browser

Start emulator container with browser-accessible UI:

make emu-up

Open:

  • http://localhost:6080

Useful commands:

make emu-logs
make emu-down

Notes:

  • This is useful for manual UI/SMS debugging against the same Docker emulator setup.
  • Emulator install/deploy command for this containerized emulator remains:
    • make install