Commit 8b4543c2 authored by José Henrique's avatar José Henrique
Browse files

Fix apex signing

parent 1ac9c1c8
......@@ -40,9 +40,11 @@ def create_release_zip(post_build_env_vars):
if post_build_env_vars["production"]:
print("Signing apks...")
needs_apex_signing = post_build_env_vars["version"] == "eleven"
sign_target_files_apks(
post_build_env_vars["unsigned_target_files_path"],
target_files_path)
target_files_path,
needs_apex_signing)
print("Creating release zip file...")
ota_from_target_files(
......
......@@ -17,7 +17,9 @@ def run_command(cmd):
return int(bin(result).replace("0b", "").rjust(16, '0')[:8], 2)
def sign_target_files_apks(unsigned_target_files_path, dest_target_files_path):
def sign_target_files_apks(unsigned_target_files_path, dest_target_files_path, needs_apex_signing):
signing_keys_dir = "signing_keys/default"
cmd = "python2 build/make/tools/releasetools/sign_target_files_apks"
modules_to_skip = [
"AndroidPlatformServices.apk",
"PrebuiltGmsCoreRvc_AdsDynamite.apk",
......@@ -28,10 +30,19 @@ def sign_target_files_apks(unsigned_target_files_path, dest_target_files_path):
"PrebuiltGmsCoreRvc_MapsDynamite.apk",
"PrebuiltGmsCoreRvc_MeasurementDynamite.apk"
]
signing_keys_dir = "signing_keys/default"
cmd = "python2 build/make/tools/releasetools/sign_target_files_apks"
for module in modules_to_skip:
cmd += " -e " + module + "="
if needs_apex_signing:
modules_to_sign = [
"com.android.art.release.apex=" + signing_keys_dir + "/releasekey",
"com.android.art.debug.apex=" + signing_keys_dir + "/releasekey",
"com.android.i18n.apex=" + signing_keys_dir + "/releasekey",
"com.android.runtime.apex=" + signing_keys_dir + "/releasekey",
"com.android.tethering.apex=" + signing_keys_dir + "/networkstack",
"com.android.vndk.current.apex=" + signing_keys_dir + "/releasekey"
]
for module in modules_to_sign:
cmd += " -e " + module
cmd += " -p out/host/linux-x86"
cmd += " -o -d " + signing_keys_dir
cmd += " " + unsigned_target_files_path
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment