Use fstab in the source build

When generating incremental OTAs, we should use the fstab in the source
build instead of the target one. Similarly for recovery_mount_options.

Bug: 22011892
Change-Id: Ia02584c71af7d47835b1f62e7daa46f27940a545
(cherry picked from commit bebd3cfbf9)
This commit is contained in:
Tao Bao
2015-06-22 19:17:41 -07:00
parent c9fcdae29d
commit 34b47bf42b
2 changed files with 22 additions and 14 deletions

View File

@@ -486,8 +486,9 @@ def GetImage(which, tmpdir, info_dict):
def WriteFullOTAPackage(input_zip, output_zip):
# TODO: how to determine this? We don't know what version it will
# be installed on top of. For now, we expect the API just won't
# change very often.
# be installed on top of. For now, we expect the API just won't
# change very often. Similarly for fstab, it might have changed
# in the target build.
script = edify_generator.EdifyGenerator(3, OPTIONS.info_dict)
oem_props = OPTIONS.info_dict.get("oem_fingerprint_properties")
@@ -727,8 +728,9 @@ def WriteBlockIncrementalOTAPackage(target_zip, source_zip, output_zip):
if source_version == 0:
print ("WARNING: generating edify script for a source that "
"can't install it.")
script = edify_generator.EdifyGenerator(source_version,
OPTIONS.target_info_dict)
script = edify_generator.EdifyGenerator(
source_version, OPTIONS.target_info_dict,
fstab=OPTIONS.source_info_dict["fstab"])
metadata = {
"pre-device": GetBuildProp("ro.product.device",
@@ -794,7 +796,7 @@ def WriteBlockIncrementalOTAPackage(target_zip, source_zip, output_zip):
vendor_diff = None
oem_props = OPTIONS.target_info_dict.get("oem_fingerprint_properties")
recovery_mount_options = OPTIONS.target_info_dict.get(
recovery_mount_options = OPTIONS.source_info_dict.get(
"recovery_mount_options")
oem_dict = None
if oem_props is not None and len(oem_props) > 0:
@@ -1115,11 +1117,13 @@ def WriteIncrementalOTAPackage(target_zip, source_zip, output_zip):
if source_version == 0:
print ("WARNING: generating edify script for a source that "
"can't install it.")
script = edify_generator.EdifyGenerator(source_version,
OPTIONS.target_info_dict)
script = edify_generator.EdifyGenerator(
source_version, OPTIONS.target_info_dict,
fstab=OPTIONS.source_info_dict["fstab"])
oem_props = OPTIONS.info_dict.get("oem_fingerprint_properties")
recovery_mount_options = OPTIONS.info_dict.get("recovery_mount_options")
recovery_mount_options = OPTIONS.source_info_dict.get(
"recovery_mount_options")
oem_dict = None
if oem_props is not None and len(oem_props) > 0:
if OPTIONS.oem_source is None: