Support EMUI 9.0

This commit is contained in:
topjohnwu
2018-12-24 21:36:37 +08:00
parent 01344c451f
commit 3c6c0e6700
2 changed files with 19 additions and 10 deletions

View File

@ -68,8 +68,8 @@ find_block() {
for uevent in /sys/dev/block/*/uevent; do
local DEVNAME=`grep_prop DEVNAME $uevent`
local PARTNAME=`grep_prop PARTNAME $uevent`
for p in "$@"; do
if [ "`toupper $p`" = "`toupper $PARTNAME`" ]; then
for BLOCK in "$@"; do
if [ "`toupper $BLOCK`" = "`toupper $PARTNAME`" ]; then
echo /dev/block/$DEVNAME
return 0
fi
@ -185,9 +185,9 @@ run_migrations() {
find_boot_image() {
BOOTIMAGE=
if [ ! -z $SLOT ]; then
BOOTIMAGE=`find_block boot$SLOT ramdisk$SLOT`
BOOTIMAGE=`find_block ramdisk$SLOT recovery_ramdisk$SLOT boot$SLOT`
else
BOOTIMAGE=`find_block boot ramdisk boot_a kern-a android_boot kernel lnx bootimg`
BOOTIMAGE=`find_block ramdisk recovery_ramdisk boot boot_a kern-a android_boot kernel lnx bootimg`
fi
if [ -z $BOOTIMAGE ]; then
# Lets see what fstabs tells me