From fa9de0aae8b585c8f2f81da2921642c32523e4a2 Mon Sep 17 00:00:00 2001 From: Tao Bao Date: Mon, 18 Mar 2019 10:24:17 -0700 Subject: [PATCH] releasetools: Fix an issue when using APEX container key mapping. The keys_info in the touched code is a tuple, which is immutable. Bug: 123716522 Test: Run sign_target_files_apks.py with '-e foo.apex=bar' that replaces the APEX container key. Change-Id: I4e57e46c93a56b7f6646764d021ebb42c19bf7f5 --- tools/releasetools/sign_target_files_apks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/releasetools/sign_target_files_apks.py b/tools/releasetools/sign_target_files_apks.py index a9d22182b2..f1f032deaa 100755 --- a/tools/releasetools/sign_target_files_apks.py +++ b/tools/releasetools/sign_target_files_apks.py @@ -193,7 +193,7 @@ def GetApexKeys(keys_info, key_map): if apex not in keys_info: continue assert key, 'Presigned APEX container for {} is not allowed'.format(apex) - keys_info[apex][1] = key_map.get(key, key) + keys_info[apex] = (keys_info[apex][0], key_map.get(key, key)) return keys_info