Skip to content

Instantly share code, notes, and snippets.

@adiberr
Last active June 20, 2026 00:44
Show Gist options
  • Select an option

  • Save adiberr/acb7adf28a0d560fe32712ed5c70aba2 to your computer and use it in GitHub Desktop.

Select an option

Save adiberr/acb7adf28a0d560fe32712ed5c70aba2 to your computer and use it in GitHub Desktop.
Minimal Android Emulator Setup for Expo (Windows / No Android Studio)

Minimal Expo Emulator (No Android Studio)

The TL;DR: Expo Go pre-compiles native code. You don't need Android Studio, build-tools, or bloated playstore system images. This setup installs only the absolute minimum to run a lightweight emulator on Windows, saving gigabytes of disk space and RAM.

1. Auto-Install CLI Tools (Run in PowerShell)

This downloads the tools, extracts them to the required strict directory structure, and updates your system PATH automatically.

$Url = "https://dl.google.com/android/repository/commandlinetools-win-14742923_latest.zip"
$Zip = "$env:TEMP\cmdline-tools.zip"
$Dest = "$env:USERPROFILE\.bin\android-sdk\cmdline-tools\latest"

# Download and Extract
curl.exe -L -o $Zip $Url
New-Item -ItemType Directory -Force -Path $Dest | Out-Null
Expand-Archive -Path $Zip -DestinationPath "$env:TEMP\sdk" -Force
Move-Item -Path "$env:TEMP\sdk\cmdline-tools\*" -Destination $Dest -Force

# Set SDK environment variables
$SdkRoot = "$env:USERPROFILE\.bin\android-sdk"
[Environment]::SetEnvironmentVariable("ANDROID_HOME", $SdkRoot, "User")
[Environment]::SetEnvironmentVariable("ANDROID_SDK_ROOT", $SdkRoot, "User")
$env:ANDROID_HOME = $SdkRoot
$env:ANDROID_SDK_ROOT = $SdkRoot

# Update PATH
$Paths = "$Dest\bin;$env:USERPROFILE\.bin\android-sdk\platform-tools;$env:USERPROFILE\.bin\android-sdk\emulator"
$UserPath = [Environment]::GetEnvironmentVariable("Path", "User")
foreach ($p in $Paths.Split(';')) {
    if ($UserPath -notmatch [regex]::Escape($p)) { $UserPath += ";$p" }
}
[Environment]::SetEnvironmentVariable("Path", $UserPath, "User")
$env:Path = "$UserPath;" + [Environment]::GetEnvironmentVariable("Path", "Machine")

# Cleanup
Remove-Item -Path "$env:TEMP\sdk", $Zip -Recurse -Force

2. Install Essentials & Create AVD

Pull only the emulator, platform tools, and lean google_apis image.

sdkmanager "platform-tools" "emulator" "system-images;android-34;google_apis;x86_64"
echo no | avdmanager create avd -n LeanExpo -k "system-images;android-34;google_apis;x86_64"

3. Run Low-Resource Emulator

Launch the emulator with constraints so your code editor remains highly responsive.

# Flags explanation:
# -no-audio: disables audio subsystem overhead entirely
# -no-boot-anim: skips the boot animation for faster startup
# -cores 2: prevents the emulator from hogging the processor
# -memory 2048: enforces a strict 2GB RAM limit
emulator -avd LeanExpo -no-audio -no-boot-anim -cores 2 -memory 2048

(Once booted, run npx expo start in your project and press a)

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