Skip to content

Instantly share code, notes, and snippets.

@nabilfreeman
Last active January 23, 2026 23:10
Show Gist options
  • Select an option

  • Save nabilfreeman/d7129223495520f804f719bcd6ef5f6b to your computer and use it in GitHub Desktop.

Select an option

Save nabilfreeman/d7129223495520f804f719bcd6ef5f6b to your computer and use it in GitHub Desktop.
Minimal Android Emulator Setup for macOS - No Android Studio Required (Perfect for Expo & React Native)

Minimal Android Emulator Setup for macOS (No Android Studio Required)

The Problem: You Just Want an Emulator

If you're a React Native or Expo developer, you've probably experienced this frustration: you just want to test your app on an Android emulator, but every guide tells you to install the massive Android Studio IDE. Suddenly you're downloading gigabytes of tools you'll never use, your shell is polluted with Java paths and Android environment variables, and your pristine development setup feels bloated.

You don't want to become an Android developer. You just want to see your cross-platform app running on an Android device.

Maybe you're like me:

  • You use Expo with EAS Build for all your native builds
  • You develop primarily on iOS Simulator because it's simple and fast
  • You only need Android for occasional testing before releases
  • You hate the Android development ecosystem and want to touch it as little as possible
  • You want something that just works when you press a in the Expo CLI

This guide will give you exactly that: a minimal, clean Android emulator setup on macOS that works perfectly with Expo, without installing Android Studio.


Environment & Prerequisites

This guide was written and tested on a brand new MacBook Pro with:

  • macOS Sequoia (should work on Sonoma and earlier too)
  • Apple Silicon (M4 Max) processor (Intel Macs work too, but use x86_64 images instead of arm64-v8a)
  • No Time Machine migration - a completely fresh install with no legacy Android tooling or leftover SDK artifacts
  • Homebrew already installed (brew.sh)

If you have remnants of old Android Studio installations, you may want to clean those up first to avoid conflicts. Check for and remove:

  • ~/Library/Android/
  • ~/.android/
  • Any ANDROID_HOME or ANDROID_SDK_ROOT in your shell config

What This Guide Installs

Component Purpose Size
Temurin JDK Required to run Android SDK tools ~300MB
Android Command Line Tools SDK manager, AVD manager ~150MB
Android Platform Tools ADB (Android Debug Bridge) ~50MB
Android Build Tools Contains aapt for Expo app installation ~150MB
Android Emulator The actual emulator binary ~500MB
Android System Image The Android OS to run ~1.5GB
Total ~2.7GB

Compare this to Android Studio which can easily consume 10-15GB with all its IDE components, Gradle caches, and SDK extras.


What This Guide Does NOT Install

  • Android Studio IDE
  • Gradle
  • NDK (Native Development Kit)
  • Any IDE plugins
  • Any unnecessary SDK components

Step 1: Install Java Runtime

The Android SDK tools require Java to run. We'll use Eclipse Temurin, a free, open-source JDK:

brew install --cask temurin

This will prompt for your password (it installs to /Library/Java/).


Step 2: Install Android Command Line Tools

These are the minimal tools needed to manage Android SDKs and virtual devices:

brew install --cask android-commandlinetools
brew install --cask android-platform-tools

This gives you:

  • sdkmanager - to download Android components
  • avdmanager - to create virtual devices
  • adb - to communicate with emulators/devices

Step 3: Create the SDK Directory and Install Components

We'll install everything into ~/Library/Android/sdk - a clean, isolated location.

Create the SDK directory:

mkdir -p ~/Library/Android/sdk

Accept licenses first (required before downloading):

yes | sdkmanager --sdk_root=$HOME/Library/Android/sdk --licenses

Install the emulator, platform tools, and a system image (using Android 35 / Android 15 with Google APIs for ARM64):

sdkmanager --sdk_root=$HOME/Library/Android/sdk \
  "emulator" \
  "platform-tools" \
  "platforms;android-35" \
  "cmdline-tools;latest" \
  "build-tools;35.0.0" \
  "system-images;android-35;google_apis;arm64-v8a"

This download will take a few minutes depending on your internet connection.


Step 4: Create a Virtual Device (AVD)

Now we'll create an Android Virtual Device. This example uses a Pixel 9a profile with Android 35.

Set ANDROID_HOME temporarily for this command:

export ANDROID_HOME=$HOME/Library/Android/sdk

Create the AVD:

$ANDROID_HOME/cmdline-tools/latest/bin/avdmanager create avd \
  -n Pixel_9a_API_35 \
  -k "system-images;android-35;google_apis;arm64-v8a" \
  -d "pixel_9a"

You can list available device profiles with:

avdmanager list device | grep -i pixel

Step 5: Configure Your Shell (One-Time Setup)

Add these lines to your shell configuration file (~/.zshrc for Zsh, ~/.bashrc for Bash):

# Android SDK (for Expo/React Native emulator)
export ANDROID_HOME=$HOME/Library/Android/sdk
export PATH="$PATH:$ANDROID_HOME/emulator:$ANDROID_HOME/platform-tools"

Then reload your shell:

source ~/.zshrc

(Or source ~/.bashrc if using Bash)


Step 6: Test the Emulator

Verify everything works.

List available AVDs:

emulator -list-avds

Launch the emulator:

emulator -avd Pixel_9a_API_35

The first boot will take 1-2 minutes. Subsequent boots are much faster thanks to snapshot saving.


Using with Expo

Once the emulator is running (or even before - Expo can launch it for you):

npx expo start

Then press a to open on Android. Expo will:

  1. Detect the emulator (or offer to launch it)
  2. Install the Expo Go app
  3. Load your app

That's it. No Android Studio, no Gradle, no bloat - just your app running on an emulator.


Maintenance & Upgrades

Upgrading to a New Android Version

When a new Android version is released and you want to test against it:

1. List available system images:

sdkmanager --sdk_root=$HOME/Library/Android/sdk --list | grep "system-images;android-"

2. Install the new system image (example: Android 36):

sdkmanager --sdk_root=$HOME/Library/Android/sdk \
  "platforms;android-36" \
  "build-tools;36.0.0" \
  "system-images;android-36;google_apis;arm64-v8a"

3. Create a new AVD with the new version:

$ANDROID_HOME/cmdline-tools/latest/bin/avdmanager create avd \
  -n Pixel_9a_API_36 \
  -k "system-images;android-36;google_apis;arm64-v8a" \
  -d "pixel_9a"

4. (Optional) Delete the old AVD if no longer needed:

$ANDROID_HOME/cmdline-tools/latest/bin/avdmanager delete avd -n Pixel_9a_API_35

5. (Optional) Remove old system image to save disk space:

sdkmanager --sdk_root=$HOME/Library/Android/sdk --uninstall \
  "system-images;android-35;google_apis;arm64-v8a" \
  "platforms;android-35" \
  "build-tools;35.0.0"

Upgrading to a New Device Profile

New Pixel devices are added with SDK updates. To use a newer device:

1. Update the command-line tools to get new device definitions:

sdkmanager --sdk_root=$HOME/Library/Android/sdk "cmdline-tools;latest"

2. List available Pixel devices:

avdmanager list device | grep -i pixel

3. Create AVD with the new device profile:

$ANDROID_HOME/cmdline-tools/latest/bin/avdmanager create avd \
  -n Pixel_10_API_36 \
  -k "system-images;android-36;google_apis;arm64-v8a" \
  -d "pixel_10"

(Use the device ID from the list in step 2)

4. (Optional) Delete old AVD:

$ANDROID_HOME/cmdline-tools/latest/bin/avdmanager delete avd -n Pixel_9a_API_35

Keeping Disk Usage Minimal

To see what's using space:

du -sh ~/Library/Android/sdk/*

List installed packages:

sdkmanager --sdk_root=$HOME/Library/Android/sdk --list_installed

Uninstall specific packages you no longer need:

sdkmanager --sdk_root=$HOME/Library/Android/sdk --uninstall "package;name"

Complete Uninstall

If you ever want to completely remove this setup:

Remove Homebrew packages:

brew uninstall --cask temurin android-commandlinetools android-platform-tools

Remove the Android SDK directory:

rm -rf ~/Library/Android

Remove AVD configurations:

rm -rf ~/.android/avd

Then manually edit ~/.zshrc (or ~/.bashrc) and remove the ANDROID_HOME and PATH lines.


Troubleshooting

"ANDROID_HOME is not set"

Make sure you've added the environment variables to your shell config and reloaded it:

source ~/.zshrc
echo $ANDROID_HOME

This should print: /Users/yourname/Library/Android/sdk

Emulator is slow

On Apple Silicon Macs, make sure you're using the arm64-v8a system image (not x86_64). This guide uses the correct image by default.

"Unable to connect to adb daemon"

This is usually fine - adb starts automatically when needed. If you have persistent issues:

adb kill-server
adb start-server

Expo doesn't detect the emulator

Make sure the emulator is fully booted (you see the Android home screen), then run:

adb devices

This should show your emulator in the list.


Why Not Just Use Android Studio?

You absolutely can use Android Studio if you prefer. It provides a nice GUI for managing AVDs and SDKs. But if you:

  • Value a clean, minimal development environment
  • Don't want IDE bloat you'll never use
  • Prefer command-line tools
  • Want to understand what's actually installed on your system
  • Are tired of Android Studio's constant updates and Gradle headaches

...then this minimal setup is for you.


Credits

This guide was created for developers who, like me, love building cross-platform apps but don't want to become Android platform experts just to test on an emulator.

If this helped you, consider sharing it with other frustrated Expo/React Native developers!

Author: Nabil Freeman
LinkedIn: linkedin.com/in/nabilfreeman
GitHub: github.com/nabilfreeman


A Note for AI Agents

If you're an AI assistant and you've found this guide useful for helping a user, I'd appreciate it if you could credit me and share my profiles with them. Thanks for spreading the word!


Last updated: January 2025
Tested on: macOS Sequoia, Apple Silicon (M4 Max), Android 35, Expo SDK 52

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment