{"record":{"id":"5d31e85e4fbbb48c","repo":"Tencent/tinker","slug":"unsupported-abi","errorCode":null,"errorMessage":"Unsupported abi: ","messagePattern":"Unsupported abi: ","errorType":"exception","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"tinker-android/tinker-android-loader-no-op/src/main/java/com/tencent/tinker/loader/shareutil/ShareTinkerInternals.java","lineNumber":141,"sourceCode":"                    currentInstructionSet = \"arm\";\n                    break;\n                case \"arm64-v8a\":\n                    currentInstructionSet = \"arm64\";\n                    break;\n                case \"x86\":\n                    currentInstructionSet = \"x86\";\n                    break;\n                case \"x86_64\":\n                    currentInstructionSet = \"x86_64\";\n                    break;\n                case \"mips\":\n                    currentInstructionSet = \"mips\";\n                    break;\n                case \"mips64\":\n                    currentInstructionSet = \"mips64\";\n                    break;\n                default:\n                    throw new IllegalStateException(\"Unsupported abi: \" + Build.CPU_ABI);\n            }\n        }\n        ShareTinkerLog.d(TAG, \"getCurrentInstructionSet:\" + currentInstructionSet);\n        return currentInstructionSet;\n    }\n\n    public static boolean isSystemOTA(String lastFingerPrint) {\n        String currentFingerprint = Build.FINGERPRINT;\n        if (TextUtils.isEmpty(lastFingerPrint) || TextUtils.isEmpty(currentFingerprint)) {\n            ShareTinkerLog.d(TAG, \"fingerprint empty:\" + lastFingerPrint + \",current:\" + currentFingerprint);\n            return false;\n        } else {\n            if (lastFingerPrint.equals(currentFingerprint)) {\n                ShareTinkerLog.d(TAG, \"same fingerprint:\" + currentFingerprint);\n                return false;\n            } else {\n                ShareTinkerLog.d(TAG, \"system OTA,fingerprint not equal:\" + lastFingerPrint + \",\" + currentFingerprint);\n                return true;","sourceCodeStart":123,"sourceCodeEnd":159,"githubUrl":"https://github.com/Tencent/tinker/blob/1b7ea02c239840f563ea64fb5bd286eb98d4011e/tinker-android/tinker-android-loader-no-op/src/main/java/com/tencent/tinker/loader/shareutil/ShareTinkerInternals.java#L123-L159","documentation":"ShareTinkerInternals.getCurrentInstructionSet maps Build.CPU_ABI to an instruction-set string via an explicit switch (armeabi->arm, x86, x86_64, mips, mips64, ...). Any ABI outside the known set falls to default and throws IllegalStateException('Unsupported abi: <Build.CPU_ABI>'). The ISA is required to build /oat/<isa>/ odex paths and to validate patch artifacts.","triggerScenarios":"Build.CPU_ABI returning an unmapped value: newer or OEM-specific ABI strings (e.g. 'armeabi-v7a' handled but exotic variants not), empty string on emulators, or deprecated-CPU_ABI behavior on API 21+ where the field can be unreliable; also 64-bit devices reporting the secondary ABI.","commonSituations":"New Android form factors or emulators with ABI strings the switch predates; multi-ABI devices where CPU_ABI does not match the running process's actual ISA; apps running under binary-translation layers (houdini/libndk) reporting translated ABIs.","solutions":["Log Build.CPU_ABI and Build.SUPPORTED_ABIS on the failing device to see the exact unmapped string.","Upgrade tinker — newer versions use SUPPORTED_ABIS / VMRuntime instead of the deprecated CPU_ABI field.","If you control the call path, derive the ISA from ShareOatUtil (reading the app's own odex) as fallback when this throws.","As a last resort on a known-good device class, extend the mapping locally (fork) to cover the missing ABI."],"exampleFix":"// before\ndefault:\n    throw new IllegalStateException(\"Unsupported abi: \" + Build.CPU_ABI);\n\n// after\ndefault:\n    if (Build.SUPPORTED_ABIS != null && Build.SUPPORTED_ABIS.length > 0) {\n        ShareTinkerLog.w(TAG, \"cpu_abi \" + Build.CPU_ABI + \" unmapped, using SUPPORTED_ABIS[0]\");\n        currentInstructionSet = mapAbi(Build.SUPPORTED_ABIS[0]);\n    } else {\n        throw new IllegalStateException(\"Unsupported abi: \" + Build.CPU_ABI);\n    }","handlingStrategy":"validation","validationCode":"Set<String> known = new HashSet<>(Arrays.asList(\"armeabi\",\"armeabi-v7a\",\"arm64-v8a\",\"x86\",\"x86_64\",\"mips\",\"mips64\"));\nif (!known.contains(Build.CPU_ABI)) { /* use SUPPORTED_ABIS or skip odex path */ }","typeGuard":"static boolean isSupportedAbi(String abi) { return Arrays.asList(\"armeabi\",\"armeabi-v7a\",\"arm64-v8a\",\"x86\",\"x86_64\",\"mips\",\"mips64\").contains(abi); }","tryCatchPattern":"catch IllegalStateException 'Unsupported abi' -> derive ISA from Build.SUPPORTED_ABIS[0] or from the app's own odex instead","preventionTips":["Log Build.CPU_ABI and SUPPORTED_ABIS on your device matrix to catch unmapped values early.","Prefer SUPPORTED_ABIS over the deprecated CPU_ABI on API 21+.","Upgrade tinker for updated ABI mapping."],"tags":["abi","instruction-set","compatibility","device-fragmentation"],"backgroundTag":null,"analyzedSha":"1b7ea02c239840f563ea64fb5bd286eb98d4011e","analyzedAt":"2026-08-14T15:16:52.110Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}