Common status codes

Updated at:

A patch is loaded in three stages: query, preload, and load. The common status codes for each stage are listed below.

    // Status codes compatible with earlier versions
    int CODE_LOAD_SUCCESS = 1; // Load stage: Success.
    int CODE_ERR_INBLACKLIST = 4; // Load stage: Failed. The device is not supported.
    int CODE_REQ_NOUPDATE = 6; // Query stage: No new patch is published.
    int CODE_REQ_NOTNEWEST = 7; // Query stage: The patch is not the latest version.
    int CODE_DOWNLOAD_SUCCESS = 9; // Query stage: The patch is downloaded.
    int CODE_DOWNLOAD_BROKEN = 10; // Query stage: The patch file is corrupted and failed to download.
    int CODE_UNZIP_FAIL = 11; // Query stage: Failed to decrypt the patch.
    int CODE_LOAD_RELAUNCH = 12; // Preload stage: A restart is required.
    int CODE_REQ_APPIDERR = 15; // Query stage: Abnormal appid.
    int CODE_REQ_SIGNERR = 16; // Query stage: Abnormal signature.
    int CODE_REQ_UNAVAIABLE = 17; // Query stage: Invalid system.
    int CODE_REQ_SYSTEMERR = 22; // Query stage: System exception.
    int CODE_REQ_CLEARPATCH = 18; // Query stage: One-click patch purge.
    int CODE_REQ_TOOFAST = 19; // The interval between two consecutive requests cannot be less than 3s.
    int CODE_PATCH_INVAILD = 20; // Load stage: Invalid patch format.
    // Status codes for the query stage
    int CODE_QUERY_UNDEFINED = 31; // Undefined exception.
    int CODE_QUERY_CONNECT = 32; // Connection exception.
    int CODE_QUERY_STREAM = 33; // Stream exception.
    int CODE_QUERY_EMPTY = 34; // Empty request exception.
    int CODE_QUERY_BROKEN = 35; // Request integrity check failed exception.
    int CODE_QUERY_PARSE = 36; // Request parsing exception.
    int CODE_QUERY_LACK = 37; // Request lacks required parameters exception.
    // Status codes for the preload stage
    int CODE_PRELOAD_SUCCESS = 100; // Preload successful.
    int CODE_PRELOAD_UNDEFINED = 101; // Undefined exception.
    int CODE_PRELOAD_HANDLE_DEX = 102; // dex loading exception.
    int CODE_PRELOAD_NOT_ZIP_FORMAT = 103; // Baseline dex is not in ZIP format exception.
    int CODE_PRELOAD_REMOVE_BASEDEX = 105; // Baseline dex processing exception.
    // Status codes for the load stage, which includes three parts: dex loading, resource loading, and lib loading.
    // dex loading
    int CODE_LOAD_UNDEFINED = 71; // Undefined exception.
    int CODE_LOAD_AES_DECRYPT = 72; // AES symmetric decryption exception.
    int CODE_LOAD_MFITEM = 73; // SOPHIX.MF file parsing exception.
    int CODE_LOAD_COPY_FILE = 74; // Patch copy exception.
    int CODE_LOAD_SIGNATURE = 75; // Patch signature verification exception.
    int CODE_LOAD_SOPHIX_VERSION = 76; // Patch and patch tool version mismatch exception.
    int CODE_LOAD_NOT_ZIP_FORMAT = 77; // Patch ZIP parsing exception.
    int CODE_LOAD_DELETE_OPT = 80; // Deleting invalid odex file exception.
    int CODE_LOAD_HANDLE_DEX = 81; // Loading dex exception.
    // Reflection call exceptions
    int CODE_LOAD_FIND_CLASS = 82;
    int CODE_LOAD_FIND_CONSTRUCTOR = 83;
    int CODE_LOAD_FIND_METHOD = 84;
    int CODE_LOAD_FIND_FIELD = 85;
    int CODE_LOAD_ILLEGAL_ACCESS = 86;
    // resource loading
    public static final int CODE_LOAD_RES_ADDASSERTPATH = 123; // Adding resource patch package exception.
    // lib loading
    int CODE_LOAD_LIB_UNDEFINED = 131; // Undefined exception.
    int CODE_LOAD_LIB_CPUABIS = 132; // Getting primaryCpuAbis exception.
    int CODE_LOAD_LIB_JSON = 133; // JSON format exception.
    int CODE_LOAD_LIB_LOST = 134; // Incomplete lib library exception.
    int CODE_LOAD_LIB_UNZIP = 135; // Decompression exception.
    int CODE_LOAD_LIB_INJECT = 136; // Injection exception.

You can use these status codes to identify problems. For more information, see Technical support.