diff options
author | Rupert Shuttleworth <ruperts@google.com> | 2020-12-08 06:18:35 +0000 |
---|---|---|
committer | Rupert Shuttleworth <ruperts@google.com> | 2020-12-08 10:03:34 +0000 |
commit | 729427460bf8e9095cdd3fccfe3e7af6bd212a79 (patch) | |
tree | 9e0c11fa7a703360a3d5258be0fdf71670752ca0 | |
parent | 33571ac8dd96b1b467bf00ecf88e72e4cb3625dd (diff) | |
download | build-729427460bf8e9095cdd3fccfe3e7af6bd212a79.tar.gz |
Ensure file permissions are writable before attempting to sign.
Test: Manually using USE_BAZEL=1 use_rbe m dist (fixes a build error).
Change-Id: I1aac185f12ac430514c975103547ce211ea6c99e
-rw-r--r-- | tools/releasetools/add_img_to_target_files.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/releasetools/add_img_to_target_files.py b/tools/releasetools/add_img_to_target_files.py index d836d6566f..5f35d78f91 100644 --- a/tools/releasetools/add_img_to_target_files.py +++ b/tools/releasetools/add_img_to_target_files.py @@ -51,6 +51,7 @@ import logging import os import shlex import shutil +import stat import sys import uuid import zipfile @@ -330,6 +331,9 @@ def AddDtbo(output_zip): # AVB-sign the image as needed. if OPTIONS.info_dict.get("avb_enable") == "true": + # Signing requires +w + os.chmod(img.name, os.stat(img.name).st_mode | stat.S_IWUSR) + avbtool = OPTIONS.info_dict["avb_avbtool"] part_size = OPTIONS.info_dict["dtbo_size"] # The AVB hash footer will be replaced if already present. |