So now we're going to configure the AVD which is the android virtual device. 1
So to do this we're going to click on configure and run AVD Manager 2
OK from AVD MANAGER We're going to create a new virtual device first we're going to select 3
the template or the hardware profile so this will configure device specific configurations. 4
For example the width and the height, the resolutio,n aspect ratio and all the stuff specific to different 5
devices. 6
This is important for Android developers when they want to test their UI on different devices, in this 7
case, 8
let's just choose pixel X which is the default one here it will show you what system images are available 9
these will depend on what SDK versions you've downloaded. 10
So for example we have version twenty nine. 11
And earlier we installed version 16. 12
So you see that these are available the ones that are not available. 13
You will see a download link next to them, we can just click on download and obviously it will take some 14
time to download but then you'll have the emulator available to experiment with. 15
Let's create an old emulator, let's create one of version 16. 16
One thing I like to do is remove the spaces in the AVD name. 17
We do this to ensure that there are no errors caused by spaces when we use a script against a specific 18
emulator. 19
It's not a requirement but just to be safe then you can click on advanced options. 20
And here you can choose different properties. 21
So for example you can increase the ram, one important thing is that you can configured the emulator 22
performance by choosing hardware or software acceleration. if you choose hardware, 23
It would be much better. 24
It's much faster but you'll come across many instances where you cannot run hardware acceleration, for 25
example when running inside a virtual machine. 26
So in that case you have to do it with software. 27
If you run inside a VM, 28
this means that you're running an emulated system inside a virtual system. 29
This could cause several underlying issues. 30
And many tools will not work because of this, if this is your situation for certain things we recommend 31
running on your physical machine when you choose automatic. 32
It goes from hardware and then try software. 33
If you encounter issues when running your emulator, for example you're prompted a black screen, 34
go ahead and play around with these values and it will probably fix the issue. 35
So just click finish and you'll have your emulator if you want to increase your memory. 36
Just increase memory similarly you can increase your storage. 37
It's up to you but the default should run unless you're running inside a virtual machine in which case 38
you may encounter some issues. 39
Give us some time to create and then you have the list of AVD's available. 40
Find the AVD you created. 41
If you already created an AVD you'll have the complete list here just click on the play button. 42
OK this will launcher emulator let's give it time to load. 43
Now this is a useful utility. 44
Here you have some extra tools that you can play around with. 45
So for example say you want to emulate sending or receiving an SMS. 46
You can do that using this utility over here. 47
Just click on the three dots on the side and then for example you can play with the accelerometer sensors. 48
You can also play with the battery levels. 49
Keep in mind that the emulators are mainly targeted towards Android app developers not reverse engineers. 50
So these tools are extremely useful for developers but as a reverse engineer you might encounter instances 51
where you would need these tools, say for example you find malware and you think that it only works in 52
a specific location. 53
Then you can play around with the location data in your app and simulate your device being in that location. 54
This is not uncommon. 55
Imagine the malware is targeting a specific country then it is able to get the G.P.S. location and only 56
perform malicious actions when it is in that country. 57
In the case of dynamic analysis it is very important to be able to expose these actions in a more advanced 58
course that we're preparing, 59
we'll have a look at this kind of malware that implements this kind of anti analysis technique and we'll 60
show you how it is possible to overcome these issues. 61
OK. 62
Back to the emulator. 63
Now we always need to keep in mind that this is an emulated device you might encounter some crashes 64
or errors. Perfect system emulation is not easy so you cannot expect the emulator to work 100 percent 65
like a normal device but overall it's very good for testing and in our case it's very good for malware 66
analysis. 67
For example it is way better to test malware like ransomware on your emulator than on your personal 68
device.