Illustration 1 for install and root your android emulator

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.

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

Illustration 2 for install and root your android emulatorFigure 1: Android-Studio AVD manager

Illustration 3 for install and root your android emulatorFigure 2: Finish the Android system image process

2. Let’s turn on and root the emulator

Illustration 4 for install and root your android emulatorFigure 3: Starting the Android emulator

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

$ 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. ✍️?

Leave a Reply