{"slug": "agent-prs-that-break-only-on-android-react-native-and-expo", "title": "Agent PRs that break only on Android (React Native and Expo)", "summary": "Mobilebox published a workflow for catching React Native and Expo pull requests that break only on Android by building the PR's APK in CI and running it on a cloud Android phone before merge. The approach covers EAS APK build profiles and bare React Native gradle release builds, plus a GitHub Action that installs the APK, waits for a named text, and posts a screenshot comment, and an MCP server that lets coding agents drive the changed flow on a $0.01-per-minute cloud device.", "body_md": "*Disclosure: we build Mobilebox, one of the services in this post. Written with AI assistance from our own published data; every number carries its date and source, and corrections go to [hello@mobilebox.dev](mailto:hello@mobilebox.dev).*\n\nTo catch the React Native or Expo pull requests that break only on Android, build the PR's Android APK in CI and open it on a cloud Android phone before anyone merges. A check that reads the JavaScript can't see these bugs, and an iOS simulator run never renders them. On Mobilebox a phone costs $0.01 a minute, billed per second, so a check that installs the build, walks the changed screen and posts screenshots on the PR costs a few cents (prices as of November 17, 2026).\n\nCoding agents usually test where they run: TypeScript, unit tests, maybe an iOS simulator on a Mac. Android-only failures come from code that no step in that loop executes:\n\n`Button.android.tsx` over `Button.tsx` on Android, and `Platform.OS === 'android'` branches run only there (`.android` one ships a stale screen.`KeyboardAvoidingView` behaves differently per platform, and the right `behavior` value differs (`BackHandler` (`assembleRelease` while the JavaScript type-checks clean.\nNone of these is exotic. They're just on the platform nobody opened.\n\n**Expo (EAS).** An installable APK needs a build profile with `\"android\": { \"buildType\": \"apk\" }` in `eas.json`; the default store build is an AAB ([Build APKs for Android emulators and devices](https://docs.expo.dev/build-reference/apk/)). Then `eas build --platform android --profile preview` on the PR.\n\n**Bare React Native.** In `android/`, run `./gradlew assembleRelease`. A debug build loads its JavaScript from the Metro dev server, so it won't start on its own on a remote phone. The release build bundles the JavaScript, and the default template signs it with the debug key.\n\nMobilebox phones are Android 14 on arm64, so the APK needs the `arm64-v8a` ABI, which React Native builds by default. Split bundles install too ([install guide](https://mobilebox.dev/blog/install-apk-split-bundles?via=devto)).\n\nTwo ways, depending on how much of the flow you want checked:\n\n**Every push: the GitHub Action.** [mobilebox-dev/android-smoke-action](https://github.com/mobilebox-dev/android-smoke-action) installs the APK on a fresh phone, opens it, waits for a text you name and deletes the phone. On a pull request it posts one comment with a screenshot, the time and the cost, and updates it on each push. After checkout and `npm ci`, the two steps for an Expo app:\n\n```\n      - run: npx eas-cli build --platform android --profile preview --local --output app.apk --non-interactive\n        env:\n          EXPO_TOKEN: ${{ secrets.EXPO_TOKEN }}\n      - uses: mobilebox-dev/android-smoke-action@v1\n        with:\n          apk: app.apk\n          wait-for: Welcome\n          api-key: ${{ secrets.MOBILESANDBOX_API_KEY }}\n```\n\n**The changed flow: your coding agent over MCP.** Add `https://mobilebox.dev/mcp` to Claude Code, Cursor or Codex and sign in ([setup per tool](https://mobilebox.dev/blog/android-mcp-cursor-codex-vscode?via=devto)). Then give the agent that wrote the PR the check it skipped:\n\n```\nInstall the APK from this PR on a Mobilebox phone. Open the checkout\nscreen, focus the card number field and confirm the Pay button is still\nvisible with the keyboard open. Press back and confirm the cart comes\nback. Call publish_proof with before and after screenshots, post the\nMarkdown on the PR, then delete the phone.\n```\n\nThe agent reads the screen as numbered elements, taps and types, and handles the permission dialog like any other screen ([agent guide](https://mobilebox.dev/docs/agents?via=devto)). The proof comment shows the device, the time and the cost, all taken from the phone's own session. What the comment looks like and what is kept: [Screenshots in every pull request](https://mobilebox.dev/blog/screenshots-in-every-pull-request?via=devto).\n\nA Mobilebox phone is an Android 14 cloud phone without Google Play. Bugs that need a specific vendor's hardware, Play Integrity or Play services need a real device ([when that matters](https://mobilebox.dev/blog/real-android-devices-vs-cloud-phones?via=devto)). For layout, keyboard, back, permissions and \"does the build even start\", a phone per PR is enough, and it runs before a human has to.\n\n*Originally published at [mobilebox.dev/blog/react-native-android-agent-prs](https://mobilebox.dev/blog/react-native-android-agent-prs?via=devto).*", "url": "https://wpnews.pro/news/agent-prs-that-break-only-on-android-react-native-and-expo", "canonical_source": "https://dev.to/mobilebox/agent-prs-that-break-only-on-android-react-native-and-expo-2j2c", "published_at": "2026-11-21 11:00:14+00:00", "updated_at": "2026-11-21 11:11:51.777057+00:00", "lang": "en", "topics": ["ai-agents", "developer-tools", "ai-tools"], "entities": ["Mobilebox", "React Native", "Expo", "EAS", "GitHub Actions", "Claude Code", "Cursor", "Codex"], "also_reported_by": [], "takeaway": "Android-only React Native bugs live in .android.tsx files, Platform.OS branches, KeyboardAvoidingView behavior and BackHandler, so build a release APK and drive the changed screen on a real Android device in CI rather than relying on type checks or an iOS simulator.", "recommendation": {"advice": "Give coding agents an Android check they skip: build the PR's release APK and have the agent open the changed screen, exercise the flow and post before/after screenshots before merge.", "playbook": "coding-agents", "playbook_url": "https://wpnews.pro/playbooks/coding-agents"}, "alternates": {"html": "https://wpnews.pro/news/agent-prs-that-break-only-on-android-react-native-and-expo", "markdown": "https://wpnews.pro/news/agent-prs-that-break-only-on-android-react-native-and-expo.md", "text": "https://wpnews.pro/news/agent-prs-that-break-only-on-android-react-native-and-expo.txt", "jsonld": "https://wpnews.pro/news/agent-prs-that-break-only-on-android-react-native-and-expo.jsonld"}}