you'll need to get familiar with Git and Repo as well as How to build a GSI.v
sudo apt-get install bc bison build-essential ccache curl flex g++-multilib gcc-multilib git gnupg gperf imagemagick lib32ncurses5-dev lib32readline-dev lib32z1-dev liblz4-tool libncurses5 libncurses5-dev libsdl1.2-dev libssl-dev libxml2 libxml2-utils lzop pngcrush rsync schedtool squashfs-tools xsltproc zip zlib1g-dev xattr openjdk-11-jdk jq android-sdk-libsparse-utils python3
git config --global user.email "[email protected]"
git config --global user.name "xxxx"
mkdir ~/bin
PATH=~/bin:$PATH
curl https://mirrors.tuna.tsinghua.edu.cn/git/git-repo > ~/bin/repo
chmod a+x ~/bin/repo
If you want to use it often, you can add export PATH=~/.bin:$PATH to the PATH environment variable in the shell startup file (for example, the Bash startup file is ~/.bashrc)
As a first step, you'll have to create and enter a folder with the appropriate name. To do that, run these commands:
mkdir rising
cd rising
repo init -u https://github.com/RisingTechOSS/android -b thirteen
repo init --depth=1 --no-repo-verify -u https://github.com/RisingTechOSS/android -b thirteen -g default,-mips,-darwin,-notdefault
git clone https://github.com/KoysX/treble_RisingOS_gsi.git -b 13
mkdir -p .repo/local_manifests
cp treble_RisingOS_gsi/manifest.xml .repo/local_manifests/ring.xml
repo sync -c --no-clone-bundle --optimized-fetch --prune --force-sync -j$(nproc --all)
Copy the patches folder to rom folder and in rom folder
bash patches/apply-patches.sh .
In rom folder,
cd device/phh/treble
bash generate.sh lineage
You can speed up subsequent builds by adding these lines to your ~/.bashrc OR ~/.zshrc file:
export USE_CCACHE=1
export CCACHE_COMPRESS=1
export CCACHE_MAXSIZE=50G # 50 GB
In rom folder,
. build/envsetup.sh
ccache -M 50G -F 0
lunch treble_arm64_bvN-userdebug
make systemimage -j$(nproc --all)
After compilation, If you want to compress the build. In rom folder,
cd out/target/product/tdgsi_arm64_ab
xz -z -v -T0 system.img
If you face any conflicts while applying patches, apply the patch manually.
- If bluetooth calls or bluetooth media do not work well for you, make sure you have the "Use System Wide BT HAL" checkbox enabled on the Misc page of Treble App. If not, enable and reboot.
- If you have a non-Samsung device with a Qualcomm chipset and VoLTE isn't working with the default IMS package provided by Treble App, try installing this alternative IMS package.
These people have helped this project in some way or another, so they should be the ones who receive all the credit: