diff --git a/.github/workflows/OrangeFox-OFRP.yml b/.github/workflows/OrangeFox-OFRP.yml index ce1dcc4..ff7b356 100644 --- a/.github/workflows/OrangeFox-OFRP.yml +++ b/.github/workflows/OrangeFox-OFRP.yml @@ -98,10 +98,12 @@ jobs: git clone https://gitlab.com/OrangeFox/sync.git if [ ${{ github.event.inputs.MANIFEST_BRANCH }} == '11.0' ] || [ ${{ github.event.inputs.MANIFEST_BRANCH }} == '12.1' ]; then echo "Sync fox_${{ github.event.inputs.MANIFEST_BRANCH }} branch" + echo "CHECK_LEGACY_BRANCH=false" >> $GITHUB_ENV cd sync ./orangefox_sync.sh --branch ${{ github.event.inputs.MANIFEST_BRANCH }} --path ${GITHUB_WORKSPACE}/OrangeFox/fox_${{ github.event.inputs.MANIFEST_BRANCH }} else echo "Sync legacy fox_${{ github.event.inputs.MANIFEST_BRANCH }} branch" + echo "CHECK_LEGACY_BRANCH=true" >> $GITHUB_ENV cd sync/legacy ./orangefox_sync_legacy.sh --branch ${{ github.event.inputs.MANIFEST_BRANCH }} --path ${GITHUB_WORKSPACE}/OrangeFox/fox_${{ github.event.inputs.MANIFEST_BRANCH }} fi @@ -113,14 +115,11 @@ jobs: cd ${{ github.event.inputs.DEVICE_PATH }} echo "COMMIT_ID=$(git rev-parse HEAD)" >> $GITHUB_ENV - - name: Check Manifest Branch - uses: haya14busa/action-cond@v1 - id: fox_branch - with: - cond: ${{ github.event.inputs.MANIFEST_BRANCH == '11.0' || github.event.inputs.MANIFEST_BRANCH == '12.1' }} - if_true: lunch twrp_${{ github.event.inputs.DEVICE_NAME }}-eng && make clean && mka adbd ${{ github.event.inputs.BUILD_TARGET }}image - if_false: lunch omni_${{ github.event.inputs.DEVICE_NAME }}-eng && make clean && mka ${{ github.event.inputs.BUILD_TARGET }}image - + - name: Installing python2 for legacy builds + if: env.CHECK_LEGACY_BRANCH == 'true' + run: | + sudo apt-get install python2 python-is-python2 + - name: Building OrangeFox run: | cd ${GITHUB_WORKSPACE}/OrangeFox/fox_${{ github.event.inputs.MANIFEST_BRANCH }} diff --git a/.github/workflows/PitchBlack-PBRP.yml b/.github/workflows/PitchBlack-PBRP.yml index 107f653..1646004 100644 --- a/.github/workflows/PitchBlack-PBRP.yml +++ b/.github/workflows/PitchBlack-PBRP.yml @@ -83,13 +83,19 @@ jobs: with: swap-size-gb: 12 + - name: Check Manifest Branch + run: | + if [ ${{ github.event.inputs.MANIFEST_BRANCH }} == 'android-11.0' ] || [ ${{ github.event.inputs.MANIFEST_BRANCH }} == 'android-12.1' ]; then + echo "CHECK_LEGACY_BRANCH=false" >> $GITHUB_ENV + else + echo "CHECK_LEGACY_BRANCH=true" >> $GITHUB_ENV + fi + - name: Prepare the environment run: | sudo apt update sudo apt -y upgrade - sudo apt -y install gperf gcc-multilib gcc-10-multilib g++-multilib g++-10-multilib libc6-dev lib32ncurses5-dev x11proto-core-dev libx11-dev tree lib32z-dev libgl1-mesa-dev libxml2-utils xsltproc bc ccache lib32readline-dev lib32z1-dev liblz4-tool libncurses5-dev libsdl1.2-dev libwxgtk3.0-gtk3-dev libxml2 lzop pngcrush schedtool squashfs-tools imagemagick libbz2-dev lzma ncftp qemu-user-static libstdc++-10-dev libtinfo5 libgflags-dev python2 python3 - sudo add-apt-repository universe - sudo apt -y install libncurses5 + sudo apt -y install gperf gcc-multilib gcc-10-multilib g++-multilib g++-10-multilib libc6-dev lib32ncurses5-dev x11proto-core-dev libx11-dev tree lib32z-dev libgl1-mesa-dev libxml2-utils xsltproc bc ccache lib32readline-dev lib32z1-dev liblz4-tool libncurses5-dev libsdl1.2-dev libwxgtk3.0-gtk3-dev libxml2 lzop pngcrush schedtool squashfs-tools imagemagick libbz2-dev lzma ncftp qemu-user-static libstdc++-10-dev libtinfo5 libgflags-dev libncurses5 python3 - name: Install OpenJDK uses: actions/setup-java@v3 @@ -136,9 +142,10 @@ jobs: fi continue-on-error: true - - name: Installing py-is-py2 for legacy builds + - name: Installing python2 for legacy builds + if: env.CHECK_LEGACY_BRANCH == 'true' run: | - sudo apt-get install python-is-python2 + sudo apt-get install python2 python-is-python2 - name: Building Image run: | diff --git a/.github/workflows/SkyHawk-SHRP.yml b/.github/workflows/SkyHawk-SHRP.yml index 99feb4f..ea00965 100644 --- a/.github/workflows/SkyHawk-SHRP.yml +++ b/.github/workflows/SkyHawk-SHRP.yml @@ -81,13 +81,20 @@ jobs: uses: pierotofy/set-swap-space@master with: swap-size-gb: 12 - + + - name: Check Manifest Branch + run: | + if [ ${{ github.event.inputs.MANIFEST_BRANCH }} == 'v3_11.0' ] || [ ${{ github.event.inputs.MANIFEST_BRANCH }} == 'shrp-12.1' ]; then + echo "CHECK_LEGACY_BRANCH=false" >> $GITHUB_ENV + else + echo "CHECK_LEGACY_BRANCH=true" >> $GITHUB_ENV + fi + - name: Prepare the environment run: | sudo apt update sudo apt -y upgrade - sudo apt -y install gperf gcc-multilib gcc-10-multilib g++-multilib g++-10-multilib libc6-dev lib32ncurses5-dev x11proto-core-dev libx11-dev tree lib32z-dev libgl1-mesa-dev libxml2-utils xsltproc bc ccache lib32readline-dev lib32z1-dev liblz4-tool libncurses5-dev libsdl1.2-dev libwxgtk3.0-gtk3-dev libxml2 lzop pngcrush schedtool squashfs-tools imagemagick libbz2-dev lzma ncftp qemu-user-static libstdc++-10-dev libtinfo5 libgflags-dev libncurses5 python2 python3 - sudo add-apt-repository universe + sudo apt -y install gperf gcc-multilib gcc-10-multilib g++-multilib g++-10-multilib libc6-dev lib32ncurses5-dev x11proto-core-dev libx11-dev tree lib32z-dev libgl1-mesa-dev libxml2-utils xsltproc bc ccache lib32readline-dev lib32z1-dev liblz4-tool libncurses5-dev libsdl1.2-dev libwxgtk3.0-gtk3-dev libxml2 lzop pngcrush schedtool squashfs-tools imagemagick libbz2-dev lzma ncftp qemu-user-static libstdc++-10-dev libtinfo5 libgflags-dev libncurses5 python3 - name: Install OpenJDK uses: actions/setup-java@v3 @@ -109,16 +116,6 @@ jobs: git config --global user.name "lazycodebuilder" git config --global user.email "154446636+lazycodebuilder@users.noreply.github.com" repo init --depth=1 -u ${{ github.event.inputs.MANIFEST }} -b ${{ github.event.inputs.MANIFEST_BRANCH }} - - - name: Set build target for upload - run: | - if [ ${{ github.event.inputs.BUILD_TARGET }} == 'recovery' ]; then - echo "BUILD_TARGET_NAME=recovery" >> $GITHUB_ENV - elif [ ${{ github.event.inputs.BUILD_TARGET }} == 'boot' ]; then - echo "BUILD_TARGET_NAME=boot" >> $GITHUB_ENV - else - echo "BUILD_TARGET_NAME=vendor_boot" >> $GITHUB_ENV - fi - name: Repo Sync run: | @@ -144,9 +141,10 @@ jobs: fi continue-on-error: true - - name: Installing py-is-py2 for legacy builds + - name: Installing python2 for legacy builds + if: env.CHECK_LEGACY_BRANCH == 'true' run: | - sudo apt-get install python-is-python2 + sudo apt-get install python2 python-is-python2 - name: Building Image run: | @@ -155,7 +153,17 @@ jobs: export ALLOW_MISSING_DEPENDENCIES=true lunch ${{ env.DEVICE_MAKEFILE }}-eng && make clean && mka ${{ github.event.inputs.BUILD_TARGET }}image -j$(nproc --all) echo "Done building your ${{ github.event.inputs.BUILD_TARGET }}.img" - + + - name: Set build target for upload + run: | + if [ ${{ github.event.inputs.BUILD_TARGET }} == 'recovery' ]; then + echo "BUILD_TARGET_NAME=recovery" >> $GITHUB_ENV + elif [ ${{ github.event.inputs.BUILD_TARGET }} == 'boot' ]; then + echo "BUILD_TARGET_NAME=boot" >> $GITHUB_ENV + else + echo "BUILD_TARGET_NAME=vendor_boot" >> $GITHUB_ENV + fi + - name: Set Build Date # Output will be use in Release run: | echo "BUILD_DATE=$(date +%Y%m%d)" >> $GITHUB_ENV diff --git a/.github/workflows/TeamWin-TWRP.yml b/.github/workflows/TeamWin-TWRP.yml index b8830b3..4a8e30d 100644 --- a/.github/workflows/TeamWin-TWRP.yml +++ b/.github/workflows/TeamWin-TWRP.yml @@ -84,13 +84,22 @@ jobs: uses: pierotofy/set-swap-space@master with: swap-size-gb: 12 - + + - name: Check Manifest Branch and legacy Branch + run: | + if [ ${{ github.event.inputs.MANIFEST_BRANCH }} == 'twrp-11' ] || [ ${{ github.event.inputs.MANIFEST_BRANCH }} == 'twrp-12.1' ]; then + echo "MANIFEST=https://github.com/minimal-manifest-twrp/platform_manifest_twrp_aosp.git" >> $GITHUB_ENV + echo "CHECK_LEGACY_BRANCH=false" >> $GITHUB_ENV + else + echo "MANIFEST=https://github.com/minimal-manifest-twrp/platform_manifest_twrp_omni.git" >> $GITHUB_ENV + echo "CHECK_LEGACY_BRANCH=true" >> $GITHUB_ENV + fi + - name: Prepare the environment run: | sudo apt update sudo apt -y upgrade sudo apt -y install gperf gcc-multilib gcc-10-multilib g++-multilib g++-10-multilib libc6-dev lib32ncurses5-dev x11proto-core-dev libx11-dev tree lib32z-dev libgl1-mesa-dev libxml2-utils xsltproc bc ccache lib32readline-dev lib32z1-dev liblz4-tool libncurses5-dev libsdl1.2-dev libwxgtk3.0-gtk3-dev libxml2 lzop pngcrush schedtool squashfs-tools imagemagick libbz2-dev lzma ncftp qemu-user-static libstdc++-10-dev libtinfo5 libgflags-dev libncurses5 python3 - sudo add-apt-repository universe - name: Install OpenJDK uses: actions/setup-java@v3 @@ -105,31 +114,13 @@ jobs: chmod a+x ~/bin/repo sudo ln -sf ~/bin/repo /usr/bin/repo - - name: Check Manifest Branch - uses: haya14busa/action-cond@v1 - id: manifest - with: - cond: ${{ github.event.inputs.MANIFEST_BRANCH == 'twrp-11' || github.event.inputs.MANIFEST_BRANCH == 'twrp-12.1' }} - if_true: https://github.com/minimal-manifest-twrp/platform_manifest_twrp_aosp.git - if_false: https://github.com/minimal-manifest-twrp/platform_manifest_twrp_omni.git - - name: Initialize Repo run: | mkdir android-recovery cd android-recovery git config --global user.name "lazycodebuilder" git config --global user.email "154446636+lazycodebuilder@users.noreply.github.com" - repo init --depth=1 -u ${{ steps.manifest.outputs.value }} -b ${{ github.event.inputs.MANIFEST_BRANCH }} - - - name: Set build target for upload - run: | - if [ ${{ github.event.inputs.BUILD_TARGET }} == 'recovery' ]; then - echo "BUILD_TARGET_NAME=recovery" >> $GITHUB_ENV - elif [ ${{ github.event.inputs.BUILD_TARGET }} == 'boot' ]; then - echo "BUILD_TARGET_NAME=boot" >> $GITHUB_ENV - else - echo "BUILD_TARGET_NAME=vendor_boot" >> $GITHUB_ENV - fi + repo init --depth=1 -u ${{ env.MANIFEST }}.img -b ${{ github.event.inputs.MANIFEST_BRANCH }} - name: Repo Sync run: | @@ -155,9 +146,10 @@ jobs: fi continue-on-error: true - - name: Installing py-is-py2 for legacy builds + - name: Installing python2 for legacy builds + if: env.CHECK_LEGACY_BRANCH == 'true' run: | - sudo apt-get install python-is-python2 + sudo apt-get install python2 python-is-python2 - name: Building Image run: | @@ -166,7 +158,17 @@ jobs: export ALLOW_MISSING_DEPENDENCIES=true lunch ${{ env.DEVICE_MAKEFILE }}-eng && make clean && make ${{ github.event.inputs.BUILD_TARGET }}image -j$(nproc --all) echo "Done building your ${{ github.event.inputs.BUILD_TARGET }}.img" - + + - name: Set build target for upload + run: | + if [ ${{ github.event.inputs.BUILD_TARGET }} == 'recovery' ]; then + echo "BUILD_TARGET_NAME=recovery" >> $GITHUB_ENV + elif [ ${{ github.event.inputs.BUILD_TARGET }} == 'boot' ]; then + echo "BUILD_TARGET_NAME=boot" >> $GITHUB_ENV + else + echo "BUILD_TARGET_NAME=vendor_boot" >> $GITHUB_ENV + fi + - name: Set Build Date # Output will be use in Release run: | echo "BUILD_DATE=$(date +%Y%m%d)" >> $GITHUB_ENV diff --git a/README.md b/README.md index 6df229c..877fe00 100644 --- a/README.md +++ b/README.md @@ -1,23 +1,45 @@ -## Lazy Action Recovery Builder |TWRP / PBRP / OFRP / SHRP| -Compile your first custom recovery via Github Actions - with ldcheck setup. This workflow supports both TWRP or PBRP or OFRP or SHRP, you can use it with other custom recovery as well, but you have to modify the yaml config yourself. +# Lazy Action Recovery Builder |TWRP / PBRP / OFRP / SHRP| +Compile your first custom recovery via Github Actions - with ldcheck setup. -# How to Use +## How to Use 1. Fork this repository. 2. Go to `Action` tab > `All workflows` > Pick which Build you need (`TWRP or PBRP or OFRP or SHRP`) > `Run workflow`, then pick required information from each drop-down list: - * Manifest Branch (*12.1, *11.0, *10.0, *9.0, *8.1, *7.1, *6.0, etc.) - * Device Tree (Your device tree repository link) - * Device Tree Branch (Your device tree repository branch) - * Device Name (Your device codename) - * Device Path (device/brand/codename) - * Build Target (boot, reecovery, vendorboot) - * LDCHECK (path to your target binary file, ie. `system/bin/qseecomd`) + - Manifest Branch (*12.1, *11.0, *10.0, *9.0, *8.1, *7.1, *6.0, etc.) + - Device Tree (Your device tree repository link) + - Device Tree Branch (Your device tree repository branch) + - Device Name (Your device codename) + - Device Path (device/brand/codename) + - Build Target (boot, reecovery, vendorboot) + - LDCHECK (path to your target binary file, ie. `system/bin/qseecomd`) - If you are building manually/locally and you want to use ldcheck for checking dependencies, visit [THIS](https://github.com/TeamWin/android_device_qcom_twrp-common/tree/android-11#using-ldcheck-to-find-dependencies) this for guide. -l -## Credits -- https://github.com/CaptainThrowback -- https://github.com/azwhikaru -- https://github.com/cd-Crypton -- https://github.com/that1 -- https://github.com/carlodandan -- And to all Contributors in every repositories and scripts I used. \ No newline at end of file + +## Thanks/Credits + - [CaptainThrowback](https://github.com/CaptainThrowback) + - [azwhikaru](https://github.com/azwhikaru) + - [cd-Crypton](https://github.com/cd-Crypton) + - [that1](https://github.com/that1) + - [carlodandan](https://github.com/carlodandan) + - And to all Contributors in every repositories and scripts I used. + +--- +## Copyright Notice + ``` + /* + * Copyright (C) 2020-2024 The OrangeFox Recovery Project + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + ``` \ No newline at end of file