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

Commit 205a4c14 authored by Jiakai Zhang's avatar Jiakai Zhang
Browse files

Add OTA update hook for Pre-reboot Dexopt.

Bug: 311377497
Test: manual - Install an OTA package and see the hook called.
Change-Id: Ide8fd51b0490465940ce539195eeda56ccecef49
parent f3166e46
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -50,6 +50,12 @@ else
  exit 1
fi

if pm art on-ota-staged --slot "$TARGET_SLOT_SUFFIX"; then
  # Handled by Pre-reboot Dexopt.
  exit 0
fi
echo "Pre-reboot Dexopt not enabled. Fall back to otapreopt."

if [ "$(/system/bin/otapreopt_chroot --version)" != 2 ]; then
  # We require an updated chroot wrapper that reads dexopt commands from stdin.
  # Even if we kept compat with the old binary, the OTA preopt wouldn't work due