In a shell prompt, first go to the directory where your files are (probably under 'bin' or 'mydroid') or you can also set the $PATH to have any of these folders in your path, then run:
$ make sdk
The above lines will compile the source and will generate an
sdkfolder under your root directory (most probably this root directory will be 'bin')
If your build fails due to a missing
run-java-toolthen run the following command to simple set your environment variable ANDROID_JAVA_HOME:
$ export ANDROID_JAVA_HOME=$JAVA_HOME
Then again start the build process with the
Now wait for a long time, as it is going to take long for it to compile the code.
on my machine, it took 5 hours.
When it finishes, you should be able to find one
sdkfolder under following directories:
in my case, the
[OS build]folder was
linux-x86, so just replace it with yours.
under normal circumstances, it should be yours too.
This folder will have the emulator which you can run.
This emulator can be found in:
~/bin/out/host/[OS build]/sdk/[sdk version dependant folder]/tools
linux-x86on my system
[sdk version dependant folder]was
To run the emulator that you have just built, you'll run the
emulatorcommand from a terminal, but before that, you must have an AVD to run the emulator.
So,to create an AVD, run the following commands under a terminal
$ cd /bin/out/host/[OS build]/sdk/[sdk version dependant folder]/tools
$ ./androidcreate avd -n [Your AVD's name] -t 1
[Your AVD's name]is whatever you want your AVD to be named like
As a result, you might get something like this-
Android AOSP (Preview) is a basic Android platform. Do you wish to create a custom hardware profile [no]no Created AVD '[Your AVD's name]' based on Android AOSP (Preview), with the following hardware config: hw.lcd.density=160
Now, to run the emulator with this AVD, run the following command:
~/bin/out/host/linux-x86/sdk/android-sdk_eng.root_linux-x86/tools$ ./emulator @[Your AVD's name]
You should get your Emulator running.
In the next post, I might show how to make changes in few things of the source, and how to build an emulator to see those changes.