Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Version History

Version 1 Current »

0 - Prerequisites

  • 16 GB of RAM memory

  • Available Disk storage > 10 GB

  • Android Studio installed

1 - Create the emulator

  • Open Android Studio

  • Click on More Actions

  • Select Virtual Device Manager

If you already have a project open on Android Studio, click on Tools > Device Manager.

image-20231220-160146.png
  • On the Device Manager window, click on “Create Device”

  • On the Virtual Device Configuration window, click on “New Hardware Profile”

  • Fill in the form with the properties of the device you want to create. In the example below, you can find the properties of the Samsung Galaxy S9. If you want to use an other device, see the next part “Emulators tested”.

Click on “Finish” then on “Next”.

  • Select a System Image, for example Android 10.0 (Google APIs). Click on “Next”.

  • Check the configuration and click on “Finish”. Be careful, the configuration might be different than the one you chose. Make sure to click on “Show Advanced Settings” and check each property.

  • Your device is now created. You can launch it by clicking on the triangle.

2 - Emulators tested

Device Name

Screen Size

(inches)

Resolution

RAM

System image

Version Chrome

Computer OS

Samsung Galaxy S9

5,8

1080 x 2220

4 GB

Android 10.0 Google APIs | x86

113

Linux

Samsung Galaxy Tab A7

10,4

2000 x 1200

3 GB

Android 10.0 Google APIs | x86

114

Linux

Samsung Galaxy Tab S7 FE

12,4

2560 x 1600

4 GB

Android 10.0 Google APIs | x86_64

114

Linux

Samsung Galaxy S10

6,1

1080 x 2280

8 GB

Android 11.0 Google APIs | x86

Google Pixel C

10,2

2560 x 1800

3 GB

Android 8.1 Google APIs | x86

  • If your computer is configured in English, you have to write the screen size with a dot (ex: 5.8).

  • Avoid using Android 13.0 system image. It takes for too many resources from your computer.

  • If you want to use a tablet emulator, you can uncheck the portrait mode to use only the landscape mode.

3- Add Google Play Store to a custom emulator

  • Open the configuration file of your emulator. Replace [device_id] by the id of your device.

    • On Linux and macOS: $HOME/.android/avd/[device_id]/config.ini

    • On Windows: C:\Users\[username]\.android\avd\[device_id]\config.ini

  • Make the following changes:

    • PlayStore.enabled: change from “false” to “true”

    • image.sysdir.1: change “google_apis” to “google_apis_playstore”

    • tag.display: change “Google APIs” to “Google Play”

    • tag.id: change “google_apis” to “google_apis_playstore”

  • Save your changes

  • On the Device Manager window, select the three dots button and click on “Wipe Data”. It will load the new configuration.

  • We expect the following error message:

In some old versions of Android Studio, you can have a direct download action instead of a warning missing system image. Please download. Then you do not need to do the following actions to download manually the system image.

  • Go back to the welcome window of Android Studio

  • Click on More Actions

  • Select SDK Manager

If you already have a project open on Android Studio, click on Tools > SDK Manager.

  • Click on the SDK Platforms tab

  • Check the Show Package Details box

  • Choose the system image that you want and download it. If you want the system image with Android 10 and Google Play Store, select Android 10.0 (Q) - Google Play Intel x86 Atom System Image.

  • On the Device Manager window, select the three dots button and click on “Wipe Data”. It will load the new configuration. Then, you can launch the device with Google Play Store.

4 - Update Google Play Store and Google Chrome

  • Start the emulator

  • In the settings android, please set the device language with English (United Kingdom) instead of English (United States)

  • Open Google Play Store

  • Sign in with your account

  • Click on your profile at the top right of the emulator screen

  • Click on Settings > About > Update Play Store

  • Wait for the update to complete. It takes several minutes.

  • If you want to test a website, search for the Google Chrome app and update it

5 - Start an emulator from the command line (optional)

  • On Linux: Update ~/.bashrc or ~/.zshrc

# For newer version of Android SDK
export PATH=$HOME/Android/Sdk/emulator:$PATH

# For older version of Android SDK
export PATH=$HOME/Android/Sdk/tools:$PATH
  • On macOS: Update ~/.bash_profile

export PATH=$HOME/Library/Android/Sdk/emulator:$PATH
  • On Windows:

    • Windows start menu > Settings > System > System Information > Advanced system settings

    • Add “C:\Users\[username]\AppData\Local\Android\Sdk\emulator” to your PATH environment variables

  • To see the list of emulators

emulator -list-avds
  • To start en emulator

emulator -avd [avd_name]

If an emulator crashes or is too slow, you can try one of the following commands:

emulator -avd [avd_name] -memory 8000

emulator -avd [avd_name] -gpu shiftshader_indirect

To get more logs, you can use the following command:

emulator -avd [avd_name] -logcat-output logcat.txt -debug all -verbose

  • No labels