├── .github └── workflows │ └── blank.yml └── README.md /.github/workflows/blank.yml: -------------------------------------------------------------------------------- 1 | name: Make TWRP Device 2 | 3 | on: 4 | workflow_dispatch: 5 | inputs: 6 | IMG_URL: 7 | description: 'IMG_URL' 8 | required: true 9 | default: '' 10 | 11 | jobs: 12 | build: 13 | if: github.event.repository.owner.id == github.event.sender.id 14 | runs-on: ubuntu-20.04 15 | 16 | steps: 17 | - name: Check Out 18 | uses: actions/checkout@main 19 | 20 | - name: Prepare the environment 21 | run: | 22 | sudo apt update 23 | sudo apt -y install python python3 python-pip python3-pip cpio wget 24 | pip3 install twrpdtgen 25 | mkdir dt 26 | 27 | - name: Download boot or recovery img 28 | run: | 29 | aria2c "${{ github.event.inputs.IMG_URL }}" 30 | ls 31 | 32 | - name: Start build 33 | run: | 34 | python3 -m twrpdtgen -o dt/ *.img 35 | - name: ZIP device tree 36 | run: | 37 | zip -r DeviceTree.zip ./dt 38 | - name: Upload to Release 39 | uses: softprops/action-gh-release@v1 40 | with: 41 | files: | 42 | ./DeviceTree.zip 43 | name: TWRP_Device_Tree-${{ github.run_id }} 44 | tag_name: ${{ github.run_id }} 45 | body: DeviceTree for twrp 46 | env: 47 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 48 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # TWRP Device Tree生成工具 2 | - 这个工具怎么用? 3 | - 1.首先你要搞到你的设备任意一个可以开机系统的 4 | - boot.img AB分区 5 | - recovery.img 除了AB分区以外的所有分区 6 | 7 | ----- 8 | 9 | - 2.将这个仓库fork到你的用户名下 10 | 11 | ----- 12 | 13 | - 3.将recovery.img或boot.img上传至一个可以提供直链下载的位置,这里我推荐直接将img文件上传至这个仓库,然后点进去点view raw,来获取直链 14 | 15 | ----- 16 | 17 | - 4.点击actions - make twrp device - run workflow,然后在那个链接框里面输入你刚刚获取的直链 18 | 19 | ----- 20 | 21 | - 5、填写完成后点击 'Run workflow' 开始运行 22 | 23 | ----- 24 | ## 编译结果 25 | - 可以在 [Release](../../releases) 下载 26 | 27 | ## 看不懂想要图文教程? 28 | - 看看隔壁那个用github编译twrp教程,与这个大同小异端 29 | - https://github.com/Xpsoted/Action-Recovery-builder/blob/main/README.md 30 | --------------------------------------------------------------------------------