HomeGuidesReferenceLearn
ArchiveExpo SnackDiscord and ForumsNewsletter

Build APKs for Android Emulators and devices

Learn how to configure and install an .apk for Android Emulators and devices when using EAS Build.


The default file format used when building Android apps with EAS Build is an Android App Bundle (AAB/.aab). This format is optimized for distribution to the Google Play Store. However, AABs can't be installed directly on your device. To install a build directly to your Android device or emulator, you need to build an Android Package (APK/.apk) instead.

Configuring a profile to build APKs

To generate an .apk, modify the eas.json by adding one of the following properties in a build profile:

  • developmentClient to true (default)
  • distribution to internal
  • android.buildType to apk
  • android.gradleCommand to :app:assembleRelease, :app:assembleDebug or any other gradle command that produces .apk
eas.json
{
  "build": {
    "preview": {
      "android": {
        "buildType": "apk"
      }
    },
    "preview2": {
      "android": {
        "gradleCommand": ":app:assembleRelease"
      }
    },
    "preview3": {
      "developmentClient": true
    },
    "preview4": {
      "distribution": "internal"
    },
    "production": {}
  }
}

Now you can run your build with the following command:

Terminal
eas build -p android --profile preview

Remember that you can name the profile whatever you like. We named the profile preview. However, you can call it local, emulator, or whatever makes the most sense for you.

Installing your build

Emulator (virtual device)

If you haven't installed or run an Android Emulator before, follow the Android Studio emulator guide before proceeding.

Once your build is completed, the CLI will prompt you to automatically download and install it on the Android Emulator. When prompted, press Y to directly install it on the emulator.

In case you have multiple builds, you can also run the eas build:run command at any time to download a specific build and automatically install it on the Android Emulator:

Terminal
eas build:run -p android

The command also shows a list of available builds of your project. You can select the build to install on the emulator from this list. Each build in the list has a build ID, the time elapsed since the build creation, the build number, the version number, and the git commit information. The list also displays invalid builds if a project has any.

For example, the image below lists the build of a project:

When the build's installation is complete, it will appear on the home screen. If it's a development build, open a terminal window and start the development server by running the command npx expo start. For SDK 48 and lower, use the --dev-client flag with the command.

Running the latest build

Pass the --latest flag to the eas build:run command to download and install the latest build on the Android Emulator:

Terminal
eas build:run -p android --latest

Physical device

Download directly to the device

  • Once your build is completed, copy the URL to the APK from the build details page or the link provided when eas build is done.
  • Send that URL to your device. Maybe by email? Up to you.
  • Open the URL on your device, install the APK and run it.

Install with adb

  • Install adb if you don't have it installed already.
  • Connect your device to your computer and enable adb debugging on your device if you haven't already.
  • Once your build is completed, download the APK from the build details page or the link provided when eas build is done.
  • Run adb install path/to/the/file.apk.
  • Run the app on your device.