From e70ef747a07d28c15cd7c97e463aca7957545074 Mon Sep 17 00:00:00 2001 From: LuK1337 Date: Wed, 19 Oct 2022 11:04:44 +0200 Subject: [PATCH] sdm845-common: releasetools: Fix android-info.txt parsing This unbreaks OTA generation. Change-Id: I93466279b2786d9dc6265afcb0ea264707e92b05 --- releasetools.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/releasetools.py b/releasetools.py index 2c19a3a..079a4bb 100644 --- a/releasetools.py +++ b/releasetools.py @@ -1,6 +1,6 @@ # Copyright (C) 2009 The Android Open Source Project # Copyright (c) 2011, The Linux Foundation. All rights reserved. -# Copyright (C) 2017-2020 The LineageOS Project +# Copyright (C) 2017-2022 The LineageOS Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -50,7 +50,7 @@ def OTA_InstallEnd(info): def AddTrustZoneAssertion(info, input_zip): android_info = info.input_zip.read("OTA/android-info.txt") - m = re.search(r'require\s+version-trustzone\s*=\s*(\S+)', android_info) + m = re.search(r'require\s+version-trustzone\s*=\s*(\S+)', android_info.decode('utf-8')) if m: versions = m.group(1).split('|') if len(versions) and '*' not in versions: