{"record":{"id":"6de20907798fa638","repo":"pxb1988/dex2jar","slug":"core-xxxx-is-required","errorCode":null,"errorMessage":"<core.xxxx> is required.","messagePattern":"<core\\.xxxx> is required\\.","errorType":"exception","errorClass":"HelpException","httpStatus":null,"severity":"error","filePath":"dex-tools/src/main/java/com/googlecode/dex2jar/tools/ExtractOdexFromCoredumpCmd.java","lineNumber":25,"sourceCode":"import java.nio.IntBuffer;\nimport java.nio.channels.FileChannel;\nimport java.nio.channels.SeekableByteChannel;\nimport java.nio.file.Files;\nimport java.nio.file.Path;\nimport java.nio.file.StandardOpenOption;\nimport java.util.ArrayList;\nimport java.util.List;\n\n@BaseCmd.Syntax(cmd = \"extract-odex-from-coredump\", syntax = \"<core.xxxx>\", desc = \"Extract odex from dalvik memery core dump\")\npublic class ExtractOdexFromCoredumpCmd extends BaseCmd {\n    public static void main(String... args) {\n        new ExtractOdexFromCoredumpCmd().doMain(args);\n    }\n\n    @Override\n    protected void doCommandLine() throws Exception {\n        if (remainingArgs.length < 1) {\n            throw new HelpException(\"<core.xxxx> is required.\");\n        }\n        Path core = new File(remainingArgs[0]).toPath();\n        try (SeekableByteChannel channel = FileChannel.open(core, StandardOpenOption.READ);) {\n            List<Long> possibleOdexs = findPossibleOdexLocation(channel);\n            extractDex(channel, possibleOdexs, core.getFileName().toString());\n        }\n    }\n\n    private static void extractDex(SeekableByteChannel channel, List<Long> possibleOdexs, String namePrefix) throws IOException {\n        int dexIndex = 0;\n        ByteBuffer odexHead = ByteBuffer.allocate(0x28).order(ByteOrder.LITTLE_ENDIAN);\n        ByteBuffer copyBuff = ByteBuffer.allocate(512 * 1024).order(ByteOrder.LITTLE_ENDIAN);\n        final int buffSize = 0x28 + 0x70;\n        ByteBuffer head = ByteBuffer.allocate(buffSize).order(ByteOrder.LITTLE_ENDIAN); // odex+dex head\n        for (long pos : possibleOdexs) {\n            System.err.println(String.format(\">> Check for %08x\", pos));\n            channel.position(pos);\n            head.position(0);","sourceCodeStart":7,"sourceCodeEnd":43,"githubUrl":"https://github.com/pxb1988/dex2jar/blob/b5bda4fb4935ae8b3869b422454ae3b3896c7bc1/dex-tools/src/main/java/com/googlecode/dex2jar/tools/ExtractOdexFromCoredumpCmd.java#L7-L43","documentation":"Usage guard in ExtractOdexFromCoredumpCmd.doCommandLine: the command was invoked without the required <core.xxxx> positional argument. The tool needs a dalvik memory core-dump file to scan for odex images, so it throws this HelpException (printing usage) instead of proceeding.","triggerScenarios":"Thrown at dex-tools/src/main/java/com/googlecode/dex2jar/tools/ExtractOdexFromCoredumpCmd.java:25 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Re-run extract-odex-from-coredump with the path to the core dump as the single positional argument","Verify the core file exists and is readable before passing it"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b5bda4fb4935ae8b3869b422454ae3b3896c7bc1","analyzedAt":"2026-09-08T00:44:01.258Z","contentChangedAt":"2026-09-08T00:44:01.258Z","schemaVersion":2},"datasetVersion":"2026-09-16T09:17:16.951Z"}