Skip to content

Commit

Permalink
find_boot_image: test previous kernels (<=4.19)
Browse files Browse the repository at this point in the history
  • Loading branch information
vvb2060 authored and topjohnwu committed Aug 19, 2024
1 parent ab04c6a commit 4b724c7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/util_functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -371,9 +371,9 @@ find_boot_image() {
BOOTIMAGE=
if $RECOVERYMODE; then
BOOTIMAGE=$(find_block "recovery$SLOT" "sos")
elif [ -e "/dev/block/by-name/init_boot$SLOT" ] && uname -r | grep -vq "android12-"; then
elif [ -e "/dev/block/by-name/init_boot$SLOT" ] && [ "$(uname -r | cut -d. -f1)" -ge 5 ] && uname -r | grep -vq "android12-"; then
# init_boot is only used with GKI 13+. It is possible that some devices with init_boot
# partition still uses Android 12 GKI, so we need to explicitly detect that scenario.
# partition still uses Android 12 GKI or previous kernels, so we need to explicitly detect that scenario.
BOOTIMAGE="/dev/block/by-name/init_boot$SLOT"
elif [ -e "/dev/block/by-name/boot$SLOT" ]; then
# Standard location since AOSP Android 10+
Expand Down

0 comments on commit 4b724c7

Please sign in to comment.