After repo initialization and before repo sync you have to add a file for syncing device tree and kernel source (for TWRP). In case of ROM you have to add vendor tree also.
A. Instructions (after repo init):
-
cd <source_dir>
Here source directory means location of TWRP/ROM source code -
cd .repo/
-
mkdir local_manifests;
-
cd local_manifests;
-
nano roomservice.xml
Now a file has been created and you have include various trees for building.
roomservice.xml will be like this.
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="buddi56/android_device_realme_RMX1831" path="device/realme/RMX1831" remote="github" revision="master" />
###<project name="buddi56/android_device_realme_RMX1831" path="kernel/realme/RMX1831" remote="github" revision="master" />###
</manifest>
Kernel source is available but it has lot of issues, so used prebuilt kernel.
Note: Using prebuilt kernels in building is deprecated.
Now perform
repo sync -j(nproc --all) -c
All the sources along with your TWRP device tree and kernel (if available) will be downloaded.
B. Instructions (After repo sync):
After repo sync you have to tell buildbot to include your device for building TWRP. So for this you can either make a vendorsetup.sh file in your device tree or can edit an available file in TWRP source.
To edit vendorsetup.sh file in the downloaded source. Head to the below location.
-
cd <source_dir>/vendor/omni/
-
nano vendorsetup.sh
Now add below line at the end.
add_lunch_combo omni_RMX1831-eng
- Save file and exit.
You can also choose user or userdbug. But eng build is best for a custom recovery.
Now start the compilation (Build) using the command given in README.md