Tencent/tinker · error · IllegalStateException

Unsupported abi:

Error message

Unsupported abi: 

What it means

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.

Source

Thrown at tinker-android/tinker-android-loader-no-op/src/main/java/com/tencent/tinker/loader/shareutil/ShareTinkerInternals.java:141

                    currentInstructionSet = "arm";
                    break;
                case "arm64-v8a":
                    currentInstructionSet = "arm64";
                    break;
                case "x86":
                    currentInstructionSet = "x86";
                    break;
                case "x86_64":
                    currentInstructionSet = "x86_64";
                    break;
                case "mips":
                    currentInstructionSet = "mips";
                    break;
                case "mips64":
                    currentInstructionSet = "mips64";
                    break;
                default:
                    throw new IllegalStateException("Unsupported abi: " + Build.CPU_ABI);
            }
        }
        ShareTinkerLog.d(TAG, "getCurrentInstructionSet:" + currentInstructionSet);
        return currentInstructionSet;
    }

    public static boolean isSystemOTA(String lastFingerPrint) {
        String currentFingerprint = Build.FINGERPRINT;
        if (TextUtils.isEmpty(lastFingerPrint) || TextUtils.isEmpty(currentFingerprint)) {
            ShareTinkerLog.d(TAG, "fingerprint empty:" + lastFingerPrint + ",current:" + currentFingerprint);
            return false;
        } else {
            if (lastFingerPrint.equals(currentFingerprint)) {
                ShareTinkerLog.d(TAG, "same fingerprint:" + currentFingerprint);
                return false;
            } else {
                ShareTinkerLog.d(TAG, "system OTA,fingerprint not equal:" + lastFingerPrint + "," + currentFingerprint);
                return true;

View on GitHub (pinned to 1b7ea02c23)

Solutions

  1. Log Build.CPU_ABI and Build.SUPPORTED_ABIS on the failing device to see the exact unmapped string.
  2. Upgrade tinker — newer versions use SUPPORTED_ABIS / VMRuntime instead of the deprecated CPU_ABI field.
  3. If you control the call path, derive the ISA from ShareOatUtil (reading the app's own odex) as fallback when this throws.
  4. As a last resort on a known-good device class, extend the mapping locally (fork) to cover the missing ABI.

Example fix

// before
default:
    throw new IllegalStateException("Unsupported abi: " + Build.CPU_ABI);

// after
default:
    if (Build.SUPPORTED_ABIS != null && Build.SUPPORTED_ABIS.length > 0) {
        ShareTinkerLog.w(TAG, "cpu_abi " + Build.CPU_ABI + " unmapped, using SUPPORTED_ABIS[0]");
        currentInstructionSet = mapAbi(Build.SUPPORTED_ABIS[0]);
    } else {
        throw new IllegalStateException("Unsupported abi: " + Build.CPU_ABI);
    }
Defensive patterns

Strategy: validation

Validate before calling

Set<String> known = new HashSet<>(Arrays.asList("armeabi","armeabi-v7a","arm64-v8a","x86","x86_64","mips","mips64"));
if (!known.contains(Build.CPU_ABI)) { /* use SUPPORTED_ABIS or skip odex path */ }

Type guard

static boolean isSupportedAbi(String abi) { return Arrays.asList("armeabi","armeabi-v7a","arm64-v8a","x86","x86_64","mips","mips64").contains(abi); }

Try / catch

catch IllegalStateException 'Unsupported abi' -> derive ISA from Build.SUPPORTED_ABIS[0] or from the app's own odex instead

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


AI-assisted analysis of Tencent/tinker@1b7ea02c23 (2026-08-14). Data as JSON: /api/errors/5d31e85e4fbbb48c. Report an issue: GitHub.