summaryrefslogtreecommitdiff
path: root/tools/releasetools/common.py
diff options
context:
space:
mode:
Diffstat (limited to 'tools/releasetools/common.py')
-rw-r--r--tools/releasetools/common.py10
1 files changed, 2 insertions, 8 deletions
diff --git a/tools/releasetools/common.py b/tools/releasetools/common.py
index fdb2e52341..7ef8d6e1f5 100644
--- a/tools/releasetools/common.py
+++ b/tools/releasetools/common.py
@@ -430,7 +430,7 @@ class BuildInfo(object):
"system_other"] = self._partition_fingerprints["system"]
# These two should be computed only after setting self._oem_props.
- self._device = self.GetOemProperty("ro.product.device")
+ self._device = info_dict.get("ota_override_device", self.GetOemProperty("ro.product.device"))
self._fingerprint = self.CalculateFingerprint()
check_fingerprint(self._fingerprint)
@@ -3564,12 +3564,10 @@ def MakeRecoveryPatch(input_dir, output_sink, recovery_img, boot_img,
# In this case, the output sink is rooted at VENDOR
recovery_img_path = "etc/recovery.img"
recovery_resource_dat_path = "VENDOR/etc/recovery-resource.dat"
- sh_dir = "bin"
else:
# In this case the output sink is rooted at SYSTEM
recovery_img_path = "vendor/etc/recovery.img"
recovery_resource_dat_path = "SYSTEM/vendor/etc/recovery-resource.dat"
- sh_dir = "vendor/bin"
if full_recovery_image:
output_sink(recovery_img_path, recovery_img.data)
@@ -3652,11 +3650,7 @@ fi
# The install script location moved from /system/etc to /system/bin in the L
# release. In the R release it is in VENDOR/bin or SYSTEM/vendor/bin.
- sh_location = os.path.join(sh_dir, "install-recovery.sh")
-
- logger.info("putting script in %s", sh_location)
-
- output_sink(sh_location, sh.encode())
+ output_sink("bin/install-recovery.sh", sh.encode())
class DynamicPartitionUpdate(object):