mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-12-24 04:58:22 +00:00
parent
fef2da3c0b
commit
11102b4dd6
@ -165,7 +165,7 @@ recovery_cleanup() {
|
||||
# find_block [partname...]
|
||||
find_block() {
|
||||
for BLOCK in "$@"; do
|
||||
DEVICE=`find /dev/block -type l -iname $BLOCK | head -n 1` 2>/dev/null
|
||||
DEVICE=`find /dev \( -type b -o -type c -o -type l \) -iname $BLOCK | head -n 1` 2>/dev/null
|
||||
if [ ! -z $DEVICE ]; then
|
||||
readlink -f $DEVICE
|
||||
return 0
|
||||
@ -372,7 +372,7 @@ find_boot_image() {
|
||||
fi
|
||||
if [ -z $BOOTIMAGE ]; then
|
||||
# Lets see what fstabs tells me
|
||||
BOOTIMAGE=`grep -v '#' /etc/*fstab* | grep -E '/boot[^a-zA-Z]' | grep -oE '/dev/[a-zA-Z0-9_./-]*' | head -n 1`
|
||||
BOOTIMAGE=`grep -v '#' /etc/*fstab* | grep -E '/boot(img)?[^a-zA-Z]' | grep -oE '/dev/[a-zA-Z0-9_./-]*' | head -n 1`
|
||||
fi
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user