{"record":{"id":"0ac07b367045aa25","repo":"Tencent/tinker","slug":"unsupported-abi-0ac07b","errorCode":null,"errorMessage":"Unsupported abi: ","messagePattern":"Unsupported abi: ","errorType":"exception","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"tinker-android/tinker-android-loader/src/main/java/com/tencent/tinker/loader/shareutil/ShareTinkerInternals.java","lineNumber":147,"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 is32BitEnv() {\n        final String currISA = getCurrentInstructionSet();\n        return \"arm\".equals(currISA) || \"x86\".equals(currISA) || \"mips\".equals(currISA);\n    }\n\n    public static boolean isSystemOTA(String lastFingerPrint) {\n        String currentFingerprint = Build.FINGERPRINT;\n        if (lastFingerPrint == null\n            || lastFingerPrint.equals(\"\")\n            || currentFingerprint == null\n            || currentFingerprint.equals(\"\")) {\n            ShareTinkerLog.d(TAG, \"fingerprint empty:\" + lastFingerPrint + \",current:\" + currentFingerprint);","sourceCodeStart":129,"sourceCodeEnd":165,"githubUrl":"https://github.com/Tencent/tinker/blob/1b7ea02c239840f563ea64fb5bd286eb98d4011e/tinker-android/tinker-android-loader/src/main/java/com/tencent/tinker/loader/shareutil/ShareTinkerInternals.java#L129-L165","documentation":"ShareTinkerInternals.getCurrentInstructionSet maps Build.CPU_ABI to an instruction set string (arm, arm64, x86, x86_64, mips, mips64). An ABI outside this list throws IllegalStateException(\"Unsupported abi: \" + Build.CPU_ABI). The device reports an ABI the loader cannot translate into an odex ISA.","triggerScenarios":"Calling getCurrentInstructionSet (directly or via optimizedPathFor on Android O+) on a device whose Build.CPU_ABI is not one of the six known values.","commonSituations":"Newer ABIs on preview/exotic hardware (e.g. riscv64), emulators reporting unusual ABI strings, or 32-bit processes on devices where CPU_ABI reflects the 64-bit primary ABI.","solutions":["Log Build.CPU_ABI (and CPU_ABI2/SUPPORTED_ABIS) on affected devices to identify the unknown value.","Update Tinker to a version whose ABI map covers your devices (or patch the switch in a fork).","Constrain patch distribution to supported ABI device sets.","Catch IllegalStateException where instruction set feeds odex path computation and fall back to an ABI-derived mapping."],"exampleFix":"// before\ndefault:\n    throw new IllegalStateException(\"Unsupported abi: \" + Build.CPU_ABI);\n// after\ndefault:\n    String[] abis = Build.SUPPORTED_ABIS;\n    String mapped = mapKnownAbi(abis != null && abis.length > 0 ? abis[0] : null);\n    if (mapped != null) currentInstructionSet = mapped;\n    else throw new IllegalStateException(\"Unsupported abi: \" + Build.CPU_ABI);","handlingStrategy":"type-guard","validationCode":"String[] known = {\"armeabi\", \"armeabi-v7a\", \"arm64-v8a\", \"x86\", \"x86_64\", \"mips\", \"mips64\"};\nString abi = Build.CPU_ABI;\nif (abi == null || !Arrays.asList(known).contains(abi)) {\n    // unsupported ABI: skip odex/instruction-set dependent paths\n}","typeGuard":"static boolean isSupportedAbi(String abi) {\n    if (abi == null) return false;\n    switch (abi) {\n        case \"armeabi\":\n        case \"armeabi-v7a\":\n        case \"arm64-v8a\":\n        case \"x86\":\n        case \"x86_64\":\n        case \"mips\":\n        case \"mips64\":\n            return true;\n        default:\n            return false;\n    }\n}","tryCatchPattern":"try {\n    String isa = ShareTinkerInternals.getCurrentInstructionSet();\n} catch (IllegalStateException e) {\n    // 'Unsupported abi': device ABI unknown to this Tinker version\n}","preventionTips":["Gate patch rollout by device ABI using your distribution backend.","Log Build.SUPPORTED_ABIS from crash reports to detect new ABIs early.","Upgrade Tinker when adopting new architectures (e.g. riscv64)."],"tags":["android","tinker","abi","instruction-set","compatibility"],"backgroundTag":null,"analyzedSha":"1b7ea02c239840f563ea64fb5bd286eb98d4011e","analyzedAt":"2026-08-14T15:16:52.110Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}