Setting Up Android Emulator

Setting Up Android Emulator

Installing Android Studio

Go to https://developer.android.com/studio and insttall Android Studio

Android Studio download page

Go through the installation wizard with the default options.

Once completed you should see a screen like this when you launch it:

Android Studio Welcome Window

Add platform tools to PATH

Make sure you have the directory C:\Users\<username>\AppData\Local\Android\Sdk\platform-tools

Open Environment Variables by searching it in the start menu.

Environment Variables search

Click on Environment Variables… button.

Environment Variables button

In the System variables section, find the variable named Path and double click it.

System variables Path

Click New and add the path to the platform-tools directory.

Adding new path

Click OK on all windows to save and exit.

Setting Up Android Emulator

Now we want to open the Virtual Device Manager. We do that by clicking the More Actions drop down menu and selecting Virtual Device Manager.

Virtual Device Manager option

Un-rooted Emulator

Once the Virtual Device Manager window opens up you should already have an emulator by default

Default emulator

You can launch this emulator and explore but this one will NOT have root privileges for ADB.

Un-rooted emulator{height=475px}

Rooted Emulator

Now close any emulator running and go back to the Device Manager window and click the + icon.

Create Virtual Device button

Once the list of devices shows up, you want to select Pixel 6 (or any device without the Google Play icon next to it).

Choosing device

Now enter the options as the following:

Rooted emulator options

Make sure to select the system image WITHOUT Google Play services. That is done by selecting Show All in the Services drop-down menu, and then selecting Intel x86_64 Atom System Image in the system image list. Also optionally change the devices name.

Click Finish and start up the emulator and you should have a device like this:

Rooted emulator{height=475px}

\newpage

Confirm root access

We can confirm root privileges over ADB by running:

adb root
adb shell

Confirming root shell over ADB