fixSPL: More robust partition matching

OP6 has a partition called boot_aging. It would get matched instead of
boot_a when on slot A
This commit is contained in:
Pierre-Hugues Husson 2018-06-08 19:13:08 +02:00
parent 72e91c7933
commit c09149f86b

View File

@ -8,8 +8,8 @@ fixSPL() {
else
setprop ro.keymaster.mod 'AOSP on ARM64'
fi
img="$(find /dev/block -type l |grep by-name |grep /kernel$(getprop ro.boot.slot_suffix) |head -n 1)"
[ -z "$img" ] && img="$(find /dev/block -type l |grep by-name |grep /boot$(getprop ro.boot.slot_suffix) |head -n 1)"
img="$(find /dev/block -type l -name kernel$(getprop ro.boot.slot_suffix) |grep by-name |head -n 1)"
[ -z "$img" ] && img="$(find /dev/block -type l -name boot$(getprop ro.boot.slot_suffix) |grep by-name |head -n 1)"
if [ -n "$img" ];then
#Rewrite SPL/Android version if needed
Arelease="$(getSPL $img android)"