Skip to content

Commit

Permalink
installer/addon: Check A/B partitioning with ro.build.ab_update instead
Browse files Browse the repository at this point in the history
  • Loading branch information
merothh committed Sep 5, 2020
1 parent 061bd6d commit 66629d3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 11 deletions.
4 changes: 2 additions & 2 deletions scripts/bkup_tail.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ EOF
}

mount_generic() {
local active_slot=$(getprop ro.boot.slot_suffix)
local device_abpartition=$(getprop ro.build.ab_update)
local partitions="$*"
if [ -z "$active_slot" ]; then
if [ -z "$device_abpartition" ]; then
# We're on an A only device
local partition
for partition in $partitions; do
Expand Down
11 changes: 2 additions & 9 deletions scripts/templates/installer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1063,15 +1063,8 @@ ui_print " "

# _____________________________________________________________________________________________________________________
# Detect A/B partition layout https://source.android.com/devices/tech/ota/ab_updates
# and system-as-root https://source.android.com/devices/bootloader/system-as-root
device_abpartition=false
system_as_root=`getprop ro.build.system_root_image`
if [ "$system_as_root" = "true" ]; then
active_slot=`getprop ro.boot.slot_suffix`
if [ ! -z "$active_slot" ]; then
device_abpartition=true
fi
fi
device_abpartition=$(getprop ro.build.ab_update)
[ -n "$device_abpartition" ] || device_abpartition=false

# _____________________________________________________________________________________________________________________
# Declare Variables
Expand Down

0 comments on commit 66629d3

Please sign in to comment.