android-emulator-build
Builds Pocket Arcade Android apps - Release APK via Gradle assembleRelease on JDK 17, clean prebuild, test/store variant proof, e07-android AVD by adb serial, screencap, APK check. Use when a game must build, run or be proven on Android or an emulator. Not for Play uploads (android-release-play).
- License 许可
- MIT
- 最近更新
- 2026-11-05
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- android-emulator-build
- description
- Builds Pocket Arcade Android apps - Release APK via Gradle assembleRelease on JDK 17, clean prebuild, test/store variant proof, e07-android AVD by adb serial, screencap, APK check. Use when a game must build, run or be proven on Android or an emulator. Not for Play uploads (android-release-play).
02 资源文件 297
- 资产文件assets/permission-allowlist.json1.8 KB
- 资产文件assets/shared.json478 B
- 参考文档references/build-variants.md6.9 KB
- 参考文档references/emulator-commands.md7.3 KB
- 参考文档references/environment-and-sdk.md7.4 KB
- 参考文档references/failures.md6.3 KB
- 脚本scripts/check-emu-app.mjs15.2 KB
- 脚本scripts/check-emu-setup.mjs11.1 KB
- 脚本scripts/check-lib.mjs44.4 KB
- 脚本scripts/lib/apk.mjs2.6 KB
- 脚本scripts/lib/manifest-tree.mjs1.2 KB
- 脚本scripts/lib/png.mjs5.8 KB
- 脚本scripts/lib/ship-placeholders.mjs15.7 KB
- 脚本scripts/lib/zip.mjs2.6 KB
- 脚本scripts/selftest.mjs3.0 KB
- 脚本templates/packages/tooling/src/android/emulator-device.ts5.8 KB
- 脚本templates/packages/tooling/src/android/emulators.test.ts7.8 KB
- 脚本templates/packages/tooling/src/android/emulators.ts6.9 KB
- 脚本templates/packages/tooling/src/android/toolchain.test.ts3.3 KB
- 脚本templates/packages/tooling/src/android/toolchain.ts5.5 KB
- 其他tests/fixtures/emu-app-store/bad-admob-placeholder-unit-per-platform/app-release.apk786 B
- 参考文档tests/fixtures/emu-app-store/bad-admob-placeholder-unit-per-platform/args.json59 B
- 参考文档tests/fixtures/emu-app-store/bad-admob-placeholder-unit-per-platform/badging.txt1.0 KB
- 参考文档tests/fixtures/emu-app-store/bad-admob-placeholder-unit-per-platform/EXPECT.txt179 B
- 参考文档tests/fixtures/emu-app-store/bad-admob-placeholder-unit-per-platform/manifest.txt3.0 KB
- 资产文件tests/fixtures/emu-app-store/bad-admob-placeholder-unit-per-platform/screenshot.png593 B
- 其他tests/fixtures/emu-app-store/bad-live-no-android-ad-id/app-release.apk725 B
- 参考文档tests/fixtures/emu-app-store/bad-live-no-android-ad-id/args.json59 B
- 参考文档tests/fixtures/emu-app-store/bad-live-no-android-ad-id/badging.txt1.0 KB
- 参考文档tests/fixtures/emu-app-store/bad-live-no-android-ad-id/EXPECT.txt103 B
- 参考文档tests/fixtures/emu-app-store/bad-live-no-android-ad-id/manifest.txt2.6 KB
- 资产文件tests/fixtures/emu-app-store/bad-live-no-android-ad-id/screenshot.png593 B
- 其他tests/fixtures/emu-app-store/bad-live-sample-ad-id/app-release.apk725 B
- 参考文档tests/fixtures/emu-app-store/bad-live-sample-ad-id/args.json59 B
- 参考文档tests/fixtures/emu-app-store/bad-live-sample-ad-id/badging.txt1.0 KB
- 参考文档tests/fixtures/emu-app-store/bad-live-sample-ad-id/EXPECT.txt12 B
- 参考文档tests/fixtures/emu-app-store/bad-live-sample-ad-id/manifest.txt3.0 KB
- 资产文件tests/fixtures/emu-app-store/bad-live-sample-ad-id/screenshot.png593 B
- 其他tests/fixtures/emu-app-store/bad-owner-placeholders/app-release.apk658 B
- 参考文档tests/fixtures/emu-app-store/bad-owner-placeholders/args.json58 B
- 参考文档tests/fixtures/emu-app-store/bad-owner-placeholders/badging.txt1.0 KB
- 参考文档tests/fixtures/emu-app-store/bad-owner-placeholders/EXPECT.txt130 B
- 参考文档tests/fixtures/emu-app-store/bad-owner-placeholders/manifest.txt3.0 KB
- 资产文件tests/fixtures/emu-app-store/bad-owner-placeholders/screenshot.png593 B
- 其他tests/fixtures/emu-app-store/bad-sample-ad-unit-live/app-release.apk784 B
- 参考文档tests/fixtures/emu-app-store/bad-sample-ad-unit-live/args.json59 B
- 参考文档tests/fixtures/emu-app-store/bad-sample-ad-unit-live/badging.txt1.0 KB
- 参考文档tests/fixtures/emu-app-store/bad-sample-ad-unit-live/EXPECT.txt197 B
- 参考文档tests/fixtures/emu-app-store/bad-sample-ad-unit-live/manifest.txt3.0 KB
- 资产文件tests/fixtures/emu-app-store/bad-sample-ad-unit-live/screenshot.png593 B
- 其他tests/fixtures/emu-app-store/bad-test-code-shipped/app-release.apk685 B
- 参考文档tests/fixtures/emu-app-store/bad-test-code-shipped/args.json58 B
- 参考文档tests/fixtures/emu-app-store/bad-test-code-shipped/badging.txt1.0 KB
- 参考文档tests/fixtures/emu-app-store/bad-test-code-shipped/EXPECT.txt40 B
- 参考文档tests/fixtures/emu-app-store/bad-test-code-shipped/manifest.txt3.0 KB
- 资产文件tests/fixtures/emu-app-store/bad-test-code-shipped/screenshot.png593 B
- 其他tests/fixtures/emu-app-store/good/app-release.apk658 B
- 参考文档tests/fixtures/emu-app-store/good/args.json58 B
- 参考文档tests/fixtures/emu-app-store/good/badging.txt1.0 KB
- 参考文档tests/fixtures/emu-app-store/good/manifest.txt3.0 KB
- 资产文件tests/fixtures/emu-app-store/good/screenshot.png593 B
- 其他tests/fixtures/emu-app-store/pass-live-owner-ids-per-platform/app-release.apk755 B
- 参考文档tests/fixtures/emu-app-store/pass-live-owner-ids-per-platform/args.json59 B
- 参考文档tests/fixtures/emu-app-store/pass-live-owner-ids-per-platform/badging.txt1.0 KB
- 参考文档tests/fixtures/emu-app-store/pass-live-owner-ids-per-platform/EXPECT.txt17 B
- 参考文档tests/fixtures/emu-app-store/pass-live-owner-ids-per-platform/manifest.txt3.0 KB
- 资产文件tests/fixtures/emu-app-store/pass-live-owner-ids-per-platform/screenshot.png593 B
- 其他tests/fixtures/emu-app-store/pass-live-owner-ids/app-release.apk725 B
- 参考文档tests/fixtures/emu-app-store/pass-live-owner-ids/args.json59 B
- 参考文档tests/fixtures/emu-app-store/pass-live-owner-ids/badging.txt1.0 KB
- 参考文档tests/fixtures/emu-app-store/pass-live-owner-ids/EXPECT.txt17 B
- 参考文档tests/fixtures/emu-app-store/pass-live-owner-ids/manifest.txt3.0 KB
- 资产文件tests/fixtures/emu-app-store/pass-live-owner-ids/screenshot.png593 B
- 其他tests/fixtures/emu-app/bad-blank-screenshot/app-release.apk630 B
- 参考文档tests/fixtures/emu-app/bad-blank-screenshot/args.json57 B
- 参考文档tests/fixtures/emu-app/bad-blank-screenshot/badging.txt1.0 KB
- 参考文档tests/fixtures/emu-app/bad-blank-screenshot/EXPECT.txt28 B
- 参考文档tests/fixtures/emu-app/bad-blank-screenshot/manifest.txt3.0 KB
- 资产文件tests/fixtures/emu-app/bad-blank-screenshot/screenshot.png595 B
- 其他tests/fixtures/emu-app/bad-constants-variant/app-release.apk627 B
- 参考文档tests/fixtures/emu-app/bad-constants-variant/args.json57 B
- 参考文档tests/fixtures/emu-app/bad-constants-variant/badging.txt1.0 KB
- 参考文档tests/fixtures/emu-app/bad-constants-variant/EXPECT.txt38 B
- 参考文档tests/fixtures/emu-app/bad-constants-variant/manifest.txt3.0 KB
- 资产文件tests/fixtures/emu-app/bad-constants-variant/screenshot.png593 B
- 其他tests/fixtures/emu-app/bad-debuggable/app-release.apk630 B
- 参考文档tests/fixtures/emu-app/bad-debuggable/args.json57 B
- 参考文档tests/fixtures/emu-app/bad-debuggable/badging.txt1.0 KB
- 参考文档tests/fixtures/emu-app/bad-debuggable/EXPECT.txt13 B
- 参考文档tests/fixtures/emu-app/bad-debuggable/manifest.txt3.0 KB
- 资产文件tests/fixtures/emu-app/bad-debuggable/screenshot.png593 B
- 其他tests/fixtures/emu-app/bad-no-backup/app-release.apk630 B
- 参考文档tests/fixtures/emu-app/bad-no-backup/args.json57 B
- 参考文档tests/fixtures/emu-app/bad-no-backup/badging.txt1.0 KB
- 参考文档tests/fixtures/emu-app/bad-no-backup/EXPECT.txt15 B
- 参考文档tests/fixtures/emu-app/bad-no-backup/manifest.txt3.0 KB
- 资产文件tests/fixtures/emu-app/bad-no-backup/screenshot.png593 B
- 其他tests/fixtures/emu-app/bad-no-rtl/app-release.apk630 B
- 参考文档tests/fixtures/emu-app/bad-no-rtl/args.json57 B
- 参考文档tests/fixtures/emu-app/bad-no-rtl/badging.txt1.0 KB
- 参考文档tests/fixtures/emu-app/bad-no-rtl/EXPECT.txt15 B
- 参考文档tests/fixtures/emu-app/bad-no-rtl/manifest.txt3.0 KB
- 资产文件tests/fixtures/emu-app/bad-no-rtl/screenshot.png593 B
- 其他tests/fixtures/emu-app/bad-permission/app-release.apk630 B
- 参考文档tests/fixtures/emu-app/bad-permission/args.json57 B
- 参考文档tests/fixtures/emu-app/bad-permission/badging.txt1.1 KB
- 参考文档tests/fixtures/emu-app/bad-permission/EXPECT.txt46 B
- 参考文档tests/fixtures/emu-app/bad-permission/manifest.txt3.1 KB
- 资产文件tests/fixtures/emu-app/bad-permission/screenshot.png593 B
- 其他tests/fixtures/emu-app/bad-sdk-levels/app-release.apk630 B
- 参考文档tests/fixtures/emu-app/bad-sdk-levels/args.json57 B
- 参考文档tests/fixtures/emu-app/bad-sdk-levels/badging.txt1.0 KB
- 参考文档tests/fixtures/emu-app/bad-sdk-levels/EXPECT.txt13 B
- 参考文档tests/fixtures/emu-app/bad-sdk-levels/manifest.txt3.0 KB
- 资产文件tests/fixtures/emu-app/bad-sdk-levels/screenshot.png593 B
- 其他tests/fixtures/emu-app/bad-test-ads-without-sample-id/app-release.apk630 B
- 参考文档tests/fixtures/emu-app/bad-test-ads-without-sample-id/args.json57 B
- 参考文档tests/fixtures/emu-app/bad-test-ads-without-sample-id/badging.txt1.0 KB
- 参考文档tests/fixtures/emu-app/bad-test-ads-without-sample-id/EXPECT.txt12 B
- 参考文档tests/fixtures/emu-app/bad-test-ads-without-sample-id/manifest.txt2.6 KB
- 资产文件tests/fixtures/emu-app/bad-test-ads-without-sample-id/screenshot.png593 B
- 其他tests/fixtures/emu-app/bad-test-code-missing/app-release.apk603 B
- 参考文档tests/fixtures/emu-app/bad-test-code-missing/args.json57 B
- 参考文档tests/fixtures/emu-app/bad-test-code-missing/badging.txt1.0 KB
- 参考文档tests/fixtures/emu-app/bad-test-code-missing/EXPECT.txt40 B
- 参考文档tests/fixtures/emu-app/bad-test-code-missing/manifest.txt3.0 KB
- 资产文件tests/fixtures/emu-app/bad-test-code-missing/screenshot.png593 B
- 其他tests/fixtures/emu-app/bad-variant-meta-missing/app-release.apk630 B
- 参考文档tests/fixtures/emu-app/bad-variant-meta-missing/args.json57 B
- 参考文档tests/fixtures/emu-app/bad-variant-meta-missing/badging.txt1.0 KB
- 参考文档tests/fixtures/emu-app/bad-variant-meta-missing/EXPECT.txt10 B
- 参考文档tests/fixtures/emu-app/bad-variant-meta-missing/manifest.txt2.7 KB
- 资产文件tests/fixtures/emu-app/bad-variant-meta-missing/screenshot.png593 B
- 其他tests/fixtures/emu-app/bad-variant-meta/app-release.apk630 B
- 参考文档tests/fixtures/emu-app/bad-variant-meta/args.json57 B
- 参考文档tests/fixtures/emu-app/bad-variant-meta/badging.txt1.0 KB
- 参考文档tests/fixtures/emu-app/bad-variant-meta/EXPECT.txt10 B
- 参考文档tests/fixtures/emu-app/bad-variant-meta/manifest.txt3.0 KB
- 资产文件tests/fixtures/emu-app/bad-variant-meta/screenshot.png593 B
- 其他tests/fixtures/emu-app/bad-wrong-package/app-release.apk630 B
- 参考文档tests/fixtures/emu-app/bad-wrong-package/args.json57 B
- 参考文档tests/fixtures/emu-app/bad-wrong-package/badging.txt1.0 KB
- 参考文档tests/fixtures/emu-app/bad-wrong-package/EXPECT.txt10 B
- 参考文档tests/fixtures/emu-app/bad-wrong-package/manifest.txt3.0 KB
- 资产文件tests/fixtures/emu-app/bad-wrong-package/screenshot.png593 B
- 其他tests/fixtures/emu-app/error-forbidden-pair/app-release.apk630 B
- 参考文档tests/fixtures/emu-app/error-forbidden-pair/ARGS.txt102 B
- 参考文档tests/fixtures/emu-app/error-forbidden-pair/EXPECT.txt65 B
- 参考文档tests/fixtures/emu-app/error-no-apk/ARGS.txt96 B
- 参考文档tests/fixtures/emu-app/error-no-apk/EXPECT.txt35 B
- 其他tests/fixtures/emu-app/error-screenshot-not-a-png/app-release.apk630 B
- 参考文档tests/fixtures/emu-app/error-screenshot-not-a-png/args.json57 B
- 参考文档tests/fixtures/emu-app/error-screenshot-not-a-png/badging.txt1.0 KB
- 参考文档tests/fixtures/emu-app/error-screenshot-not-a-png/EXPECT.txt99 B
- 参考文档tests/fixtures/emu-app/error-screenshot-not-a-png/manifest.txt3.0 KB
- 资产文件tests/fixtures/emu-app/error-screenshot-not-a-png/screenshot.png10 B
- 其他tests/fixtures/emu-app/good/app-release.apk630 B
- 参考文档tests/fixtures/emu-app/good/args.json57 B
- 参考文档tests/fixtures/emu-app/good/badging.txt1.0 KB
- 参考文档tests/fixtures/emu-app/good/manifest.txt3.0 KB
- 资产文件tests/fixtures/emu-app/good/screenshot.png593 B
- 其他tests/fixtures/emu-setup/bad-adb-kill-server/.gitignore65 B
- 脚本tests/fixtures/emu-setup/bad-adb-kill-server/apps/line-siege/metro.config.js435 B
- 参考文档tests/fixtures/emu-setup/bad-adb-kill-server/apps/line-siege/package.json46 B
- 参考文档tests/fixtures/emu-setup/bad-adb-kill-server/EXPECT.txt49 B
- 参考文档tests/fixtures/emu-setup/bad-adb-kill-server/package.json212 B
- 脚本tests/fixtures/emu-setup/bad-adb-kill-server/packages/tooling/src/android/emulator-device.ts4.4 KB
- 脚本tests/fixtures/emu-setup/bad-adb-kill-server/packages/tooling/src/android/emulators.ts4.4 KB
- 脚本tests/fixtures/emu-setup/bad-adb-kill-server/packages/tooling/src/android/toolchain.ts5.3 KB
- 脚本tests/fixtures/emu-setup/bad-adb-kill-server/packages/tooling/src/e2e/reset.ts175 B
- 其他tests/fixtures/emu-setup/bad-adb-no-serial/.gitignore65 B
- 脚本tests/fixtures/emu-setup/bad-adb-no-serial/apps/line-siege/metro.config.js435 B
- 参考文档tests/fixtures/emu-setup/bad-adb-no-serial/apps/line-siege/package.json46 B
- 参考文档tests/fixtures/emu-setup/bad-adb-no-serial/EXPECT.txt47 B
- 参考文档tests/fixtures/emu-setup/bad-adb-no-serial/package.json212 B
- 脚本tests/fixtures/emu-setup/bad-adb-no-serial/packages/tooling/src/android/emulator-device.ts4.4 KB
- 脚本tests/fixtures/emu-setup/bad-adb-no-serial/packages/tooling/src/android/emulators.ts4.4 KB
- 脚本tests/fixtures/emu-setup/bad-adb-no-serial/packages/tooling/src/android/toolchain.ts5.3 KB
- 脚本tests/fixtures/emu-setup/bad-adb-no-serial/packages/tooling/src/e2e/tap.ts222 B
- 其他tests/fixtures/emu-setup/bad-adb-shell-command/.gitignore65 B
- 脚本tests/fixtures/emu-setup/bad-adb-shell-command/apps/line-siege/metro.config.js435 B
- 参考文档tests/fixtures/emu-setup/bad-adb-shell-command/apps/line-siege/package.json46 B
- 参考文档tests/fixtures/emu-setup/bad-adb-shell-command/EXPECT.txt48 B
- 参考文档tests/fixtures/emu-setup/bad-adb-shell-command/package.json212 B
- 脚本tests/fixtures/emu-setup/bad-adb-shell-command/packages/tooling/src/android/emulator-device.ts4.4 KB
- 脚本tests/fixtures/emu-setup/bad-adb-shell-command/packages/tooling/src/android/emulators.ts4.4 KB
- 脚本tests/fixtures/emu-setup/bad-adb-shell-command/packages/tooling/src/android/toolchain.ts5.3 KB
- 脚本tests/fixtures/emu-setup/bad-adb-shell-command/packages/tooling/src/e2e/shot.ts178 B
- 其他tests/fixtures/emu-setup/bad-avd-foreign-name/.gitignore65 B
- 脚本tests/fixtures/emu-setup/bad-avd-foreign-name/apps/line-siege/metro.config.js435 B
- 参考文档tests/fixtures/emu-setup/bad-avd-foreign-name/apps/line-siege/package.json46 B
- 参考文档tests/fixtures/emu-setup/bad-avd-foreign-name/EXPECT.txt50 B
- 参考文档tests/fixtures/emu-setup/bad-avd-foreign-name/package.json212 B
- 脚本tests/fixtures/emu-setup/bad-avd-foreign-name/packages/tooling/src/android/emulator-device.ts4.4 KB
- 脚本tests/fixtures/emu-setup/bad-avd-foreign-name/packages/tooling/src/android/emulators.ts4.4 KB
- 脚本tests/fixtures/emu-setup/bad-avd-foreign-name/packages/tooling/src/android/toolchain.ts5.3 KB
- 脚本tests/fixtures/emu-setup/bad-avd-foreign-name/packages/tooling/src/e2e/kill-avd.ts135 B
- 其他tests/fixtures/emu-setup/bad-avd-foreign-start/.gitignore65 B
- 脚本tests/fixtures/emu-setup/bad-avd-foreign-start/apps/line-siege/metro.config.js435 B
- 参考文档tests/fixtures/emu-setup/bad-avd-foreign-start/apps/line-siege/package.json46 B
- 参考文档tests/fixtures/emu-setup/bad-avd-foreign-start/EXPECT.txt51 B
- 参考文档tests/fixtures/emu-setup/bad-avd-foreign-start/package.json212 B
- 脚本tests/fixtures/emu-setup/bad-avd-foreign-start/packages/tooling/src/android/emulator-device.ts4.4 KB
- 脚本tests/fixtures/emu-setup/bad-avd-foreign-start/packages/tooling/src/android/emulators.ts4.4 KB
- 脚本tests/fixtures/emu-setup/bad-avd-foreign-start/packages/tooling/src/android/toolchain.ts5.3 KB
- 脚本tests/fixtures/emu-setup/bad-avd-foreign-start/packages/tooling/src/e2e/start-avd.ts123 B
- 其他tests/fixtures/emu-setup/bad-gitignore-shell-build/.gitignore65 B
- 脚本tests/fixtures/emu-setup/bad-gitignore-shell-build/apps/line-siege/metro.config.js435 B
- 参考文档tests/fixtures/emu-setup/bad-gitignore-shell-build/apps/line-siege/package.json46 B
- 参考文档tests/fixtures/emu-setup/bad-gitignore-shell-build/EXPECT.txt65 B
- 参考文档tests/fixtures/emu-setup/bad-gitignore-shell-build/package.json212 B
- 脚本tests/fixtures/emu-setup/bad-gitignore-shell-build/packages/tooling/src/android/emulator-device.ts4.4 KB
- 脚本tests/fixtures/emu-setup/bad-gitignore-shell-build/packages/tooling/src/android/emulators.ts4.4 KB
- 脚本tests/fixtures/emu-setup/bad-gitignore-shell-build/packages/tooling/src/android/toolchain.ts5.3 KB
- 其他tests/fixtures/emu-setup/bad-gitignore/.gitignore49 B
- 脚本tests/fixtures/emu-setup/bad-gitignore/apps/line-siege/metro.config.js435 B
- 参考文档tests/fixtures/emu-setup/bad-gitignore/apps/line-siege/package.json46 B
- 参考文档tests/fixtures/emu-setup/bad-gitignore/EXPECT.txt23 B
- 参考文档tests/fixtures/emu-setup/bad-gitignore/package.json212 B
- 脚本tests/fixtures/emu-setup/bad-gitignore/packages/tooling/src/android/emulator-device.ts4.4 KB
- 脚本tests/fixtures/emu-setup/bad-gitignore/packages/tooling/src/android/emulators.ts4.4 KB
- 脚本tests/fixtures/emu-setup/bad-gitignore/packages/tooling/src/android/toolchain.ts5.3 KB
- 其他tests/fixtures/emu-setup/bad-gradle-bundle/.gitignore65 B
- 脚本tests/fixtures/emu-setup/bad-gradle-bundle/apps/line-siege/metro.config.js435 B
- 参考文档tests/fixtures/emu-setup/bad-gradle-bundle/apps/line-siege/package.json46 B
- 参考文档tests/fixtures/emu-setup/bad-gradle-bundle/EXPECT.txt62 B
- 参考文档tests/fixtures/emu-setup/bad-gradle-bundle/package.json212 B
- 脚本tests/fixtures/emu-setup/bad-gradle-bundle/packages/tooling/src/android/emulator-device.ts4.4 KB
- 脚本tests/fixtures/emu-setup/bad-gradle-bundle/packages/tooling/src/android/emulators.ts4.4 KB
- 脚本tests/fixtures/emu-setup/bad-gradle-bundle/packages/tooling/src/android/toolchain.ts5.3 KB
- 其他tests/fixtures/emu-setup/bad-jdk-21/.gitignore65 B
- 脚本tests/fixtures/emu-setup/bad-jdk-21/apps/line-siege/metro.config.js435 B
- 参考文档tests/fixtures/emu-setup/bad-jdk-21/apps/line-siege/package.json46 B
- 参考文档tests/fixtures/emu-setup/bad-jdk-21/EXPECT.txt55 B
- 参考文档tests/fixtures/emu-setup/bad-jdk-21/package.json212 B
- 脚本tests/fixtures/emu-setup/bad-jdk-21/packages/tooling/src/android/emulator-device.ts4.4 KB
- 脚本tests/fixtures/emu-setup/bad-jdk-21/packages/tooling/src/android/emulators.ts4.4 KB
- 脚本tests/fixtures/emu-setup/bad-jdk-21/packages/tooling/src/android/toolchain.ts5.3 KB
- 其他tests/fixtures/emu-setup/bad-jdk-no-java-home/.gitignore65 B
- 脚本tests/fixtures/emu-setup/bad-jdk-no-java-home/apps/line-siege/metro.config.js435 B
- 参考文档tests/fixtures/emu-setup/bad-jdk-no-java-home/apps/line-siege/package.json46 B
- 参考文档tests/fixtures/emu-setup/bad-jdk-no-java-home/EXPECT.txt52 B
- 参考文档tests/fixtures/emu-setup/bad-jdk-no-java-home/package.json212 B
- 脚本tests/fixtures/emu-setup/bad-jdk-no-java-home/packages/tooling/src/android/emulator-device.ts4.4 KB
- 脚本tests/fixtures/emu-setup/bad-jdk-no-java-home/packages/tooling/src/android/emulators.ts4.4 KB
- 脚本tests/fixtures/emu-setup/bad-jdk-no-java-home/packages/tooling/src/android/toolchain.ts5.3 KB
- 其他tests/fixtures/emu-setup/bad-metro-no-cache-key/.gitignore65 B
- 脚本tests/fixtures/emu-setup/bad-metro-no-cache-key/apps/line-siege/metro.config.js385 B
- 参考文档tests/fixtures/emu-setup/bad-metro-no-cache-key/apps/line-siege/package.json46 B
- 参考文档tests/fixtures/emu-setup/bad-metro-no-cache-key/EXPECT.txt52 B
- 参考文档tests/fixtures/emu-setup/bad-metro-no-cache-key/package.json212 B
- 脚本tests/fixtures/emu-setup/bad-metro-no-cache-key/packages/tooling/src/android/emulator-device.ts4.4 KB
- 脚本tests/fixtures/emu-setup/bad-metro-no-cache-key/packages/tooling/src/android/emulators.ts4.4 KB
- 脚本tests/fixtures/emu-setup/bad-metro-no-cache-key/packages/tooling/src/android/toolchain.ts5.3 KB
- 其他tests/fixtures/emu-setup/bad-npm-script-missing/.gitignore65 B
- 脚本tests/fixtures/emu-setup/bad-npm-script-missing/apps/line-siege/metro.config.js435 B
- 参考文档tests/fixtures/emu-setup/bad-npm-script-missing/apps/line-siege/package.json46 B
- 参考文档tests/fixtures/emu-setup/bad-npm-script-missing/EXPECT.txt13 B
- 参考文档tests/fixtures/emu-setup/bad-npm-script-missing/package.json131 B
- 脚本tests/fixtures/emu-setup/bad-npm-script-missing/packages/tooling/src/android/emulator-device.ts4.4 KB
- 脚本tests/fixtures/emu-setup/bad-npm-script-missing/packages/tooling/src/android/emulators.ts4.4 KB
- 脚本tests/fixtures/emu-setup/bad-npm-script-missing/packages/tooling/src/android/toolchain.ts5.3 KB
- 其他tests/fixtures/emu-setup/bad-npm-script-target-missing/.gitignore65 B
- 脚本tests/fixtures/emu-setup/bad-npm-script-target-missing/apps/line-siege/metro.config.js435 B
- 参考文档tests/fixtures/emu-setup/bad-npm-script-target-missing/apps/line-siege/package.json46 B
- 参考文档tests/fixtures/emu-setup/bad-npm-script-target-missing/EXPECT.txt61 B
- 参考文档tests/fixtures/emu-setup/bad-npm-script-target-missing/package.json212 B
- 脚本tests/fixtures/emu-setup/bad-npm-script-target-missing/packages/tooling/src/android/emulator-device.ts4.4 KB
- 脚本tests/fixtures/emu-setup/bad-npm-script-target-missing/packages/tooling/src/android/emulators.ts4.4 KB
- 脚本tests/fixtures/emu-setup/bad-npm-script-target-missing/packages/tooling/src/android/toolchain.ts5.3 KB
- 其他tests/fixtures/emu-setup/bad-play-store-image/.gitignore65 B
- 脚本tests/fixtures/emu-setup/bad-play-store-image/apps/line-siege/metro.config.js435 B
- 参考文档tests/fixtures/emu-setup/bad-play-store-image/apps/line-siege/package.json46 B
- 参考文档tests/fixtures/emu-setup/bad-play-store-image/EXPECT.txt58 B
- 参考文档tests/fixtures/emu-setup/bad-play-store-image/package.json212 B
- 脚本tests/fixtures/emu-setup/bad-play-store-image/packages/tooling/src/android/emulator-device.ts4.4 KB
- 脚本tests/fixtures/emu-setup/bad-play-store-image/packages/tooling/src/android/emulators.ts4.4 KB
- 脚本tests/fixtures/emu-setup/bad-play-store-image/packages/tooling/src/android/toolchain.ts5.3 KB
- 其他tests/fixtures/emu-setup/bad-tooling-file-missing/.gitignore65 B
- 脚本tests/fixtures/emu-setup/bad-tooling-file-missing/apps/line-siege/metro.config.js435 B
- 参考文档tests/fixtures/emu-setup/bad-tooling-file-missing/apps/line-siege/package.json46 B
- 参考文档tests/fixtures/emu-setup/bad-tooling-file-missing/EXPECT.txt58 B
- 参考文档tests/fixtures/emu-setup/bad-tooling-file-missing/package.json212 B
- 脚本tests/fixtures/emu-setup/bad-tooling-file-missing/packages/tooling/src/android/emulator-device.ts4.4 KB
- 脚本tests/fixtures/emu-setup/bad-tooling-file-missing/packages/tooling/src/android/toolchain.ts5.3 KB
- 参考文档tests/fixtures/emu-setup/error-missing-repo/ARGS.txt13 B
- 参考文档tests/fixtures/emu-setup/error-missing-repo/EXPECT.txt18 B
- 参考文档tests/fixtures/emu-setup/error-nothing-to-check/EXPECT.txt35 B
- 参考文档tests/fixtures/emu-setup/error-nothing-to-check/notes.txt11 B
- 其他tests/fixtures/emu-setup/good/.gitignore91 B
- 脚本tests/fixtures/emu-setup/good/apps/line-siege/metro.config.js435 B
- 参考文档tests/fixtures/emu-setup/good/apps/line-siege/package.json46 B
- 参考文档tests/fixtures/emu-setup/good/package.json212 B
- 脚本tests/fixtures/emu-setup/good/packages/tooling/src/android/emulator-device.ts4.4 KB
- 脚本tests/fixtures/emu-setup/good/packages/tooling/src/android/emulators.ts4.4 KB
- 脚本tests/fixtures/emu-setup/good/packages/tooling/src/android/toolchain.ts5.3 KB
- 脚本tests/fixtures/fakes/fake-aapt2.mjs745 B
03 SKILL.md 正文
Android emulator build
Turns apps/<game> into a Release Android app with one command, npm run build:android:emu, runs it on a dedicated emulator and proves what was built: the package, the variant (test code present in test builds, absent in store builds), the permissions, the manifest flags, and a screen that actually draws. No Android Studio GUI, no Metro, no Play signing.
Rules that must hold
- Build only through
npm run build:android:emu -- --app <game> [--variant test|store] [--ads off|test|live], fromnpx expo prebuild --platform android --clean. Never edit or commitandroid/. Continuous Native Generation regeneratesandroid/and drops hand edits; every setting goes intoapp.config.ts,withShellor a config plugin. - Use JDK 17 through
JAVA_HOME(Android Studio's JBR) andANDROID_HOMEwith the pinned SDK parts; never switch the Mac's Java. AGP 8.12 and Gradle 9 run on JDK 17, and other projects on this Mac rely on the global default. - Export
APP_VARIANT,EXPO_PUBLIC_APP_VARIANT(same value) andADS_MODEonce for the whole run, and key Metro'scacheVersionon the variant. The variant enters the APK three times (prebuild, expo-constants' Gradle task, Metro), and Metro's cache ignores it: verified on iOS, a store build after a test build shipped the debug module. - Use
assembleReleasefor emulator APKs, for the emulator's ABI only (-PreactNativeArchitectures=arm64-v8a,gradleEmuArgs);bundleReleasewith every ABI belongs to the Play release only (android-release-play). An emulator installs an APK and runs one ABI, so compiling the other three only costs time, and a second AAB path outside the release tooling would bypass the store gate. - Name AVDs
e07-android-<purpose>and give them the pinnedgoogle_apisarm64 image; never use a Play Store image for checks.adb root, which the kill test and save inspection need, fails on Play Store images, and the prefix is what keeps other projects' AVDs untouched. - Start each AVD on a free console port, target it as
emulator-<port>and passadb -s <serial>in every call. Neveradb kill-server, and never start, change or delete another project's AVD. Several sessions and emulators share this Mac's adb server; a call without a serial reaches whichever device answers. - Wait on
sys.boot_completedand the app's ready signal, never a fixed sleep; take the screenshot withadb -s <serial> exec-out screencap -pand look at it. A build that succeeded can still launch to a blank screen or Roboto instead of Lilita One; only the picture shows it. - Set
EXPO_NO_TELEMETRY=1andCI=1in every tooling process. No telemetry, and no prompt that would hang an unattended run. - Owner steps are asked for, never worked around: JDK 17 (Android Studio), SDK downloads and SDK licences. A missing NDK or system image is a large download into the owner's SDK, and a licence is the owner's to accept; the preflight stops (exit 2) before Gradle could download anything by itself.
- A build proves itself with
check-emu-app: packageio.applander.<game id without hyphens>, the test sentinel only in test builds, the variant inassets/app.configand theE07AppVariantmeta-data, Google's Android sample AdMob id except in live builds, permissions on the allowlist, not debuggable,supportsRtltrue andallowBackupnot false. These are what players get (N3, N6, N11, D5, owner decision O4); a live build without the owner's Android AdMob ids (none, a placeholder, or a unit of Google's sample publisherca-app-pub-3940256099942544) failsowner-placeholderand endsOWNER STEPS PENDING: GP5, the expected result until owner step GP5.
Workflow
-
First time in a repo, or when the preflight or
check-emu-setupfails on the toolchain: read references/environment-and-sdk.md (the pins, what this Mac has and lacks, JDK selection, downloads and licences, owner steps) and references/build-variants.md (the matrix, the three moments, the Metro trap, the gate and the manifest marker). -
Install the templates that are missing (copy each to the same path in the repo; the first line of each names it). This is Android step 1 of pocket-arcade-index's Android order:
Template Goes to templates/packages/tooling/src/android/toolchain.ts+toolchain.test.tssame paths ( JDK_MAJOR,ANDROID_PINS,selectAndroidToolchain,androidToolEnv)templates/packages/tooling/src/android/emulators.ts+emulators.test.tssame paths ( avdName,isAvdPurpose,freeConsolePort,emulatorArgs,adbArgs,demoModeCommands,perfLogReaderOf)templates/packages/tooling/src/android/emulator-device.tssame path (the device side: create with a device profile, start, boot, adb, perfLogReader; marked device-only)templates/packages/tooling/src/build/emu-build-plan.ts+emu-build-plan.test.tssame paths (arguments, commands, paths, packageNameOf: ios-release-testflight'sappIdOf)templates/packages/tooling/src/build/build-android-emu.tssame path (the CLI) They reuse files the iOS build already brought:
build/sim-build-plan.ts(variantEnv,readyReason),build/flag-pairs.ts,build/game-id.ts,ios/tool-step.ts(runStepOrThrow),release/store-gate.ts(appIdOf),ios/sim-app.ts(readPerfLogPayload),clock/system-clock.tsand the Shell'sconfig/app-variant.ts. Copy each test before its module against a typed stub and see it fail on an assertion (tdd-workflow). Rootpackage.jsonscript, byte for byte as quality-gates has it:"build:android:emu": "node packages/tooling/src/build/build-android-emu.ts". Thennpm run -s check:fast. -
Check the setup:
node ${CLAUDE_SKILL_DIR}/scripts/check-emu-setup.mjs .from the repo root. Fix everyFAILline (file, rule, fix) and rerun untilRESULT: PASS. -
Build and run:
npm run build:android:emu -- --app <game> --variant test --ads off(--helpprints the options;--avd <purpose>picks the emulator, defaulte07-android-smoke). It stops with exit 2 before anything is touched when JDK 17, a pinned SDK part or the emulator image is missing: ask for the download (rule 9). Read references/emulator-commands.md when a step fails, when you run a step by hand, or before changing the script. The run prints the APK path, the serial and the screenshot path. -
Prove the build:
node ${CLAUDE_SKILL_DIR}/scripts/check-emu-app.mjs --apk apps/<game>/android/app/build/outputs/apk/release/app-release.apk --variant test --ads off --game <game> --screenshot reports/android/<game>/smoke-test-off.png, then open the PNG with the Read tool and look at it: S1 or S2, the title in Lilita One, the board drawn where shown, no crash dialog, not black, white or blank. -
When the change touches variants,
metro.config.js,test-only*,withShell, a plugin or the build tooling: build the store variant right after the test variant, without clearing any cache (--variant store --ads off, or--ads liveonce the game has its Android AdMob ids), runcheck-emu-app.mjson both, and checkunzip -p <apk> assets/index.android.bundle | grep -a -c SHELL_TEST_BUILD_ONLYprints 0 for the store APK. -
On any failure, match the first error line in references/failures.md, fix the cause (never the check), rerun the failing step, then the checks. A failure that is not there goes through troubleshooting-playbook's
find-fix.mjs --log <log>. -
Shut down your emulators at the end of the task, by serial:
adb -s emulator-<port> emu kill. Delete an AVD only when it is yours and no longer needed. -
Report in plain words: game, variant and ads, AVD and serial, screenshot path and what it shows, and the
RESULTlines of both checkers.
Definition of done
- [ ]
npm run build:android:emu -- --app <game> --variant <v> --ads <m>ran from a clean prebuild and printedready (...)with a screenshot path. - [ ] The screenshot was opened and looked at, and shows the intended screen (not black, white or blank, the title in Lilita One).
- [ ] For variant or tooling changes: a test and a store build made back to back both pass
check-emu-app.mjs, and the store APK's sentinel count is 0. - [ ] Only
e07-android-*AVDs were created, started or deleted, every adb call named its serial, no SDK part was downloaded or licence accepted without the owner's word, and the session's emulators are shut down. - [ ]
node ${CLAUDE_SKILL_DIR}/scripts/check-emu-app.mjs --apk <apk> --variant <v> --ads <m> --game <game> --screenshot <png>printsRESULT: PASS(a store build may end only withowner-placeholderlines andOWNER STEPS PENDING: ...while owner steps are pending). - [ ]
node ${CLAUDE_SKILL_DIR}/scripts/check-emu-setup.mjs .printsRESULT: PASS
Anti-patterns
- Opening
android/in Android Studio to fix a Gradle setting. The next prebuild erases it; put it inwithShellor a config plugin. /usr/libexec/java_home -v 21or a Homebrew JDK because Gradle complained. PointJAVA_HOMEat the JBR for this process only (androidToolEnv).- Letting Gradle "just download" the NDK. That is an unasked download into the owner's SDK; the preflight stops first, ask, then
sdkmanager. APP_VARIANT=store npx expo prebuildand then./gradlew assembleReleasein a fresh shell. expo-constants and Metro then see no variant; export once and keep it.adb shell ...without-s, oradb kill-serverto "fix" an offline device. The first reaches a random device; the second breaks every other session's emulators.- Running checks on
Pixel_8a_API_35because it is already there. It belongs to another project and is a Play Store image withoutadb root; createe07-android-<purpose>. sleep 60 && adb exec-out screencap. Too short on a cold boot, wasted time on a warm one; pollsys.boot_completedand the ready signal.npx expo run:androidor./gradlew installDebugto "check quickly". Debug builds load JS from Metro and differ from what players run; the smoke test is the Release APK.- Declaring success from
BUILD SUCCESSFUL. Install, launch, screenshot, check and look.
Files in this skill
| File | What it is | Read/run when |
|---|---|---|
| references/environment-and-sdk.md | The pins and their sources, what this Mac has and lacks, JDK 17 per process, ANDROID_HOME, downloads and licences, the tool environment, first-build downloads, .gitignore, owner steps |
Workflow step 1, and when the toolchain or the Mac changes |
| references/build-variants.md | The variant matrix on Android, the three moments, the Metro trap, the test-only gate in index.android.bundle, the E07AppVariant meta-data, the AdMob id per mode, what check-emu-app reads |
Workflow steps 1 and 6 |
| references/emulator-commands.md | Every command of the run: avdmanager, the emulator on a free port, boot polling, demo mode, install, launch, ready, screencap, reading the save, shutting down, commands never run | Workflow step 4, and when running a step by hand |
| references/failures.md | Symptom, cause and fix for environment, prebuild, Gradle, Kotlin, NDK, Hermes, Metro, variant, emulator and adb failures | Workflow step 7, whenever something fails |
templates/packages/tooling/src/android/ |
toolchain.ts (JDK 17, SDK pins, tool env), emulators.ts (AVD names, ports, adb arguments, demo mode), emulator-device.ts (the device side, device-only) and the tests of the first two |
Workflow step 2 |
templates/packages/tooling/src/build/ |
emu-build-plan.ts (pure plan) and its test, build-android-emu.ts (the CLI) |
Workflow step 2 |
scripts/check-emu-setup.mjs |
Checks the repo setup: the npm script and tooling files, .gitignore, the Metro cache key, adb serials, AVD names, the JDK 17 pin, no Play Store image, assembleRelease | Workflow step 3 and the definition of done |
scripts/check-emu-app.mjs |
Checks a built APK against its variant: package, sentinel, app.config, the variant meta-data, the AdMob id, owner placeholders by field (OWNER STEPS PENDING), permissions, debuggable, supportsRtl, allowBackup, SDK levels, a blank screenshot |
Workflow steps 5-6 and the definition of done |
scripts/lib/apk.mjs |
The parsers of aapt2 dump badging and dump xmltree |
Never by hand |
scripts/lib/zip.mjs |
Zip reader (node:zlib) for APKs and AABs (synced from the library, the same reader android-release-play uses; do not edit here) | Never by hand |
scripts/lib/manifest-tree.mjs |
findElements and metaDataValue over a parsed manifest tree (synced from the library; do not edit here) |
Never by hand |
scripts/lib/png.mjs |
PNG decoder and the one-colour measure used by the screenshot rule (synced from the library, the same decoder ios-simulator-build uses; do not edit here) | Never by hand |
scripts/lib/ship-placeholders.mjs |
The scaffold placeholders a ship gate refuses, with their owner steps (G3, G5, GP5) and the OWNER STEPS PENDING line (synced from the library; do not edit here) |
Never by hand |
assets/permission-allowlist.json |
The permissions a Pocket Arcade APK may hold, each with who declares it (synced from the library, the same list android-release-play and privacy-and-network-audit check; do not edit here) | When check-emu-app reports permission |
scripts/selftest.mjs |
Proves both checkers pass good fixtures and catch every planted bug (APKs read through a fake aapt2) | After changing a checker, the allowlist or a template |
scripts/check-lib.mjs |
Shared script helper, synced from the library (do not edit here) | Never by hand |
assets/shared.json |
Declares the shared files this skill copies in | When adding a shared file |
tests/fixtures/ |
Good and planted-bad repos (emu-setup/), APKs with their aapt2 dumps and screenshots (emu-app/, emu-app-store/), and fakes/fake-aapt2.mjs |
When adding a rule to a checker |
Related skills
android-release-play- the signed AAB, the store-AAB gate and the upload to Google Play internal testing.ios-simulator-build- the iOS twin of this skill; the variant files and the test-only gate are shared.architecture-and-boundaries-withShell, the Android block, the variant marker plugin and where the variant files live.troubleshooting-playbook- failures outside this skill's table (find-fix.mjs).e2e-maestro- flows and the screenshot matrix on top of a test-variant emulator build.toybox-visual-parity- comparing Android screens with their design screenshots.
04 同仓库更多 Skills
unit-and-component-tests
Sets up Jest and writes Pocket Arcade test code - three projects, RNTL 14 async via renderWithShell, root SDK mocks, fakes, fast-check, coverage, Stryker. Use when a test needs the Shell wrapper, a mock or a fake, or Jest fails. Not for the red-green loop (tdd-workflow) or goldens (golden-tests).
typescript-and-lint-rules
Enforces Pocket Arcade's strict TypeScript 6 tsconfigs, ESLint 9 flat config, Prettier and size limits. Use when writing or splitting .ts/.tsx or fixing a tsc or lint error. Not for gate wiring (quality-gates), names (naming-conventions) or import zones (architecture-and-boundaries).
demo-skill
Builds a demo. Use when testing the pitfall checker.
demo-skill
Builds a demo. Use when testing the pitfall checker.
troubleshooting-playbook
Diagnoses and fixes Pocket Arcade failures with a catalogue of 300+ known ones (symptom, cause, fix). Use when something errors, crashes, hangs or renders wrong, or an error or log needs explaining. Not for gate setup (quality-gates) or running builds (ios-simulator-build, ios-release-testflight).
toybox-visual-parity
Proves a built Pocket Arcade screen matches its Toybox design screenshot (light/dark, en/fa) and drives the fixes: capture, element gates, sheets, sign-off. Use when any screen is built or changed, or for visual parity, design match, screenshot compare. Not for building screens (toybox-screens).