Giter VIP home page Giter VIP logo

action-twrp-builder's Introduction

Automated TWRP compilation based on Github Action

Advertising

  1. OrangeFox is here

Notice

  1. Github Actions service is NOT unlimited so to avoid waste, don't use unverified source code in this, the best used to automate builds of repositories that are already stabilized

  2. Before you make any changes, make sure that the repository you are operating in belongs to you. "Fork" if you want to commit code, otherwise use "Use this template"

  3. issues and Pull Requests may NOT get a reply. If you think is really necessary, use email on my profile to contact me

  4. Python 2 in Debian (Ubuntu) has been removed. If you are working on Android 8.1 and below, use Recovery Build (Legacy)

  5. Don't ask any questions about your source code, such as

    • No rule to make ...
    • Image ... out of size

Thanks to

All contributors

Parameter Description

Name Description Example
MANIFEST_URL Source address https://github.com/minimal-manifest-twrp/platform_manifest_twrp_aosp.git
MANIFEST_BRANCH Source branch twrp-12.1
DEVICE_TREE_URL Device address https://github.com/TeamWin/android_device_asus_I003D
DEVICE_TREE_BRANCH Device branch android-12.1
DEVICE_PATH Device location device/asus/I003D
COMMON_TREE_URL Common tree address https://github.com/TeamWin/android_device_asus_sm8250-common
COMMON_PATH Common tree location device/asus/sm8250-common
DEVICE_NAME Model name I003D
MAKEFILE_NAME Makefile name twrp_I003D
BUILD_TARGET Build Target Partition (boot/recovery/vendorboot) recovery

How to use

For example, your username is: JohnSmith

0. If you want to commit code, click 'Fork' in the upper right corner of this repository

image

1. If you just want to use it simply, click 'Use this template' in the upper right corner of this repository

image

2. After waiting for the automatic redirection, you will see your own username

image

3. Change the username and email in the workflow to reflect your Github credentials (optional)

Setting up SSH Keys (optional)

4. Go to Settings, then select Deploy keys and select "Add deploy key" button.

5. On your Android device, install Termux

6. Install openssh in Termux and generate ssh keys. (Do not use passphrase for keys)

NOTE: When creating the deploy key for a repository like [email protected]:owner/repo.git or https://github.com/owner/repo, put that URL into the key comment. (Hint: Try ssh-keygen ... -C "[email protected]:owner/repo.git".) owner = your Github username

pkg install openssh
ssh-keygen -t ed25519 -C "[email protected]:owner/Action-Recovery-Builder.git"

7. Add the keys to your repo. In Termux, use the following commands:

cd /data/data/com.termux/files/usr/etc/ssh
cat ssh_host_ed25519_key.pub

Select and copy the key then paste in the box for Key. You can name it whatever you choose for the title.

8. Now to add your private ssh key. Back in Termux:

cat ssh_host_ed25519_key

Copy the output from Termux.

In your browser, select Secrets under the Security tab. Select Actions Select New repository secret For the New secret name, it should be SSH_PRIVATE_KEY Paste the output from ssh_host_ed25519_key into the Value box. Then select Add secret.

Building the Recovery

9. Click 'Actions-Recovery Build'

image

10. Click 'Run workflow' and fill in according to the above 'parameter description'

image

11. After filling in, click 'Run workflow' to start running


Compilation results

Can be downloaded at Release


action-twrp-builder's People

Contributors

acastillorobles77 avatar arcticaquila avatar azwhikaru avatar bodya-kolibass avatar captainthrowback avatar firedevel avatar lopestom avatar mdhusainhfz avatar nico170420 avatar sakshiagrwal avatar tonyha7 avatar xenontheinertg avatar xpsoted avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

action-twrp-builder's Issues

shrp bug 问题

请问在这里怎么修复 bug ? 我编译的 shrp 有一些 bug ,还有就是 shrp 的作者信息怎么添加?

the collected recovery is not loaded

изображение
After a successful build of vendorboot or recovery, nothing loads on my github, most likely the problem is in the env in the Recovery Build.yml, however, nothing loads
Recovery Build.yml:

    - name: Upload to Release
      uses: softprops/action-gh-release@v1
      with:
        files: workspace/out/target/product/${{ github.event.inputs.DEVICE_NAME }}/${{ github.event.inputs.BUILD_TARGET }}.img
        name: ${{ github.event.inputs.DEVICE_NAME }}-${{ github.run_id }}
        tag_name: ${{ github.run_id }}
        body: |
          Manifest: ${{ github.event.inputs.MANIFEST_BRANCH }}
          Device: ${{ github.event.inputs.DEVICE_NAME }}
          Target: ${{ github.event.inputs.BUILD_TARGET }}.img
      env:
        GITHUB_TOKEN: ${{ secrets.TEST.TEST }}

изображение

Repo sync error

Screenshot 2024-02-12 000415

Run repo sync -j$(nproc --all) --force-sync
repo sync -j$(nproc --all) --force-sync
shell: /usr/bin/bash -e {0}
env:
JAVA_HOME: /opt/hostedtoolcache/Java_Zulu_jdk/8.0.402-6/x64
JAVA_HOME_8_X64: /opt/hostedtoolcache/Java_Zulu_jdk/8.0.402-6/x64

error: Cannot fetch phhusson/vendor_lptools from https://github.com/github.com/phhusson/vendor_lptools
error: Cannot fetch phhusson/vendor_lptools from https://github.com/github.com/phhusson/vendor_lptools

remote: Not Found
fatal: repository 'https://github.com/github.com/phhusson/vendor_lptools/' not found

phhusson/vendor_lptools:
remote: Not Found
fatal: repository 'https://github.com/github.com/phhusson/vendor_lptools/' not found
phhusson/vendor_lptools: sleeping 4.0 seconds before retrying
remote: Not Found
fatal: repository 'https://github.com/github.com/phhusson/vendor_lptools/' not found

why i am getting this error

Building Recovery Error

Run source build/envsetup.sh
including device/infinix/Infinix-X6833B/vendorsetup.sh
/home/runner/work/Action-TWRP-Builder/Action-TWRP-Builder/workspace/device/infinix/Infinix-X6833B/vendorsetup.sh:8: add_lunch_combo is obsolete. Use COMMON_LUNCH_CHOICES in your AndroidProducts.mk instead.
/home/runner/work/Action-TWRP-Builder/Action-TWRP-Builder/workspace/device/infinix/Infinix-X6833B/vendorsetup.sh:9: add_lunch_combo is obsolete. Use COMMON_LUNCH_CHOICES in your AndroidProducts.mk instead.
/home/runner/work/Action-TWRP-Builder/Action-TWRP-Builder/workspace/device/infinix/Infinix-X6833B/vendorsetup.sh:10: add_lunch_combo is obsolete. Use COMMON_LUNCH_CHOICES in your AndroidProducts.mk instead.
In file included from build/make/core/config.mk:313:
In file included from build/make/core/envsetup.mk:312:
device/infinix/Infinix-X6833B/AndroidProducts.mk:11: error: device/infinix/Infinix-X6833B: twrp_Infinix-X6833B-user: Invalid variant: X6833B.
18:07:29 dumpvars failed with: exit status 1
Device Infinix not found. Attempting to retrieve device repository from TeamWin Github (http://github.com/TeamWin).
Repository for Infinix not found in the TeamWin Github repository list.
If this is in error, you may need to manually add it to your .repo/local_manifests/roomservice.xml
In file included from build/make/core/config.mk:313:
In file included from build/make/core/envsetup.mk:312:
device/infinix/Infinix-X6833B/AndroidProducts.mk:11: error: device/infinix/Infinix-X6833B: twrp_Infinix-X6833B-user: Invalid variant: X6833B.
18:07:31 dumpvars failed with: exit status 1
build/make/core/version_defaults.mk:56: warning: Invalid TARGET_PLATFORM_VERSION 'eng', must be one of
In file included from build/make/core/config.mk:313:
In file included from build/make/core/envsetup.mk:68:
build/make/core/version_defaults.mk:57: error: SP2A.
18:07:31 dumpvars failed with: exit status 1

** Don't have a product spec for: 'twrp_Infinix'
** Do you have the right repo manifest?

Error: Process completed with exit code 1.

I did not understand what I should do, can you help me?

Building阶段报错

错误信息:

[ 99% 14742/14750] Target boot image: /home/runner/work/Action-Recovery-builder/Action-Recovery-builder/workspace/out/target/product/hi3635/boot.img
FAILED: /home/runner/work/Action-Recovery-builder/Action-Recovery-builder/workspace/out/target/product/hi3635/boot.img 
/bin/bash -c "(/home/runner/work/Action-Recovery-builder/Action-Recovery-builder/workspace/out/host/linux-x86/bin/mkbootimg  --kernel /home/runner/work/Action-Recovery-builder/Action-Recovery-builder/workspace/out/target/product/hi3635/kernel --ramdisk /home/runner/work/Action-Recovery-builder/Action-Recovery-builder/workspace/out/target/product/hi3635/ramdisk.img --base 0x00678000 --pagesize 2048 --cmdline \"mem=3072M mmcparts=mmcblk0:p1(vrl),p2(vrl_backup),p6(modemnvm_factory),p9(splash),p10(modemnvm_backup),p11(modemnvm_img),p12(modemnvm_system),p14(3rdmodemnvm),p15(3rdmodemnvmback),p17(modem_om),p20(modemnvm_update),p30(modem),p31(modem_dsp),p32(dfx),p33(3rdmodem) androidboot.selinux=enforcing buildvariant=eng\" --os_version 16.1.0 --os_patch_level 2099-12-31 --ramdisk_offset 0x07588000 --tags_offset 0xffb88000 --output /home/runner/work/Action-Recovery-builder/Action-Recovery-builder/workspace/out/target/product/hi3635/boot.img ) && (true )"
Traceback (most recent call last):
  File "/home/runner/work/Action-Recovery-builder/Action-Recovery-builder/workspace/out/host/linux-x86/bin/mkbootimg", line 216, in <module>
    main()
  File "/home/runner/work/Action-Recovery-builder/Action-Recovery-builder/workspace/out/host/linux-x86/bin/mkbootimg", line 207, in main
    img_id = write_header(args)
  File "/home/runner/work/Action-Recovery-builder/Action-Recovery-builder/workspace/out/host/linux-x86/bin/mkbootimg", line 77, in write_header
    (args.os_version << 11) | args.os_patch_level)) # os version and patch level
struct.error: 'I' format requires 0 <= number <= 4294967295
[ 99% 14743/14750] build /home/runner/work/Action-Recovery-builder/Action-Recovery-builder/workspace/out/target/product/hi3635/obj_arm/SHARED_LIBRARIES/libbmlutils_intermediates/teamwin
ninja: build stopped: subcommand failed.
06:28:03 ninja failed with: exit status 1
Error: Process completed with exit code 1.

代码位于https://github.com/Young-Lord/Action-Recovery-builderhttps://github.com/Young-Lord/android_device_unknown_hi3635

设备是华为荣耀X2,设备树使用twrpdtgen提取

我在填写参数时并不理解我究竟应该填写什么

当我按照我的理解填写内容时 脚本出现了报错
Run git clone https://github.com/hk56184172/hiphic -b android-12.1 ./device/motorola/hiphic ##[debug]/bin/bash -e /home/runner/work/_temp/421e1f93-9d62-400a-a54b-7e75af78a65c.sh Cloning into './device/motorola/hiphic'... fatal: could not read Username for 'https://github.com/': No such device or address Error: Process completed with exit code 128. ##[debug]Finishing: Clone device tree
请您指导我应该如何改正我所填写的内容
设备型号:摩托罗拉Edge X30 (hiphic)
安卓版本:12

FAILED:ninja

FAILED: ninja: 'device/sony/bahamut_kddi/prebuilt/kernel', needed by 'out/target/product/bahamut_kddi/kernel', missing and no known rule to make it
05:55:22 ninja failed with: exit status 1
Error: Process completed with exit code 1.

Build for ROG Phone 6 (AI2201)

I am having this problem on building

this is my device tree

https://github.com/jeanrivera/android_device_asus_ASUS_AI2201

23s
1s
Run source build/envsetup.sh
including device/asus/AI2201/vendorsetup.sh
/home/runner/work/Action-Recovery-builder/Action-Recovery-builder/workspace/device/asus/AI2201/vendorsetup.sh:8: add_lunch_combo is obsolete. Use COMMON_LUNCH_CHOICES in your AndroidProducts.mk instead.
/home/runner/work/Action-Recovery-builder/Action-Recovery-builder/workspace/device/asus/AI2201/vendorsetup.sh:9: add_lunch_combo is obsolete. Use COMMON_LUNCH_CHOICES in your AndroidProducts.mk instead.
/home/runner/work/Action-Recovery-builder/Action-Recovery-builder/workspace/device/asus/AI2201/vendorsetup.sh:10: add_lunch_combo is obsolete. Use COMMON_LUNCH_CHOICES in your AndroidProducts.mk instead.
In file included from build/make/core/config.mk:313:
In file included from build/make/core/envsetup.mk:312:
build/make/core/product_config.mk:160: error: Can not locate config makefile for product "omni_ASUS_AI2201.mk".
07:58:17 dumpvars failed with: exit status 1
Device ASUS_AI2201.mk not found. Attempting to retrieve device repository from TeamWin Github (http://github.com/TeamWin).
Repository for ASUS_AI2201.mk not found in the TeamWin Github repository list.
If this is in error, you may need to manually add it to your .repo/local_manifests/roomservice.xml
In file included from build/make/core/config.mk:313:
In file included from build/make/core/envsetup.mk:312:
build/make/core/product_config.mk:160: error: Can not locate config makefile for product "omni_ASUS_AI2201.mk".
07:58:18 dumpvars failed with: exit status 1
In file included from build/make/core/config.mk:313:
In file included from build/make/core/envsetup.mk:312:
build/make/core/product_config.mk:160: error: Can not locate config makefile for product "omni_ASUS_AI2201.mk".
07:58:18 dumpvars failed with: exit status 1

** Don't have a product spec for: 'omni_ASUS_AI2201.mk'
** Do you have the right repo manifest?

Error: Process completed with exit code 1.

Screenshot 2022-10-15 040239

Ninja error

FAILED: ninja: 'device/infinix/X6833B/prebuilt/kernel', needed by 'out/target/product/X6833B/kernel', missing and no known rule to make it
23:08:43 ninja failed with: exit status 1
Error: Process completed with exit code 1.
What should I do?

lnitialize repo is wrong

Run PATH=~/bin:$PATH
fatal: cannot obtain manifest git://github.com/minimal-manifest-twrp/platform_manifest_twrp_omni.git
manifests:
fatal: unable to connect to github.com:
github.com[O: 140.82.113.4]: errno=Connection timed out
manifests: sleeping 4.0 seconds before retrying
manifests:
fatal: unable to connect to github.com:
github.com[O: 140.82.113.4]: errno=Connection timed out
Error: Process completed with exit code 1.

I don't know what's going on so I tried several times with different configs, but each time the same error code, so I came for help.
The device I am using is based on Android 8.1, so the version I use is the 2021/11/29 version, I used to compile it successfully once before, but it doesn't work now,
The new version seems to be only available for Android 9.0+ devices, so I don't know what to do.

Pb recovery

Sir we can compile pitchblack recovery from this?

Building error

Screenshot_20220907-222328_Chrome
I don't understand what I should put in the "MAKEFILE_NAME" line. please help me to fix the error

error : missing and no known rule to make it

ninja: error: '/home/runner/work/Action-Recovery-builder/Action-Recovery-builder/workspace/out/target/product/zeus/obj/STATIC_LIBRARIES/bootctrl.taro_intermediates/export_includes', needed by '/home/runner/work/Action-Recovery-builder/Action-Recovery-builder/workspace/out/target/product/zeus/obj/EXECUTABLES/update_engine_sideload_intermediates/import_includes', missing and no known rule to make it
14:30:15 ninja failed with: exit status 1
Error: Process completed with exit code 1.

Building报错

ninja: error: '/home/runner/work/Action-Recovery-builder/Action-Recovery-builder/workspace/out/target/product/elish/obj/STATIC_LIBRARIES/bootctrl.kona_intermediates/export_includes', 
needed by '/home/runner/work/Action-Recovery-builder/Action-Recovery-builder/workspace/out/target/product/elish/obj/EXECUTABLES/update_engine_sideload_intermediates/import_includes', 
missing and no known rule to make it
08:07:37 ninja failed with: exit status 1

设备:小米平板5Pro Wifi版
twrpdtgen提取的设备树 https://github.com/Kuroikage1732/android_device_xiaomi_elish

编译产物无法使用

你好!我用twrpdtgen生成了一份DeviceTree,并Fork了您的源码来编译一份TWRP过程0错误,编译结果也正常,也有编译产物(recovery.img),但是用dd刷入recovery分区并引导后,手机在显示第一屏后黑屏,连接电脑后设备管理器中在通用串行设备总线下有我的手机(MI CC 9e),但手机黑屏,无任何反应,请解决此问题!谢谢!
手机型号:小米CC9e
MIUI版本:12.5
Android版本:10
TWRP分支版本:twrp-9.0
Log文件+TWRP编译产物:
logs_1.zip

can not get dependences

Error log when sync device dependencies:

================================================================================
Repo command failed: ManifestParseError

twrp.dependencies file:

[
 {
    "remote": "TeamWin",
    "repository": "android_device_qcom_common",
    "target_path": "device/qcom/common",
    "branch": "android-12.1"
  },

  {
    "remote": "TeamWin",
    "repository": "android_device_qcom_twrp-common",
    "target_path": "device/qcom/twrp-common",
    "branch": "android-12.1"
  }
]

print "*** Error opening \"%s.sha1\"; can't verify %s" % (fn, key)

当我在尝试使用Actions编译我的recovery的时候我出现了下面的错误:

[ 96% 6722/6945] Generated: (/home/runner/work/Action-TWRP-builder/Action-TWRP-builder/workspace/out/target/product/len6737m_65_sh_n/android-info.txt)
FAILED: /bin/bash -c "(build/tools/check_radio_versions.py ) && (echo \"board=\" > /home/runner/work/Action-TWRP-builder/Action-TWRP-builder/workspace/out/target/product/len6737m_65_sh_n/android-info.txt )"
  File "build/tools/check_radio_versions.py", line 56
    print "*** Error opening \"%s.sha1\"; can't verify %s" % (fn, key)
          ^
SyntaxError: invalid syntax
[ 96% 6722/6945] target  C++: libguitwrp <= bootable/recovery/gui/patternpassword.cpp
[ 96% 6722/6945] target  C++: libguitwrp <= bootable/recovery/gui/textbox.cpp
[ 96% 6722/6945] target  C++: libguitwrp <= bootable/recovery/gui/twmsg.cpp
[ 96% 6722/6945] target  C++: libguitwrp <= bootable/recovery/gui/hardwarekeyboard.cpp
[ 96% 6722/6945] target  C++: libguitwrp <= bootable/recovery/gui/terminal.cpp
ninja: build stopped: subcommand failed.
make: *** [build/core/ninja.mk:158: ninja_wrapper] Error 1

我尝试使用python的不同版本来编译,都已失败告终。最后一次使用的是python3.8.
我不明白这是什么样的错误,请帮帮我。附件是完整的log
logs_6.zip

Please convert to Soong.

main/dtbtool/Android.mk:14: error: BUILD_HOST_EXECUTABLE is obsolete. Please convert to Soong.

While build recovery it give me an error

'''
Run PATH=/bin:$PATH
PATH=
/bin:$PATH
cd /home/runner/work/Action-Recovery-builder/Action-Recovery-builder/workspace
export ALLOW_MISSING_DEPENDENCIES=true
source build/envsetup.sh
lunch omni_sub_v8-eng
make clean
make recoveryimage -j$(nproc --all)
shell: /bin/bash -e {0}
including device/kido/sub_v8/vendorsetup.sh
including vendor/omni/vendorsetup.sh
including sdk/bash_completion/adb.bash
Traceback (most recent call last):
File "vendor/omni/build/tools/roomservice.py", line 391, in
os.mkdir(local_manifest_dir)
OSError: [Errno 2] No such file or directory: '.repo/local_manifests'
Error: Process completed with exit code 1.
'''

Please help

Parameter value define

Big azwhikaru,

need help for use this.

For a new device,how to define the value for this table.
the Example can not be understood why it is it.
do we have a tg group.look forard reply.

Name Description Example
MANIFEST_URL Source address https://github.com/minimal-manifest-twrp/platform_manifest_twrp_aosp.git
MANIFEST_BRANCH Source branch twrp-12.1
DEVICE_TREE_URL Device address https://github.com/TeamWin/android_device_asus_I003D
DEVICE_TREE_BRANCH Device branch android-12.1
DEVICE_PATH Device location device/asus/I003D
COMMON_TREE_URL Common tree address https://github.com/TeamWin/android_device_asus_sm8250-common
COMMON_PATH Common tree location device/asus/sm8250-common
DEVICE_NAME Model name I003D
MAKEFILE_NAME Makefile name twrp_I003D
BUILD_TARGET Build Target Partition (boot/recovery/vendorboot) recovery

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.