build-tools starts expo-device-hub for Android simulator sessions
Introduced 2026-10-15 · score 0.91
HOW TO USE IT
For an EAS Android simulator session, start `expo-device-hub` with token authentication and the required website origins. Read and report the session token from the Hub state file after it starts.
npx expo-device-hub --require-token --port <port> --platform android --cors-origin https://expo.dev --frame-ancestor https://expo.devWHY THIS HELPS
Start an Android simulator session that requires a token and website origins.
BEFORE THIS CHANGE
EAS started Android sessions without these flags, leaving website requests blocked and the Hub on the public ngrok tunnel without a token.
REQUIREMENTS AND LIMITATIONS
- Version: v25.0.0
- --require-token: Require a session token; with this flag the Hub records the token in its state file.
- --port <port>: Select the Hub's listening port; the EAS worker chooses an available port.
- --platform android: Select the Android platform; this is what the EAS worker passes.
- --cors-origin <origin>: Repeatable; allow a website origin to use the Hub. Values must be origins or subdomain wildcards, without paths or credentials.
- --frame-ancestor <origin>: EAS passes the website origin as a frame ancestor; whether this option accepts multiple values or has additional constraints was not found in the consulted documentation.
- EXPO_DEVICE_HUB_STATE_DIR: Override the directory for `server-<port>.json`; otherwise it is under `$TMPDIR/expo-device-hub`. The file contains the token when `--require-token` is set.
- Prerequisite: Use an `expo-device-hub` release that supports `--cors-origin`; EAS CLI v25.0.0's release PR requires at least 0.17.0.
- Prerequisite: Android emulators require the Android SDK, including `emulator` and `adb`.
FIRST-PARTY EVIDENCE
- https://github.com/expo/eas-cli/releases/tag/v25.0.0
- https://github.com/expo/expo-device-hub/pull/292
- https://github.com/expo/expo-device-hub/pull/294
- https://github.com/expo/eas-cli/blob/main/packages/build-tools/src/steps/utils/deviceSessionHost.ts
- https://github.com/expo/eas-cli/pull/4578
- https://github.com/expo/expo-device-hub
Check the installed version and the source before using it. Entry JSON