Skip to content

Commit fef05fc

Browse files
committed
releasetools: Handle build description not ending in -keys
New motorola devices have extra text after -keys Issue: calyxos#3172 Change-Id: Ic6700b61be41f96be263c9c9363ecd050aa019eb
1 parent adb5003 commit fef05fc

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tools/releasetools/sign_target_files_apks.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1186,8 +1186,10 @@ def RewriteProps(data):
11861186
value = "/".join(pieces)
11871187
elif key == "ro.build.description":
11881188
pieces = value.split()
1189-
assert pieces[-1].endswith("-keys")
1190-
pieces[-1] = EditTags(pieces[-1])
1189+
for i in range(len(pieces) - 1, -1, -1):
1190+
if pieces[i].endswith("-keys"):
1191+
pieces[i] = EditTags(pieces[i])
1192+
break
11911193
value = " ".join(pieces)
11921194
elif key.startswith("ro.") and key.endswith(".build.tags"):
11931195
value = EditTags(value)

0 commit comments

Comments
 (0)