added python2 for legacy builds & updated README.md

This commit is contained in:
lazycodebuilder 2024-02-07 00:27:09 +05:30
parent d088aaf38c
commit e10c435798
5 changed files with 109 additions and 71 deletions

View File

@ -98,10 +98,12 @@ jobs:
git clone https://gitlab.com/OrangeFox/sync.git git clone https://gitlab.com/OrangeFox/sync.git
if [ ${{ github.event.inputs.MANIFEST_BRANCH }} == '11.0' ] || [ ${{ github.event.inputs.MANIFEST_BRANCH }} == '12.1' ]; then 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 "Sync fox_${{ github.event.inputs.MANIFEST_BRANCH }} branch"
echo "CHECK_LEGACY_BRANCH=false" >> $GITHUB_ENV
cd sync cd sync
./orangefox_sync.sh --branch ${{ github.event.inputs.MANIFEST_BRANCH }} --path ${GITHUB_WORKSPACE}/OrangeFox/fox_${{ github.event.inputs.MANIFEST_BRANCH }} ./orangefox_sync.sh --branch ${{ github.event.inputs.MANIFEST_BRANCH }} --path ${GITHUB_WORKSPACE}/OrangeFox/fox_${{ github.event.inputs.MANIFEST_BRANCH }}
else else
echo "Sync legacy fox_${{ github.event.inputs.MANIFEST_BRANCH }} branch" echo "Sync legacy fox_${{ github.event.inputs.MANIFEST_BRANCH }} branch"
echo "CHECK_LEGACY_BRANCH=true" >> $GITHUB_ENV
cd sync/legacy cd sync/legacy
./orangefox_sync_legacy.sh --branch ${{ github.event.inputs.MANIFEST_BRANCH }} --path ${GITHUB_WORKSPACE}/OrangeFox/fox_${{ github.event.inputs.MANIFEST_BRANCH }} ./orangefox_sync_legacy.sh --branch ${{ github.event.inputs.MANIFEST_BRANCH }} --path ${GITHUB_WORKSPACE}/OrangeFox/fox_${{ github.event.inputs.MANIFEST_BRANCH }}
fi fi
@ -113,13 +115,10 @@ jobs:
cd ${{ github.event.inputs.DEVICE_PATH }} cd ${{ github.event.inputs.DEVICE_PATH }}
echo "COMMIT_ID=$(git rev-parse HEAD)" >> $GITHUB_ENV echo "COMMIT_ID=$(git rev-parse HEAD)" >> $GITHUB_ENV
- name: Check Manifest Branch - name: Installing python2 for legacy builds
uses: haya14busa/action-cond@v1 if: env.CHECK_LEGACY_BRANCH == 'true'
id: fox_branch run: |
with: sudo apt-get install python2 python-is-python2
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: Building OrangeFox - name: Building OrangeFox
run: | run: |

View File

@ -83,13 +83,19 @@ jobs:
with: with:
swap-size-gb: 12 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 - name: Prepare the environment
run: | run: |
sudo apt update sudo apt update
sudo apt -y upgrade 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 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
sudo apt -y install libncurses5
- name: Install OpenJDK - name: Install OpenJDK
uses: actions/setup-java@v3 uses: actions/setup-java@v3
@ -136,9 +142,10 @@ jobs:
fi fi
continue-on-error: true 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: | run: |
sudo apt-get install python-is-python2 sudo apt-get install python2 python-is-python2
- name: Building Image - name: Building Image
run: | run: |

View File

@ -82,12 +82,19 @@ jobs:
with: with:
swap-size-gb: 12 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 - name: Prepare the environment
run: | run: |
sudo apt update sudo apt update
sudo apt -y upgrade 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 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 - name: Install OpenJDK
uses: actions/setup-java@v3 uses: actions/setup-java@v3
@ -110,16 +117,6 @@ jobs:
git config --global user.email "154446636+lazycodebuilder@users.noreply.github.com" 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 }} 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 - name: Repo Sync
run: | run: |
cd android-recovery cd android-recovery
@ -144,9 +141,10 @@ jobs:
fi fi
continue-on-error: true 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: | run: |
sudo apt-get install python-is-python2 sudo apt-get install python2 python-is-python2
- name: Building Image - name: Building Image
run: | run: |
@ -156,6 +154,16 @@ jobs:
lunch ${{ env.DEVICE_MAKEFILE }}-eng && make clean && mka ${{ github.event.inputs.BUILD_TARGET }}image -j$(nproc --all) 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" 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 - name: Set Build Date # Output will be use in Release
run: | run: |
echo "BUILD_DATE=$(date +%Y%m%d)" >> $GITHUB_ENV echo "BUILD_DATE=$(date +%Y%m%d)" >> $GITHUB_ENV

View File

@ -85,12 +85,21 @@ jobs:
with: with:
swap-size-gb: 12 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 - name: Prepare the environment
run: | run: |
sudo apt update sudo apt update
sudo apt -y upgrade 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 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 - name: Install OpenJDK
uses: actions/setup-java@v3 uses: actions/setup-java@v3
@ -105,31 +114,13 @@ jobs:
chmod a+x ~/bin/repo chmod a+x ~/bin/repo
sudo ln -sf ~/bin/repo /usr/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 - name: Initialize Repo
run: | run: |
mkdir android-recovery mkdir android-recovery
cd android-recovery cd android-recovery
git config --global user.name "lazycodebuilder" git config --global user.name "lazycodebuilder"
git config --global user.email "154446636+lazycodebuilder@users.noreply.github.com" 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 }} repo init --depth=1 -u ${{ env.MANIFEST }}.img -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 - name: Repo Sync
run: | run: |
@ -155,9 +146,10 @@ jobs:
fi fi
continue-on-error: true 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: | run: |
sudo apt-get install python-is-python2 sudo apt-get install python2 python-is-python2
- name: Building Image - name: Building Image
run: | run: |
@ -167,6 +159,16 @@ jobs:
lunch ${{ env.DEVICE_MAKEFILE }}-eng && make clean && make ${{ github.event.inputs.BUILD_TARGET }}image -j$(nproc --all) 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" 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 - name: Set Build Date # Output will be use in Release
run: | run: |
echo "BUILD_DATE=$(date +%Y%m%d)" >> $GITHUB_ENV echo "BUILD_DATE=$(date +%Y%m%d)" >> $GITHUB_ENV

View File

@ -1,23 +1,45 @@
## Lazy Action Recovery Builder |TWRP / PBRP / OFRP / SHRP| # 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. Compile your first custom recovery via Github Actions - with ldcheck setup.
# How to Use ## How to Use
1. Fork this repository. 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: 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.) - 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 (Your device tree repository link)
* Device Tree Branch (Your device tree repository branch) - Device Tree Branch (Your device tree repository branch)
* Device Name (Your device codename) - Device Name (Your device codename)
* Device Path (device/brand/codename) - Device Path (device/brand/codename)
* Build Target (boot, reecovery, vendorboot) - Build Target (boot, reecovery, vendorboot)
* LDCHECK (path to your target binary file, ie. `system/bin/qseecomd`) - 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. - 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 ## Thanks/Credits
- https://github.com/CaptainThrowback - [CaptainThrowback](https://github.com/CaptainThrowback)
- https://github.com/azwhikaru - [azwhikaru](https://github.com/azwhikaru)
- https://github.com/cd-Crypton - [cd-Crypton](https://github.com/cd-Crypton)
- https://github.com/that1 - [that1](https://github.com/that1)
- https://github.com/carlodandan - [carlodandan](https://github.com/carlodandan)
- And to all Contributors in every repositories and scripts I used. - 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 <http://www.gnu.org/licenses/>.
*
*/
```