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

Commit 1250bcab authored by Kelvin Zhang's avatar Kelvin Zhang
Browse files

Allow user to manually override enable_vabc_xor

--enable_vabc_xor=false to disable, --enable_vabc_xor=true or
--enable_vabc_xor to enable

Also the flag is now enabled by default. But update_engine will
still ignore XOR ops, as update_engine support for XOR is WIP.

Test: th
Change-Id: I038b0dda5cc9efcc1620e72c858626b56ffb1611
parent 414ca429
Loading
Loading
Loading
Loading
+7 −3
Original line number Original line Diff line number Diff line
@@ -221,6 +221,10 @@ A/B OTA specific options
      For VABC downgrades, we must finish merging before doing data wipe, and
      For VABC downgrades, we must finish merging before doing data wipe, and
      since data wipe is required for downgrading OTA, this might cause long
      since data wipe is required for downgrading OTA, this might cause long
      wait time in recovery.
      wait time in recovery.

  --enable_vabc_xor
      Enable the VABC xor feature. Will reduce space requirements for OTA

"""
"""


from __future__ import print_function
from __future__ import print_function
@@ -286,7 +290,7 @@ OPTIONS.custom_images = {}
OPTIONS.disable_vabc = False
OPTIONS.disable_vabc = False
OPTIONS.spl_downgrade = False
OPTIONS.spl_downgrade = False
OPTIONS.vabc_downgrade = False
OPTIONS.vabc_downgrade = False
OPTIONS.enable_vabc_xor = False
OPTIONS.enable_vabc_xor = True


POSTINSTALL_CONFIG = 'META/postinstall_config.txt'
POSTINSTALL_CONFIG = 'META/postinstall_config.txt'
DYNAMIC_PARTITION_INFO = 'META/dynamic_partitions_info.txt'
DYNAMIC_PARTITION_INFO = 'META/dynamic_partitions_info.txt'
@@ -1312,7 +1316,7 @@ def main(argv):
    elif o == "--vabc_downgrade":
    elif o == "--vabc_downgrade":
      OPTIONS.vabc_downgrade = True
      OPTIONS.vabc_downgrade = True
    elif o == "--enable_vabc_xor":
    elif o == "--enable_vabc_xor":
      OPTIONS.enable_vabc_xor = True
      OPTIONS.enable_vabc_xor = a.lower() != "false"
    else:
    else:
      return False
      return False
    return True
    return True
@@ -1357,7 +1361,7 @@ def main(argv):
                                 "disable_vabc",
                                 "disable_vabc",
                                 "spl_downgrade",
                                 "spl_downgrade",
                                 "vabc_downgrade",
                                 "vabc_downgrade",
                                 "enable_vabc_xor",
                                 "enable_vabc_xor=",
                             ], extra_option_handler=option_handler)
                             ], extra_option_handler=option_handler)


  if len(args) != 2:
  if len(args) != 2: