summaryrefslogtreecommitdiff
path: root/tools/releasetools/make_recovery_patch.py
diff options
context:
space:
mode:
Diffstat (limited to 'tools/releasetools/make_recovery_patch.py')
-rw-r--r--tools/releasetools/make_recovery_patch.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/tools/releasetools/make_recovery_patch.py b/tools/releasetools/make_recovery_patch.py
index 1497d69ed7..b52289b8a2 100644
--- a/tools/releasetools/make_recovery_patch.py
+++ b/tools/releasetools/make_recovery_patch.py
@@ -49,13 +49,19 @@ def main(argv):
board_uses_vendorimage = OPTIONS.info_dict.get(
"board_uses_vendorimage") == "true"
+ board_builds_vendorimage = OPTIONS.info_dict.get(
+ "board_builds_vendorimage") == "true"
+ target_files_dir = None
- if board_uses_vendorimage:
+ if board_builds_vendorimage:
target_files_dir = "VENDOR"
- else:
- target_files_dir = "SYSTEM"
+ elif not board_uses_vendorimage:
+ target_files_dir = "SYSTEM/vendor"
def output_sink(fn, data):
+ if target_files_dir is None:
+ return
+
with open(os.path.join(output_dir, target_files_dir,
*fn.split("/")), "wb") as f:
f.write(data)