From 73d5abbd3f26d086ab4082f66b322f28a32bf7e5 Mon Sep 17 00:00:00 2001 From: Andrew Boie Date: Wed, 11 Dec 2013 12:42:03 -0800 Subject: [PATCH] sign_target_files_apks: rewrite build.prop correctly in eng builds In eng builds, ro.display.id has many space separated items and was resulting in an error when trying to rewrite it as 'value' gets turned into a list and never converted back to a string. Change-Id: I6c8633ed2eb52c56a4097992a32d53d80df4f844 Signed-off-by: Andrew Boie --- tools/releasetools/sign_target_files_apks | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/releasetools/sign_target_files_apks b/tools/releasetools/sign_target_files_apks index 00693b83a..ab2470650 100755 --- a/tools/releasetools/sign_target_files_apks +++ b/tools/releasetools/sign_target_files_apks @@ -235,8 +235,9 @@ def RewriteProps(data): elif key == "ro.build.display.id": # change, eg, "JWR66N dev-keys" to "JWR66N" value = value.split() - if len(value) == 2 and value[1].endswith("-keys"): - value = value[0] + if len(value) > 1 and value[-1].endswith("-keys"): + value.pop() + value = " ".join(value) line = key + "=" + value if line != original_line: print " replace: ", original_line