Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 38f05d83 authored by Andreas Gampe's avatar Andreas Gampe Committed by android-build-merger
Browse files

Otapreopt: Allow A/B dexopt only when bootcomplete am: 90ba9eb2

am: 3573f3e1

Change-Id: I80acef4f3c5a1c4c5d9ccd987f344d30f79c18ce
parents 3d786efd 3573f3e1
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -24,6 +24,19 @@ STATUS_FD="$2"
# Maximum number of packages/steps.
MAXIMUM_PACKAGES=1000

# First ensure the system is booted. This is to work around issues when cmd would
# infinitely loop trying to get a service manager (which will never come up in that
# mode). b/30797145
BOOT_PROPERTY_NAME="dev.bootcomplete"

BOOT_COMPLETE=$(getprop $BOOT_PROPERTY_NAME)
if [ "$BOOT_COMPLETE" != "1" ] ; then
  echo "Error: boot-complete not detected."
  # We must return 0 to not block sideload.
  exit 0
fi


# Compute target slot suffix.
# TODO: Once bootctl is not restricted, we should query from there. Or get this from
#       update_engine as a parameter.