From b7725c5cbb4232959bebef4c43be213cb69e4c7e Mon Sep 17 00:00:00 2001 From: Trey Moen <50057480+greatgitsby@users.noreply.github.com> Date: Thu, 7 May 2026 14:31:58 -0700 Subject: [PATCH] lpa: treat any AT+CCHO error as non-eUICC in is_euicc (#37979) --- system/hardware/tici/lpa.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/system/hardware/tici/lpa.py b/system/hardware/tici/lpa.py index 3b8a6c6a8..618d11e5d 100644 --- a/system/hardware/tici/lpa.py +++ b/system/hardware/tici/lpa.py @@ -774,13 +774,12 @@ class TiciLPA(LPABase): raise LPAError(f"EnableProfile failed: {PROFILE_ERROR_CODES.get(code, 'unknown')} (0x{code:02X})") def is_euicc(self) -> bool: - # +CCHO: -> eUICC; bare ERROR -> applet absent, non-eUICC; +CME ERROR -> applet - # exists but bus busy or modem in transient state, still eUICC. + # +CCHO: -> ISD-R applet present, eUICC. Any error -> non-eUICC. with self._acquire_lock(): try: lines = self._client.query(f'AT+CCHO="{ISDR_AID}"') - except RuntimeError as e: - return "+CME ERROR" in str(e) + except RuntimeError: + return False for line in lines: if line.startswith("+CCHO:") and (ch := line.split(":", 1)[1].strip()): try: