Upgrade Chrome Browser on Android Emulator
Overview
Android emulators come with an older version of Google Chrome browser pre-installed. For mobile web testing, you may need to install a newer version of Chrome to match your testing requirements or to access modern web features.
This guide covers two methods to upgrade Chrome browser on your Android emulator:
- Using Google Play Store - Easiest method, but requires a system image with Play Store support
- Using APK Mirror - More flexible, allows installing specific Chrome versions
Prerequisites
- Android SDK and AVD Manager installed
ANDROID_HOMEenvironment variable set
If your system does not meet the above prerequisites, run the below command to setup android emulator.
npx @nightwatch/mobile-helper androidMethod 1: Upgrade Chrome via Google Play Store
This is the simplest method, but it requires an Android Virtual Device (AVD) that includes Google Play Store support.
Step 1: Install System Image with Play Store
You need to install a system image that includes Google Play Store. These system images are typically named google_apis_playstore.
npx @nightwatch/mobile-helper android install --system-imageWhen prompted:
- Select the API level: Choose your desired Android version (e.g.,
android-34: Android 14) - Select the system image type: Choose
google_apis_playstore(notgoogle_apis) - Select the architecture: Choose based on your system (e.g.,
x86_64orarm64-v8a)
Example output:
Checking the value of ANDROID_HOME environment variable...
✔ ANDROID_HOME is set to '/Users/shubhamkumar/Library/Android/sdk' (taken from .env)
? Select the API level for system image: android-34: Android 14
? Select the system image type for android-34: google_apis_playstore
? Select the architecture for the system image: x86_64
Installing system image: system-images;android-34;google_apis_playstore;x86_64
[=======================================] 100% Unzipping... x86_64/vendor.img
Step 2: Create AVD with Play Store System Image
Create a new AVD using the system image you just installed:
npx @nightwatch/mobile-helper android install --avdWhen prompted:
- Enter a name for the AVD: Give it a descriptive name (e.g.,
nightwatch-android-14) - Select the system image to use for AVD: Choose the
google_apis_playstoresystem image you installed - Select the device type: Choose a device (e.g.,
Pixel) - Select the device profile: Choose a profile (e.g.,
pixel_7)
Example output:
Checking the value of ANDROID_HOME environment variable...
✔ ANDROID_HOME is set to '/Users/shubhamkumar/Library/Android/sdk' (taken from .env)
? Enter a name for the AVD: nightwatch-android-14
? Select the system image to use for AVD: system-images;android-34;google_apis_playstore;x86_64
? Select the device type for AVD: Pixel
? Select the device profile for AVD: pixel_7
Creating AVD...
Step 3: Connect to Emulator and Update Chrome
- Connect to your emulator using the mobile helper:TerminalWhen prompted, select the AVD you created (e.g., `nightwatch-android-14`). Example output:
npx @nightwatch/mobile-helper android connect --emulatorChecking the value of ANDROID_HOME environment variable... ✔ ANDROID_HOME is set to '/Users/shubhamkumar/Library/Android/sdk' (taken from .env) Connected Emulators: 1. udid/deviceId: emulator-5554 / state: device (online) ? Select the AVD to connect: nightwatch-android-14 Connecting to AVD: nightwatch-android-14 - Sign in to Google Play Store with your Google account
- Open the Play Store app on the emulator
- Search for "Google Chrome"
- Click Update to install the latest version of Chrome
Method 2: Upgrade Chrome via APK Mirror
This method allows you to install a specific version of Chrome without requiring Play Store support. It's useful when you need a particular Chrome version or when using system images without Play Store.
Step 1: Download Chrome APK from APK Mirror
- Visit APKMirror
- Select the desired Chrome version
- Important: Download the compatible variant based on your system image architecture:
- For
x86_64system images: Downloadx86_64variant - For
arm64-v8asystem images: Downloadarm64-v8avariant - For
armeabi-v7asystem images: Downloadarmeabi-v7avariant
- For
APKMirror typically provides .apkm files (Android App Bundle) which need to be extracted before installation.
Step 2: Extract the APKM File
Extract the downloaded .apkm file to get the individual APK files:
unzip /path/to/com.android.chrome_VERSION_apkmirror.com.apkm -d chrome_bundleThis will extract all APK files into the chrome_bundle directory.
Example:
unzip ~/Downloads/com.android.chrome_144.0.7559.109-755910933_26lang_5feat_9f83e13585051a7774655d06b7189713_apkmirror.com.apkm -d chrome_bundle
Step 3: Upgrade Chrome APK on Emulator
Use the mobile helper to install the extracted APK files:
npx @nightwatch/mobile-helper android.adb install-multiple chrome_bundle/*.apkMake sure your emulator is running before executing this command.
Example output:
Checking the value of ANDROID_HOME environment variable...
✔ ANDROID_HOME is set to '/Users/shubhamkumar/Library/Android/sdk' (taken from .env)
Success
Verify Chrome Installation
After installation, verify that Chrome is installed correctly:
- Open the emulator
- Look for the Chrome app icon in the app drawer
- Launch Chrome and check the version:
- Open Chrome menu (three dots)
- Go to Settings → About Chrome
- Verify the version matches what you installed
Troubleshooting
Issue: Play Store not available
Solution: Use Method 2 (APK Mirror) instead, which doesn't require Play Store support.
Issue: APK installation fails with "INSTALL_FAILED_INVALID_APK"
Possible causes:
- Architecture mismatch between APK and system image
- Corrupted APK file
- Incomplete extraction of APKM bundle
Solution:
- Verify you downloaded the correct architecture variant
- Re-download the APK file
- Ensure all APK files from the bundle are extracted
Issue: Chrome crashes after installation
Possible causes:
- Version incompatibility with Android version
- Missing dependencies
Solution:
- Try a different Chrome version
- Ensure you're using a compatible Android API level
- Check if the system image has all required components
Issue: Cannot find Chrome after installation
Solution:
- Restart the emulator
- Check if Chrome appears in Settings → Apps
- Try installing again with
--forceflag if available
Issue: No ChromeDriver found for Chrome version
Error message: No Chromedriver found that can automate Chrome 'X.X.X'. You could also try to enable automated chromedrivers download as a possible workaround.
Possible causes:
- The installed Chrome version is not in Appium's ChromeDriver mappings
- Appium cannot automatically download the matching ChromeDriver version
Solution: You have two options:
Option 1: Download ChromeDriver manually
- Check your Chrome version on the emulator (Settings → About Chrome)
- Visit the Appium ChromeDriver mappings to find the corresponding ChromeDriver version
- Download the ChromeDriver binary for your system from the ChromeDriver downloads page
- Set the path to ChromeDriver in your Nightwatch configuration using the
appium:chromedriverExecutablecapability:
Alternatively, you can set it directly in desiredCapabilities:
Option 2: Update Chrome to latest version
Update Chrome on your emulator to the latest version, which typically has better Appium support and automatic ChromeDriver download capabilities.
Best Practices
- Match Architecture: Always ensure the Chrome APK architecture matches your system image architecture
- Version Compatibility: Use Chrome versions that are compatible with your Android API level
- ChromeDriver Compatibility: Consider using the latest Chrome version for better Appium/ChromeDriver support. Older or specific Chrome versions may require manual ChromeDriver installation
- Test After Installation: Always verify Chrome works correctly and that ChromeDriver is available before running your Nightwatch tests
Next Steps
After upgrading Chrome on your emulator, you can now configure Nightwatch to use the emulator for mobile web testing.
For more information on mobile web testing with Nightwatch, see the Mobile Web Testing Guide.