Let's build the phone emulator.
In this tutorial, we will cover how to build Aosp emulator for mobile devices.
I will introduce you to some of the lunch command options and then we will trigger the build for AOSP
for emulator.
So let's get started.
I'm going to the terminal window.
Okay.
So to start the build, we will need to run a couple of commands.
Now, in my route aosp 12 folder.
And from here you need to run the command to set up the environment.
So this is the command, basically.
So what we are doing here is we are following a shell script called E and we set up as such.
And this shell script will help to initialize some of the environment variables for us.
And this, after initializing the environment variables, will be able to run the aosp commands.
Just enter.
So now it is initialized.
Now the next step is to see what all lunch options we have.
So there is a lunch menu in Aosp which will show us what all build flavors we can build in the Aosp.
So if you type lunch, then you will get that list of lunch options.
So here are the lunch options.
So at the moment we have 71 flavors.
But here, just keep in mind that these lunch options are actually for different devices or for different
CPU architecture.
So if you take the first one, for example, the Aosp arm engineering or E and G, so this is the one
for the arm architecture.
So you'll build a speed for an ARM CPU architecture.
And this is again for ARM 64 bit architecture.
And you can see here there these are specific for the car or the automotive build, the Android automotive
build.
And you can see these are for CFC of stands for cuttlefish.
So these are specifically for cuttlefish.
And here you can see it is for the phone and TV.
And here this 64 shows that it's for the 64 bit.
So for now, just keep in mind that the launch options are the build flavors for different types of
devices or different types of CPU architecture.
So here we will focus on building the emulator for own devices.
So to build the emulator for phone devices, we have to use this command.
So I'm getting here so you could either select the number here or you could simply directly give it
like this.
So launch SDK phone x 8664 So this is iPhone X 86, 64 is the one which builds the emulator and then
it gives you an overview of what is going to be built.
You need to wait a couple of seconds.
It's taking more time.
So now this is a summary.
There are different properties like this here, so it's for now.
Just ignore them.
Just understand that these are actually the environment variables for the build.
Okay, so now let's start the build all together like you need to type m is for make and give the number
of CPU cores you have.
So in my case I have 16 logical cores, so I am using m j 16.
So now the build will start.
I think it will take at least 2 hours to complete the entire build depending upon your PC.
It will vary.
So now the build is successfully completed.
So let's open up the emulator and see whether it runs or not.
So you need to type emulator command.
And so here you go.
So we have the AOSP emulator now.
And yeah, so this is the basic one.
So you can go to settings and see version number and all.
Here you come down to build number is this one.
You are already a developer.
Android version.
You can see here, 12.
That's it.
So this is how you build the Mobile Aosp emulator.