In this video, we want to install our emulator and installation videos can be a little bit boring,
so I try my best to reward you afterwards with some nice features we've got in our emulator.
All right.
So therefore let's go back to Ubuntu VM and let's start installing our emulator.
But maybe before we do this, let's insert some, some nice music over here because the installation
video can be super boring.
So I try to make this as exciting as possible.
There we go.
Now we've got nice background music.
All right.
To install an emulator.
In my opinion, the easiest way is doing this via the Android studio.
So let's open up a terminal and let's go into this path.
If you want to start the Android studio, we have to type this whole path all the time in our terminal
and this is a little bit inconvenient.
So therefore let's create some shortcut for this that we can simply run it by a studio and then the
Android studio will be started.
How can we do this?
Well, we can create simply an alias for this whole command.
So the alias will replace this whole command, and this can be inserted in our settings.
H RC So we copy the whole path and then I'm opening the settings.
HRC and we create a new alias.
We name the studio, and then we provide this full path.
Every time we type no studio in our terminal, the whole command will be executed.
All right.
To leave them, all we need to do is hitting the colon w q and then we are out of this one.
All right.
If you would run this command afterwards, it wouldn't work.
So the command studio would be unknown because we need to update the status HRC first, we can open
a new one or we can simply use source and then providing this file name which will update our current
terminal with all these commands.
Afterwards, we simply start studio by typing in, studio in our terminal.
All right.
And here we can see studio's being opened and then we go into more actions and we select individual
device manager.
Oh, what's this?
Your CPU does not support require CBT or SVM.
All right.
This means virtualization needs to be enabled in our virtual machine.
As mentioned in the beginning, running in virtual machine within a virtual machine, it's not the best
performance we will have.
But regarding to the emulator, this will work.
So we also need to enable an hypervisor for our virtual machine over here.
How can we do this?
Unfortunately, we have to power it down, so we need to close everything over here.
And then we go into virtual machine settings and then we track this to the left.
And then within processor and memory, there is an advanced option over here, and we can enable hypervisor
applications in this virtual machine.
All right.
By having this checkbox enabled, we can run or we can virtualize another virtual machine in our virtual
machine exactly what we want to have, at least for this setup right now.
So after enabling it, we can start this once again.
The system will be put it up and there we have it.
Okay, now we look in and now we simply open a new terminal and run our command, our alias and studio.
There we have it.
And now the Android studio starts once again.
All right, then we go into more actions.
Virtual device manager and now the error message has been gone.
Perfect.
We can now create a new device.
And here we've got a huge list of possible devices.
If you scroll down a little bit, B, we've got devices like this pixel four over here and we can say
this one has a play store enabled.
Having a pixel four device as an emulator sounds absolutely amazing.
But keep in mind, the more powerful this devices, the more resources it rains.
And therefore I recommend a different device.
So the Nexus device, it's not that powerful, which is good regarding to the emulation and it also
has root access as default enabled.
So this is definitely our device we want to have.
So let's, let's search this.
We scroll down a little bit and here we have it.
The Nexus five device also has a play store enabled and comes with different resolutions.
So I take this one over here.
The the HD version.
This is perfectly fine.
Hello, guys.
It's me from the future.
So at this point, I realized I made a slightly little mistake.
Having an emulator image with the play store enabled automatically removes the root access.
So we only having root access on those devices which comes not shipped with the play store.
So my recommendation would be, instead of using this Nexus five image, please use the Nexus six image
because this device does not come with the play store and therefore has automatically root enabled in
case if you do not have a free device, I still recommend getting one emulator image that has the Google
play store enabled because yeah, the the other image, the Nexus six image does not have things like
the play store or an Chrome browser or things like this.
It's not required during this course.
But if you want to start your app in career.
Then you might want to have such a device.
All right.
To sum this up, during this course, the only device you need is the Nexus six image without the play
store.
So I will highlight it over here.
You can also get the device with the play store, but then you are not having root access in.
The Google play store itself will not be required during this course.
So you can perfectly move on with this next six device without the play store being enabled.
I will now move on with the installation process for the Nexus five device.
But I mean, this makes nothing difference regarding to the Nexus six.
Nevertheless, please choose Nexus six.
Also in the next video, when we talk about the emulator options, there's no difference or it's not
device specific, so we can simply move on over here.
Alrighty.
Okay.
So sorry for the confusion over here, but I guess it's not a big deal.
Let's simply move on with the installation part.
Alrighty, let's go.
And then we click next.
Here we have now this system image.
So the operating system we want to have on our device.
In my case, I'm choosing the app version 30, which is Android R, but you can also go for the app
version 32 because this course has been designed to work on the most up to date versions right now,
so therefore you shouldn't encounter any problems.
All right then the download is being started.
And what's this?
Low disk space?
All right.
I have forgotten to increase the size of our hard disk, so I guess we are running on 20 gigabyte right
now and Android Studio and all these emulators.
They require a lot of disk space.
So therefore, unfortunately, I have to resize this partition real quick, but that's not a big deal.
We simply click this away and unfortunately we have to cancel the current download.
Then let's close everything over here and we have to power down the virtual machine once again.
Then within virtual machine settings we now select hard disk and we increase this tool.
For example, 60 gigabyte OC resize successful.
That's good.
Now let's start the system once again.
The boot process is running right now.
All right, we log in one second and now we have to resize our partition because our partition is still
only 20 gigabyte large, but we've got now 40 more available to do this.
We simply go into the activities and then we are searching for disks and here we can see we've gotten
free space of 43 gigabytes, so our partition is still only 20 gigabyte.
But now by clicking on this one and then going on those settings and resize, we can now adjust those
40 gigabytes on top of our 20 gigabytes.
All right.
We have to insert our credentials.
And also for the second part over here, the settings resize and then let's pack everything on top of
it.
All right, now we've got 64 gigabyte partition.
Let's verify this opening.
A new terminal, this 3-h.
There we go.
We've got now 39 gigabytes of free disk space available.
All right.
That's all perfect.
So now we can move on with our installation.
And the good thing is it should immediately start where it did stop.
So let's open Android studio
once again into more actions and virtual device manager create new device.
And please keep in mind choosing the Nexus six, besides seeing me selecting Nexus five and then Android
R and we can see yes, it proceeds where it did stop.
I have tested it.
It did work for me.
So even if the download got cancelled, the system is running and booting.
Fine.
So let's wait until this download has been finished.
All right, we click on Finish and then next.
And here we've got now the Verify configuration.
So we've got our AVD name, the system we have installed and things like this.
I like to rename this quick to Nexus five only OC and then I hit the finish button.
Perfect.
Here we have it right now.
All we need to do is simply pressing this play button and then the emulator will launch.
Here we get this warning emulator is running using nested virtualization.
This is not recommended.
Yes, I agree with this one.
I also do not recommend it, but it works.
So I have tested it for this virtual machine and this emulator and we encounter a little bit of lag,
but it works perfectly fine.
If you want to have a really nice user experience, then install the lining system on your whole system
and then using this emulator directly on your host system, then you avoid this nested visualization.
All righty.
Perfect.
Okay, let's move on.
We simply click, okay.
And then we can close all these other windows and now we're starting the emulator.
The first time might take quite a while.
So grab a t, grab a coffee and yeah, sit back and relax a little bit because the first time the system
board.
It takes a few minutes, but afterwards it it's just a matter of seconds if you want to reboot it once
again.
And we can see the pixel is starting and we do not have to insert certain accounts or stuff like this.
The smartphone is now ready to use.
Nice.
All right.
And now we are done with the installation part.
In the next video, we will have to look into those features of this emulator, and we will also perform
a little bit more on setup.
So we will create shortcuts that we can easily run this emulator without running Android studio all
the time.
All right.
So I'm really looking forward to see you there.