To customize Android emulator, we need to create a new device based on Android emulator and make our customization on this new device. We will work on this from the original AOSP source code.
Creating a new x86emu device
Checking out from the AOSP
As I mentioned before, I try to avoid unnecessary changes to the AOSP source code as much as I can. In this chapter, in order to set up the build environment, you can check out the android-7.1.1_r4 version of the AOSP source code and clone the kernel and x86emu source to the AOSP source tree as follows:
$ mkdir android-x86emu
$ cd android-x86emu
$ repo init -u https://android.googlesource.com/platform/manifest -b android-7.1.1_r4
$ repo sync
$ git clone https://github.com/shugaoye/goldfish.git -b android-7.1.1_r4_x86emu_ch04_r1...