Android Emulator Update

Mobile applications became an essential part of our lives, somehow we are dependent of them. We are using a lot of mobile applications every day. If you are lost in a new city, Google Maps gets you out of this situation. or if we want to make an appointment to the hairstylist, mobile applications assist us in our daily tasks.
It comes natural to us to use applications for everything that we need so it’s good to know that some applications might have security issues, and even know how to test their security.
Therefore, what if you want to learn how to do a mobile penetration test? Where would you begin? I recommend you to start from this article.
I will get you through the two big steps in order to install and root an Android emulator on your computer, which is the basis of an Android pentest.

  1. Android Emulator Updates
  2. Ld Player
  3. Android Emulator Update Windows 10
  4. Android Emulator For Windows 10
  5. Android Emulator Update Download

It seems the emulator (originally distributed as part of the Android SDK Tools) is no longer updated since version 25.2.3 Thus the workaround involves a ' manual/forced upgrade ' of emulator tools. Currently I successfully upgraded to version 27.3.8 (and running Android 9 smoothly). Your emulator is out of date, please update by launching Android Studio. According to the steps, it seems that one could update the emulator even without Android Studio just by using the Android SDK Manager. But there is no SDK Tools tab. Is the SDK Manager which is launched as a standalone application different from the SDK Manager available.

Ok, enough talking, let’s jump to the interesting part. 💪

What would you need?

A rooted Android phone. What if you don’t have an Android Phone?! You should not worry about that, you can use an emulator of an Android device – which can be installed on your personal computer. An emulator is hardware or software that allows your computer (called the host) to behave like another system (called the guest). Emulation refers to the ability of a computer program in an electronic device to emulate another device. The emulator setup was tested using Ubuntu 18.10 – as the host and Android 7.1.1 – as the guest.

What steps should you follow in order to have your Android emulator?

1.Download the Android system image. You can do that by using Android-Studio.
Download and install Android Studio from here:
https://developer.android.com/studio/install

  • Open Android-Studio , and select the AVD manager from the Tools tab.
  • In the newly tab that have been open hit the “ Create Virtual Device ” button.
  • Chose a device definition, (I have chosen Nexus 5X), and hit the “Next” button.
  • Under the “x86 tab” , Select Android 7.1.1 ( Google APIs ) and hit “Download” button.
  • After the download is finished, you can press the “ Next ” button.
  • In the new tab opened, you can choose a name for your virtual device under the AVD Name field, all the other settings can be left as default. After that, you can hit the “ Finish” button.
  • You might want to close Android Studio now, as the system image was already created.

2. Let’s turn on and root the emulator

  • Open the Ubuntu terminal and type the following command:
    $SDK_PATH/emulator/emulator -avd Your-emulator-name -writable-system -selinux disabled -qemu -enable-kvm
  • The bold values should be changed according to your system. By default, after the installation of Android-Studio, the SDK_PATH is located in your home folder.
    On my system, the following command is working:
    $~/Android/Sdk/emulator/emulator -avd My-first-emulator -writable-system -selinux disabled -qemu -enable-kvm
  • After the booting process is completed, on your desktop should be as in figure 3.
  • Now, you have to open a new tab in the Ubuntu terminal and install adb.You can do that by typing the following command: $ apt install adb
    Adb – Android Debug Bridge (adb) is a versatile command-line tool that lets you communicate with a device. The adb command facilitates a variety of device actions, such as installing and debugging apps, and it provides access to a Unix shell that you can use to run a variety of commands on a device. [2]
  • After the installation of adb is completed, you can type the following command :
    $ adb root && adb remount

    The previous command will Restart adbd as root and remount system as writable. Make sure you restart the adbd while the emulator is running.
  • The next step is to install the Superuser.apk application to our emulator.
    SuperSU allows for advanced management of Superuser access rights for all the apps on your device that need root. SuperSU has been built from the ground up to counter a number of problems with other Superuser access management tools[3]. In order to do that you have to type the following commands in the Ubuntu terminal:

$ git clone https://github.com/0xFireball/root_avd
$ cd root_avd/
$ adb install SuperSU/common/Superuser.apk

Download
  • At this stage, you should have the application SuperSU installed to the emulator. Next, you have to type the following commands in Ubuntu terminal:
    $ adb push SuperSU/$ARCH/su /system/xbin/su

    Instead of the bolded text $ARCH, you should type the architecture of your downloaded system image. In my case, the architecture is x86, so the following command will work for me, and should work for you too – if you downloaded the same system image as I did – $ adb push SuperSU/x86/su /system/xbin/su
    In order to finish the rooting process you have to enter some more commands in terminal.
    $ adb shell chmod 0755 /system/xbin/su – This command will update permissions of the file that have been pushed in the previous step.
    $ adb shell setenforce0 This command will Set SELinux to Permissive mode.
    $ adb shell su– install This command will Install SuperSU’s su to system.
    $ adb shell su – daemon& This command will Run SuperSU’s su as daemon.
    Finally, you can now open the superSU application on the emulator. The application will display the following message: The SU binary needs to be updated. Continue? Hit “ Continue” and use normal installation.
    An error message is possible to de displayed : Installation failed ! Please reboot and try again. Don’t worry about it, hit the “OK” button and you will have a rooted Android emulator.
    At this stage, your emulator should be rooted, but I recommend you to type the following commands in your terminal, otherwise, Superuser may not always persist after reboot:

$ adb shell – This command will open a root shell from your emulator.

$ su –daemon& – This command will Run SuperSU’s su as daemon.
That’s it.

Your emulator should be rooted now, even if you reboot it. Next time you want to open your emulator, just type the command:

$~/Android/Sdk/emulator/emulator -avd My-first-emulator -writable-system -selinux disabled -qemu -enable-kvm

If you got here, well done!

You have just installed and rooted an Android emulator, on your personal computer. This is the first step in order to do mobile penetration testing, without having a physical Android device.

Write to us, in the comment section below, if the process went well for you or you have encounter any sort of problems. ✍️👇

This page is deprecated. Redirecting to https://developer.android.com/studio/run/emulator.html









The Android Studio 2.0 (or higher) preview includes the new Android Emulator 2.0 with improved performance and a new user interface to control device features. This page describes some of the changes compared to the emulator available with the stable version of Android Studio 1.5 and how to setup your development environment to use the Android Emulator.


For best performance with Android Emulator 2.0, your system should meet the following specifications:

  • Windows: Intel® processor with support for Intel® VT-x, Intel® EM64T (Intel® 64), and Execute Disable (XD) Bit functionality. AMD and Intel Atom processors do not support VT-x virtual machine acceleration.

  • Linux: Intel® processor with support for Intel® VT-x, Intel® EM64T (Intel® 64), and Execute Disable (XD) Bit functionality or AMD processors with support for AMD Virtualization™ (AMD-V™)

  • 64-bit Operating Systems.


New Features

The most valuable updates to the Android Emulator are the speed improvements. When running with Android Studio 2.0 or higher on an x86 machine, response time is faster than the previous Android Emulator and you can transfer files from your machine faster than a physical Android device.


The latest Android Emulator supports new multi-finger touch inputs, including pinch zoom and two finger rotate gestures. Holding down Alt or Option reveals two finger points. Moving the mouse moves one finger and the second finger is mirrored across an anchor point. Clicking the left mouse button enables pinch-zoom gestures and clicking the right mouse button enables two-finger rotate gestures (such as to tilt the perspective when viewing a map).


The panel on the right side of the emulator lets you perform common tasks, such as rotate the screen, capture screenshots, and zoom in on the display.


To install apps, you can drag and drop an APK right on the emulator. You can also drag and drop other file types and they'll be saved to the /sdcard/Download/ directory.


At the bottom of the toolbar on the right is an ellipsis button that opens the Extended Controls window. In here you'll find various controls that invoke device events and mock device sensors.

Keyboard shortcuts are available for most actions and are listed in the Help panel, listed on the left.


Get Android Emulator 2.0

The new Android Emulator is available with Android Studio 2.0 or higher, which is available in both the Stable, Beta and Canary channels.


Once you make sure you have the appropriate emulator system image and other tools:

  1. Open the SDK Manager from Android Studio.

  2. Click the SDK Platforms tab, and select the check box for a recent version such as the Android 6.0 (Marshmallow). By default, this includes the x86 system image that you need for the emulator. You can see and modify the files to download by clicking Show Package Details at the bottom-right.

  3. Click the SDK Tools tab, then select the check boxes for the following:

    1. Android SDK Tools (25.0.0 or higher to get the new emulator)

    2. Android SDK Platform-Tools (23.1.0 or higher to get the fast ADB)

    3. Intel x86 Emulator Accelerator (HAXM installer) (rev 6.0.1 or higher to get CPU acceleration)

  4. Click OK to check for updates.


Create new Android Virtual Device (AVD)

To take advantage of the new Android Emulator and adb speeds, you need to create new AVDs. In this example below, we are creating a Nexus 5x AVD.


  1. Open the AVD Manager from Android Studio.

  2. Click Create Virtual Device.

  3. Select the defaults for Nexus 5x.

  4. Select a system image, such as Marshmallow - API 23 - x86.

  5. Select Show Advanced Settings.

  6. Select the Multi-Core CPU check box. The number of cores available depends on the number of cores available on your development machine.

  7. Run your new Android Virtual Device by click on the green Play button.

You should see the Android Emulator now start up.


Troubleshooting


Check Intel x86 Emulator Accelerator Installation

If you selected the defaults during the Android Studio installation you should be ready to go. If you created a custom Android Studio installation or run into issues, read the troubleshooting guide below. If your Intel x86 Emulator Accelerator is out of date, Android Studio will automatically inform you and suggest a quick fix to update, as shown in the following screenshot in the AVD Manager.

Installing CPU Accelerator (HAXM)

If you skipped the initial setup of Android Studio, you should make sure the CPU acceleration is installed.


You can manually install Intel x86 Emulator Accelerator by opening intelhaxm-android.exe (on Windows) or intelHAXM_6.0.1.dmg (on Mac) from /sdk/extras/intel/Hardware_Accelerated_Execution_Mangager, as shown below:


Android Emulator Updates


Installing HAXM in Windows

Installing HAXM in OS X


Android

For Linux, the Android emulator usesKernel-based Virtual Machine (KVM). If you are using Ubuntu, you can run check your KVM system compatibility by running the following on the command line:

$egrep –c '(vmx|svm)' /proc/cpuinfo

Ld Player

on the command line to check for for a return value of greater than 1

Android Emulator Update Windows 10


To check if you have KVM installed by running the following on the command line:

$kvm-ok


If KVM is missing or to ensure you have the latest KVM installed, run the following on the command line:

$sudo apt-get install qemu-kvm libvirt-bin ubuntu-vm-builder bridge-utils ia32-libs-multiarch


The linux commands look like the following on Ubuntu:


Known Issues

  • Emulating inbound phone call freezes emulator.

  • Screenshot feature crashes emulator in certain conditions.

  • If an AVD has been opened in a previous version of the emulator, it may not boot in the new emulator, therefore create a new AVD.

  • OSX - screen doesn't go black when you sleep the device.

  • Linux - segfault on exit in some conditions.

  • '-gpu mesa' option not supported.

  • '-net*' option not supported.

  • '-no-window' option not supported.

  • Remote desktop not supported.

  • Emulated hardware 'recents' key doesn't work in older system images.

  • Multiple DNS servers not supported.


Android Emulator For Windows 10

If you find other issues in the Android Emulator, pleasefile a bug report.

We have more features in the pipeline, but if you may also submit feature requests.

Android Emulator Update Download


Comments are closed.