Repository navigation
166 lines (156 loc) · 5.28 KB
/
Copy pathport.yml
File metadata and controls
166 lines (156 loc) · 5.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
name: HyperOS AutoPorter Workflow
on:
workflow_dispatch:
inputs:
mode:
description: 'Build mode (port = stock+port mix, mod = stock-only modification)'
required: true
default: 'port'
type: choice
options:
- port
- mod
hyper_version:
description: 'HyperOS version (selects modded apps set)'
required: true
default: 'hos4'
type: choice
options:
- hos4
- hos3
device:
description: 'Target device (selects firmware templates)'
required: true
default: 'duchamp'
type: choice
options:
- duchamp
build_target:
description: 'What to build (both runs base + fenrir in parallel)'
required: true
default: 'base'
type: choice
options:
- base
- fenrir
- both
package_type:
description: 'Package type (universal = recovery + fastboot, fastboot-only = no META-INF)'
required: true
default: 'universal'
type: choice
options:
- universal
- fastboot-only
debloat:
description: 'Debloat list (auto = match hyper_version)'
required: true
default: 'auto'
type: choice
options:
- auto
- hos3
- hos4
- none
dsv:
description: 'Disable signature verification (DSV); functional smali fixes always apply'
required: true
default: 'yes'
type: choice
options:
- "yes"
- "no"
decrypt_data:
description: 'Decrypt /data (fileencryption -> fileencryptable in fstab)'
required: true
default: 'yes'
type: choice
options:
- "yes"
- "no"
density:
description: 'Screen density (persist.miui.density_v2 + ro.sf.lcd_density in product/build.prop)'
required: false
default: 480
type: number
aod_fullscreen:
description: 'Fullscreen AOD (support_aod_fullscreen in duchamp.xml + NoSuchElementException catch in miui-services.jar)'
required: true
default: 'true'
type: choice
options:
- "true"
- "false"
dialer:
description: 'Install MIUI dialer (global only: dialer_gl set on EU, mi_ext apps elsewhere; CN skips)'
required: true
default: 'yes'
type: choice
options:
- "yes"
- "no"
ext4_rw:
description: 'Comma-separated partitions to rebuild as ext4 RW (all/none)'
required: false
default: 'product,system'
type: string
ext4_free_mb:
description: 'Free megabytes to keep in each ext4 RW partition'
required: false
default: 150
type: number
jobs:
build:
name: Build Super Image (${{ matrix.target }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
target: ${{ fromJSON(inputs.build_target == 'both' && '["base", "fenrir"]' || format('["{0}"]', inputs.build_target)) }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
lfs: true
- name: Free Disk Space
run: |
echo "=== Disk space before cleanup ==="
df -h
sudo rm -rf /usr/share/dotnet
sudo rm -rf /usr/local/lib/android
sudo rm -rf /opt/ghc
sudo rm -rf /usr/local/share/boost
sudo docker image prune --all --force || true
echo "=== Disk space after cleanup ==="
df -h
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install System Dependencies
run: |
sudo apt-get update
sudo apt-get install -y android-sdk-libsparse-utils erofs-utils p7zip-full wget curl default-jre-headless
- name: Install Python Dependencies
run: |
sudo python -m pip install --break-system-packages -r requirements.txt
- name: Run AutoPorter
run: |
sudo python -u autoporter.py --mode ${{ inputs.mode }} --hyper-version ${{ inputs.hyper_version }} --package-type ${{ inputs.package_type }} --debloat ${{ inputs.debloat }} --dsv ${{ inputs.dsv }} --decrypt-data ${{ inputs.decrypt_data }} --ext4-rw "${{ inputs.ext4_rw }}" --ext4-free-mb ${{ inputs.ext4_free_mb }} --density ${{ inputs.density }} --aod-fullscreen ${{ inputs.aod_fullscreen }} --dialer ${{ inputs.dialer }} --device ${{ inputs.device }} --variant ${{ matrix.target }}
- name: Upload build sidecars (debug on failure)
if: failure()
uses: actions/upload-artifact@v4
with:
name: sidecars-${{ inputs.mode }}-${{ inputs.hyper_version }}-${{ matrix.target }}
path: |
extracted_stock/*.fs_config
extracted_stock/*.file_contexts
extracted_port/*.fs_config
extracted_port/*.file_contexts
if-no-files-found: warn
- name: Upload flashable ZIP
uses: actions/upload-artifact@v4
with:
name: package-${{ inputs.mode }}-${{ inputs.hyper_version }}-${{ inputs.package_type }}-${{ matrix.target }}
path: HyperOS-*-duchamp-*.zip
if-no-files-found: error