File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2828 download "https://developer.android.com$(grep -o 'href=".*download.*"' PIXEL_LATEST_HTML | grep 'qpr' | cut -d\" -f2 | head -n1)" PIXEL_FI_HTML
2929
3030 # Extract device information
31- grep -A1 'tr id=' PIXEL_FI_HTML | grep 'td' | sed 's;.*<td>\(.*\)</td>;\1;' | sed 's/^[[:space:]]*//g;s/[[:space:]]*$//g ' > MODEL_LIST
32- grep -o 'tr id="[^\"]*" ' PIXEL_FI_HTML | awk -F\" '{print $2 "_beta"}' | sed 's/^[[:space:]]*//g;s/[[:space:]]*$//g ' > PRODUCT_LIST
31+ grep -A1 'tr id=' PIXEL_FI_HTML | grep 'td' | sed 's;.*<td>\(.*\)</td>.* ;\1;' > MODEL_LIST
32+ grep 'tr id=' PIXEL_FI_HTML | sed 's;.*<tr id="\(.*\)">.*;\1_beta; ' > PRODUCT_LIST
3333
3434 matrix_json=$(paste MODEL_LIST PRODUCT_LIST | jq -R 'split("\t") | {model: .[0], product: .[1]}' | jq -s '{include: .}' | jq -c .)
3535 echo "matrix=$matrix_json" >> $GITHUB_OUTPUT
@@ -72,11 +72,17 @@ jobs:
7272 CANARY_ID="$(grep '"id"' PIXEL_CANARY_JSON | sed -e 's;.*canary-\(.*\)".*;\1;' -e 's;^\(.\{4\}\);\1-;')"
7373 SECURITY_PATCH="$(grep "<td>$CANARY_ID" PIXEL_SECBULL_HTML | sed 's;.*<td>\(.*\)</td>;\1;')"
7474
75- if [ -z "$ID" ] || [ -z "$INCREMENTAL" ] || [ -z "$SECURITY_PATCH" ] ; then
75+ if [ -z "$ID" ] || [ -z "$INCREMENTAL" ]; then
7676 echo "! Failed to get pif.prop for $product"
7777 exit 1
7878 fi
7979
80+ if [ -z "$SECURITY_PATCH" ]; then
81+ echo "! Failed to determine exact security patch level"
82+ echo "- Assuming probable security patch level from Canary build info"
83+ SECURITY_PATCH="${CANARY_ID}-05"
84+ fi
85+
8086 cat <<EOF > ../${product}.prop
8187 FINGERPRINT=$FINGERPRINT
8288 MANUFACTURER=Google
Original file line number Diff line number Diff line change @@ -64,8 +64,8 @@ FI_URL="https://developer.android.com$(grep -o 'href=".*download.*"' PIXEL_LATES
6464download " $FI_URL " PIXEL_FI_HTML
6565
6666# Extract device information
67- MODEL_LIST=" $( grep -A1 ' tr id=' PIXEL_FI_HTML | grep ' td' | sed ' s;.*<td>\(.*\)</td>;\1;' ) "
68- PRODUCT_LIST=" $( grep -o ' tr id="[^"]*" ' PIXEL_FI_HTML | awk -F \" ' {print $2 "_beta"} ' ) "
67+ MODEL_LIST=" $( grep -A1 ' tr id=' PIXEL_FI_HTML | grep ' td' | sed ' s;.*<td>\(.*\)</td>.* ;\1;' ) " ;
68+ PRODUCT_LIST=" $( grep ' tr id=' PIXEL_FI_HTML | sed ' s;.*<tr id="\(.*\)">.*;\1_beta; ' ) " ;
6969
7070# List available devices
7171if [ " $1 " = " --list" ] || [ " $1 " = " -l" ]; then
@@ -97,11 +97,17 @@ CANARY_ID="$(grep '"id"' PIXEL_CANARY_JSON | sed -e 's;.*canary-\(.*\)".*;\1;' -
9797SECURITY_PATCH=" $( grep " <td>$CANARY_ID " PIXEL_SECBULL_HTML | sed ' s;.*<td>\(.*\)</td>;\1;' ) "
9898
9999# Validate required field to prevent empty pif.prop
100- if [ -z " $ID " ] || [ -z " $INCREMENTAL " ] || [ -z " $SECURITY_PATCH " ] ; then
100+ if [ -z " $ID " ] || [ -z " $INCREMENTAL " ]; then
101101 echo " ! Failed to get pif.prop"
102102 exit 1
103103fi
104104
105+ if [ -z " $SECURITY_PATCH " ]; then
106+ echo " ! Failed to determine exact security patch level"
107+ echo " - Assuming probable security patch level from Canary build info"
108+ SECURITY_PATCH=" ${CANARY_ID} -05"
109+ fi
110+
105111# Preserve previous setting
106112spoofConfig=" spoofBuild spoofProps spoofProvider spoofSignature spoofVendingBuild spoofVendingSdk DEBUG"
107113for config in $spoofConfig ; do
You can’t perform that action at this time.
0 commit comments