But some information are missing in the instructions (at least I did not found them ...)
Therefor I document here what I did to compile the OmniROM for the ASUS Zenfone 8 on my Linux notebook:
First install the neccessary tool called "repo" to maintain the repositories for the OmniROM ; see here https://gerrit.googlesource.com/git-repo/
Next create a new directory on your PC; switch to that directory, and initialize the necessarry repositories like described in the section "Getting Started" here: https://github.com/omnirom/android :
The repositories for the branch android-12.0 are somehow outdated with the security patch level from February 2022 . To get the code with the security patch level from June 2022 use the repositories for the branch android-12.1.
repo init -u https://github.com/omnirom/android.git -b android-12.1
# Then to sync up:
repo sync
Be aware that the repositories need about 140 GB disk space so this will take a while.
Please note that I did not install any additional tool to compile the OmniROM - everything neccessary was installed by synching the repositories.
When the download is finished you must add the repositories for the vendor and device tree for your phone to the manifests in the local repositories. This should be done in the file .repo/local_manifests/local_manifest.xml . For the ASUS Zenfone 8 the file should look like this:
[xtrnaw7@t15g /data/develop/android/OmniROM]$ cat .repo/local_manifests/local_manifest.xml
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<remote name="DonkeyCoyote"
fetch="https://github.com/DonkeyCoyote" />
<project path="device/asus/zenfone8" name="android_device_asus_zenfone8" remote="omnirom" revision="android-12.0" />
<project path="vendor/asus" name="proprietary_vendor_asus" remote="DonkeyCoyote" revision="android-12.1" />
</manifest>
After updating the file local_manifest.xml do another
repo sync
to sync the added repositories. This time the download will be faster because only the two additional repos will be downloaded.
Now you can start the build with these commands:
. build/envsetup.sh
brunch omni_zenfone8-user
in the directory with the downloaded repositories (use the command "breakfast" instead of "brunch" to see other possible targets)
Note that the first time the compile process will take 4 hours or more. And keep in mind that the compile process will need additional 140 GB for the temporary output files.
If everything is fine there will be a ZIP file with your own CustomROM image in the directory ./out/target/product/zenfone8/ when the compile script is done, e.g:
[xtrnaw7@t15g /data/develop/android/OmniROM]$ ls -ltr out/target/product/zenfone8/omni-12-20220621-zenfone8-HOMEMADE.zip
-rw-rw-r--. 25 xtrnaw7 xtrnaw7 1253703465 Jun 25 10:03 out/target/product/zenfone8/omni-12-20220621-zenfone8-HOMEMADE.zip
[xtrnaw7@t15g /data/develop/android/OmniROM]$
That image can now be installed on the Zenfone 8 using the LineageOS Recovery or TWRP.
Update 29.09.2022 /bs
There seems to be a bug or feature in the scripts to compile OmniROM:
Old versions of the ZIP file with the image in the output directory will always be overwritten or replaced with the current image, e.g.:
[ OmniRomDev - xtrnaw7@t15g /data/develop/android/test ] $ ls -l /data/develop/android/OmniROM/out/target/product/zenfone8/omni-12-20220*zip
-rw-rw-r--. 20 xtrnaw7 xtrnaw7 1256445293 Sep 27 18:12 /data/develop/android/OmniROM/out/target/product/zenfone8/omni-12-20220728-zenfone8-MICROG.zip
-rw-rw-r--. 20 xtrnaw7 xtrnaw7 1256445293 Sep 27 18:12 /data/develop/android/OmniROM/out/target/product/zenfone8/omni-12-20220729-zenfone8-MICROG.zip
-rw-rw-r--. 20 xtrnaw7 xtrnaw7 1256445293 Sep 27 18:12 /data/develop/android/OmniROM/out/target/product/zenfone8/omni-12-20220804-zenfone8-MICROG.zip
-rw-rw-r--. 20 xtrnaw7 xtrnaw7 1256445293 Sep 27 18:12 /data/develop/android/OmniROM/out/target/product/zenfone8/omni-12-20220809-zenfone8-HOMEMADE.zip
-rw-rw-r--. 20 xtrnaw7 xtrnaw7 1256445293 Sep 27 18:12 /data/develop/android/OmniROM/out/target/product/zenfone8/omni-12-20220810-zenfone8-MICROG.zip
-rw-rw-r--. 20 xtrnaw7 xtrnaw7 1256445293 Sep 27 18:12 /data/develop/android/OmniROM/out/target/product/zenfone8/omni-12-20220820-zenfone8-MICROG.zip
-rw-rw-r--. 20 xtrnaw7 xtrnaw7 1256445293 Sep 27 18:12 /data/develop/android/OmniROM/out/target/product/zenfone8/omni-12-20220828-zenfone8-MICROG.zip
-rw-rw-r--. 20 xtrnaw7 xtrnaw7 1256445293 Sep 27 18:12 /data/develop/android/OmniROM/out/target/product/zenfone8/omni-12-20220904-zenfone8-MICROG.zip
-rw-rw-r--. 20 xtrnaw7 xtrnaw7 1256445293 Sep 27 18:12 /data/develop/android/OmniROM/out/target/product/zenfone8/omni-12-20220911-zenfone8-MICROG.zip
-rw-rw-r--. 20 xtrnaw7 xtrnaw7 1256445293 Sep 27 18:12 /data/develop/android/OmniROM/out/target/product/zenfone8/omni-12-20220918-zenfone8-MICROG.zip
-rw-rw-r--. 20 xtrnaw7 xtrnaw7 1256445293 Sep 27 18:12 /data/develop/android/OmniROM/out/target/product/zenfone8/omni-12-20220927-zenfone8-MICROG.zip
[ OmniRomDev - xtrnaw7@t15g /data/develop/android/test ] $
[ OmniRomDev - xtrnaw7@t15g /data/develop/android/test ] $ cksum /data/develop/android/OmniROM/out/target/product/zenfone8/omni-12-20220*zip
592627598 1256445293 /data/develop/android/OmniROM/out/target/product/zenfone8/omni-12-20220728-zenfone8-MICROG.zip
592627598 1256445293 /data/develop/android/OmniROM/out/target/product/zenfone8/omni-12-20220729-zenfone8-MICROG.zip
592627598 1256445293 /data/develop/android/OmniROM/out/target/product/zenfone8/omni-12-20220804-zenfone8-MICROG.zip
592627598 1256445293 /data/develop/android/OmniROM/out/target/product/zenfone8/omni-12-20220809-zenfone8-HOMEMADE.zip
592627598 1256445293 /data/develop/android/OmniROM/out/target/product/zenfone8/omni-12-20220810-zenfone8-MICROG.zip
592627598 1256445293 /data/develop/android/OmniROM/out/target/product/zenfone8/omni-12-20220820-zenfone8-MICROG.zip
592627598 1256445293 /data/develop/android/OmniROM/out/target/product/zenfone8/omni-12-20220828-zenfone8-MICROG.zip
592627598 1256445293 /data/develop/android/OmniROM/out/target/product/zenfone8/omni-12-20220904-zenfone8-MICROG.zip
592627598 1256445293 /data/develop/android/OmniROM/out/target/product/zenfone8/omni-12-20220911-zenfone8-MICROG.zip
592627598 1256445293 /data/develop/android/OmniROM/out/target/product/zenfone8/omni-12-20220918-zenfone8-MICROG.zip
592627598 1256445293 /data/develop/android/OmniROM/out/target/product/zenfone8/omni-12-20220927-zenfone8-MICROG.zip
[ OmniRomDev - xtrnaw7@t15g /data/develop/android/test ]
Update 08.02.2024
see Some hints for repo sync troubleshooting for how to fix common errors executing repo sync.
see Some hints for fixing errros building an Custom ROM Android image for how to fix some common errors while creating the image