Skip to content

Commit f0db010

Browse files
committed
Check ro.product.device instead of ro.omni.device
sailfishos-oneplus5/hybris-installer@c99310d
1 parent 4ac9961 commit f0db010

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

boot-switcher/META-INF/com/google/android/update-binary

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,9 @@ abort() { ui_print "E$1: $2"; exit $1; }
2020

2121
# <<< TWRP init <<<
2222

23-
# >>> Custom functions >>>
24-
25-
# Verify device boardname validity (e.g. not unset, no spaces / uppercase chars)
26-
invalid_device() { [[ -z "$CURRENT_DEVICE" || "$CURRENT_DEVICE" = *" "* || `echo "$CURRENT_DEVICE" | grep -q [A-Z]` ]]; }
27-
28-
# <<< Custom functions <<<
29-
3023
# Constants & variables
3124
TARGET_DEVICES="cheeseburger dumpling"
32-
CURRENT_DEVICE=`getprop ro.omni.device`
25+
CURRENT_DEVICE=`getprop ro.product.device`
3326
ROOT="/data/.stowaways/sailfishos"
3427
PARTITION_PREFIX="/dev/block/bootdevice/by-name"
3528
PARTITION_BOOT="$PARTITION_PREFIX/boot"
@@ -38,8 +31,6 @@ PARTITION_VENDOR="$PARTITION_PREFIX/vendor"
3831
# >>> Sanity checks >>>
3932

4033
# Device
41-
invalid_device && CURRENT_DEVICE=`getprop ro.product.device`
42-
invalid_device && CURRENT_DEVICE=`getprop ro.build.product`
4334
echo $TARGET_DEVICES | grep -q $CURRENT_DEVICE || abort 7 "This package is for '$TARGET_DEVICES' devices; this is a '$CURRENT_DEVICE'."
4435

4536
# Treble

0 commit comments

Comments
 (0)