The next step is to create a folder on your computer, and then download the Android source code to it. To do this, take note of the branch in the Build information and follow the steps below.
- security revision: Dec 2018
- build: OPM7.181205.001
- branch: android-8.1.0_r52
For more information, see Android Codenames, Tags, and Build Numbers.
- In a terminal window, enter the following commands:
repo init -u https://android.googlesource.com/platform/manifest -b <branch>
Note: The downloaded data is around 20 GB, and for a successful build you need 100 GB free hard disk space. Depending on your Internet connection, it can take quite a long time to download the source code. When the download has finished you have the basic AOSP source code on your computer.
- Clone the local_manifests from GitHub using the following commands:
git clone https://github.com/sonyxperiadev/local_manifests
git checkout <branch>
Note: These repos include a precompiled kernel. If you want to change or improve the kernel, you can recompile a new kernel. The new kernel binary should be placed in the corresponding device repository along with new kernel modules for wireless hardware. For more information, see the page how to rebuild kernels for Xperia devices.
- To download the code into the device repos created above, run the command:
- Cherry-pick the upstream patches