You'll need to get familiar with Git and Repo as well as How to build a GSI.
Firstly we need to clone the base repo (this one) which we can do by runnng the following:
git clone --depth=1 https://github.com/cawilliamson/treble_voltage.git
cd treble_voltage/
Now we want to fetch the VoltageOS manifest files:
mkdir -p src/
cd src/
repo init -u https://github.com/VoltageOS/manifest.git -b 14 --depth=1 --git-lfs
Copy our own manifest which is needed for the GSI portion of the build:
mkdir -p .repo/local_manifests
cp -v ../configs/*.xml .repo/local_manifests/
Sync ALL necessary sources to build the ROM:
repo sync -c -j$(nproc --all) --force-sync --no-clone-bundle --no-tags
Copy the patches folder to the ROM folder and copy the apply-patches.sh to the rom folder. and run this in the ROM folder:
../patches/apply.sh . trebledroid
../patches/apply.sh . personal
In order to build our patched TrebleApp you need to run the following:
. build/envsetup.sh
pushd treble_app/
bash build.sh release
cp -v TrebleApp.apk ../vendor/hardware_overlay/TrebleApp/app.apk
popd
In order to generate the base ROM config run the following commands:
pushd device/phh/treble
cp -v ../../../configs/voltage.mk .
bash generate.sh voltage
popd
In the ROM folder, run this for building an arm64 standard build (needed even if you want a vndklite build):
. build/envsetup.sh
lunch treble_arm64_bvN-ap1a-userdebug
make systemimage -j$(nproc --all)
Run the following commands if you require a vndklite build:
pushd treble_adapter/
cp -v ../out/target/product/tdgsi_arm64_ab/system.img standard_system_arm64.img
sudo bash-adapter.sh 64 standard_system_arm64.img
sudo mv s.img s_arm64.img
sudo chown $(whoami):$(id | awk -F'[()]' '{ print $2 }') s_arm64.img
popd
If you face any conflicts while applying patches, apply the patch manually. For any other issues, report them via the Issues tab.
These people have helped this project in some way or another, so they should be the ones who receive all the credit: