Merge "Ensure file permissions are writable before attempting to sign."
This commit is contained in:
@@ -51,6 +51,7 @@ import logging
|
|||||||
import os
|
import os
|
||||||
import shlex
|
import shlex
|
||||||
import shutil
|
import shutil
|
||||||
|
import stat
|
||||||
import sys
|
import sys
|
||||||
import uuid
|
import uuid
|
||||||
import zipfile
|
import zipfile
|
||||||
@@ -330,6 +331,9 @@ def AddDtbo(output_zip):
|
|||||||
|
|
||||||
# AVB-sign the image as needed.
|
# AVB-sign the image as needed.
|
||||||
if OPTIONS.info_dict.get("avb_enable") == "true":
|
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"]
|
avbtool = OPTIONS.info_dict["avb_avbtool"]
|
||||||
part_size = OPTIONS.info_dict["dtbo_size"]
|
part_size = OPTIONS.info_dict["dtbo_size"]
|
||||||
# The AVB hash footer will be replaced if already present.
|
# The AVB hash footer will be replaced if already present.
|
||||||
|
Reference in New Issue
Block a user