2020 ota_hash : ${{ steps.get_info.outputs.ota_hash }}
2121 steps :
2222 - name : Checkout repository
23- uses : actions/checkout@v5
23+ uses : actions/checkout@v6
2424 with :
2525 fetch-depth : 1
2626 ref : bot
6363
6464 steps :
6565 - name : Checkout repository
66- uses : actions/checkout@v5
66+ uses : actions/checkout@v6
6767 with :
6868 fetch-depth : 1
6969 ref : bot
8282 run : |
8383 model="${{ matrix.model }}"
8484 product="${{ matrix.product }}"
85- ota_link="${{ matrix.ota_link }}"
85+ # ota_link="${{ matrix.ota_link }}"
8686
87+ ##############################################################################################################################
8788 # Download avbtool
8889 # curl -Ls https://android.googlesource.com/platform/external/avb/+/master/avbtool.py?format=TEXT | base64 -d > avbtool.py
8990
9798 # DIGEST=$(avbtool calculate_vbmeta_digest --image vbmeta.img)
9899
99100 # Get other information
100- payload_dumper --metadata --out . "$ota_link"
101- FINGERPRINT=$(grep -am1 'post-build=' metadata | cut -d= -f2)
102- SECURITY_PATCH=$(grep -am1 'security-patch-level=' metadata | cut -d= -f2)
101+ # payload_dumper --metadata --out . "$ota_link"
102+ # FINGERPRINT=$(grep -am1 'post-build=' metadata | cut -d= -f2)
103+ # SECURITY_PATCH=$(grep -am1 'security-patch-level=' metadata | cut -d= -f2)
104+ ##############################################################################################################################
105+
106+ download() { wget -T 20 --no-check-certificate "$1" -O "$2"; }
107+
108+ # Get fingerprint detail
109+ download https://developer.android.com/topic/generic-system-image/releases PIXEL_GSI_HTML
110+ RELEASE="$(grep -m1 'corresponding Google Pixel builds' PIXEL_GSI_HTML | grep -o '/versions/.*' | cut -d/ -f3)"
111+ ID="$(grep -m1 -o 'Build:.*' PIXEL_GSI_HTML | cut -d' ' -f2)"
112+ INCREMENTAL="$(grep -m1 -o "$ID-.*-" PIXEL_GSI_HTML | cut -d- -f2)"
113+
114+ # Get security patch
115+ download https://source.android.com/docs/security/bulletin/pixel PIXEL_SECBULL_HTML
116+ SECURITY_PATCH="$(grep -A15 "$(grep -m1 -o 'Security patch level:.*' PIXEL_GSI_HTML | cut -d' ' -f4-)" PIXEL_SECBULL_HTML | grep -m1 -B1 '</tr>' | grep 'td' | sed 's;.*<td>\(.*\)</td>;\1;')"
117+
118+ DEVICE=$(echo "$PRODUCT" | sed 's/_beta//')
119+ FINGERPRINT="google/$PRODUCT/$DEVICE:$RELEASE/$ID/$INCREMENTAL:user/release-keys"
120+
121+ # Validate required fields
122+ required="MODEL PRODUCT DEVICE RELEASE ID INCREMENTAL SECURITY_PATCH"
123+ for i in $required; do
124+ if [ -z "${!i}" ]; then
125+ echo "Missing $i"
126+ exit 1
127+ fi
128+ done
103129
104130 cat <<EOF > ../${product}.prop
105131 FINGERPRINT=$FINGERPRINT
@@ -120,7 +146,7 @@ jobs:
120146 runs-on : ubuntu-latest
121147 steps :
122148 - name : Checkout repository
123- uses : actions/checkout@v5
149+ uses : actions/checkout@v6
124150 with :
125151 fetch-depth : 1
126152 ref : bot
0 commit comments