0. Prerequisites
To begin, there are some hardware requirements you need to meet for building android 13:
-
16GB of ram
-
250GB of disk space
A decent CPU and drive would help a lot as well!
Additionally, you need some linux distributtion running.
1. Initialize local copy of the source code
Create a new empty directory for the source code and change the working directory to it:
mkdir -p ~/tequila/tortilla
cd ~/tequila/tortilla
Then initialize source code:
repo init -u https://github.com/tequilaOS/platform_manifest -b tortilla
To initialize your repository as a shallow clone (only latest commit will be fetched instead of full repository commits history - more) to save more space, append the --depth=1
flag:
repo init -u https://github.com/tequilaOS/platform_manifest -b tortilla --depth=1
Next, sync:
repo sync -c --force-sync --optimized-fetch --no-tags --no-clone-bundle --prune -j$(nproc --all)
Syncing might take even hours, depending on your connection speed.
2. Trees
After you get tequilaOS source code you need to provide your own device trees. We recommend using LineageOS trees for the best compatibility.
Your target's device tree must be prepared for tequilaOS, though.
For the sake of this tutorial we are going to use codename of Xiaomi Mi 10 - umi
.
AndroidProducts.mk
Replace lineage_umi
with tequila_umi
:
PRODUCT_MAKEFILES := \
$(LOCAL_DIR)/tequila_umi.mk
COMMON_LUNCH_CHOICES := \
tequila_umi-eng \
tequila_umi-user \
tequila_umi-userdebug
tequila_umi.mk
Rename lineage_umi.mk
file to tequila_umi.mk
and modify it:
Instead of vendor/lineage/config/common_full_phone.mk
inherit vendor/tequila/config/common_full_phone.mk
.
Update PRODUCT_NAME
accordingly: lineage_umi
-> tequila_umi
BoardConfig.mk
If your device includes device_framework_matrix.xml
from vendor you must update it's path as well:
vendor/lineage/config/device_framework_matrix.xml
-> vendor/tequila/config/device_framework_matrix.xml
.
Parts
If you build parts in your device tree, you must update package name of our settings resources as well:
org.lineageos.settings.resources
-> com.tequila.settings.resources
That should be it
Your device tree should be now ready for building!
First, source the envsetup.sh
script:
source build/envsetup.sh
Have a lunch:
lunch tequila_umi-userdebug
Note: Userdebug is the buildtype that is commonly used for booting, yet not production ready builds. You may need to use another buildtype - more.
And finally build it!
mka bacon
Now, go for a shot of tequila (or maybe couple more) and enjoy your tequilaOS build after some time!