pxb1988/dex2jar · error · HelpException

<core.xxxx> is required.

Error message

<core.xxxx> is required.

What it means

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.

Solutions

  1. Re-run extract-odex-from-coredump with the path to the core dump as the single positional argument
  2. Verify the core file exists and is readable before passing it
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at dex-tools/src/main/java/com/googlecode/dex2jar/tools/ExtractOdexFromCoredumpCmd.java:25 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of pxb1988/dex2jar@b5bda4fb49 (2026-09-08). Data as JSON: /api/errors/6de20907798fa638. Report an issue: GitHub.

Appendix: source

Thrown at dex-tools/src/main/java/com/googlecode/dex2jar/tools/ExtractOdexFromCoredumpCmd.java:25

import java.nio.IntBuffer;
import java.nio.channels.FileChannel;
import java.nio.channels.SeekableByteChannel;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.StandardOpenOption;
import java.util.ArrayList;
import java.util.List;

@BaseCmd.Syntax(cmd = "extract-odex-from-coredump", syntax = "<core.xxxx>", desc = "Extract odex from dalvik memery core dump")
public class ExtractOdexFromCoredumpCmd extends BaseCmd {
    public static void main(String... args) {
        new ExtractOdexFromCoredumpCmd().doMain(args);
    }

    @Override
    protected void doCommandLine() throws Exception {
        if (remainingArgs.length < 1) {
            throw new HelpException("<core.xxxx> is required.");
        }
        Path core = new File(remainingArgs[0]).toPath();
        try (SeekableByteChannel channel = FileChannel.open(core, StandardOpenOption.READ);) {
            List<Long> possibleOdexs = findPossibleOdexLocation(channel);
            extractDex(channel, possibleOdexs, core.getFileName().toString());
        }
    }

    private static void extractDex(SeekableByteChannel channel, List<Long> possibleOdexs, String namePrefix) throws IOException {
        int dexIndex = 0;
        ByteBuffer odexHead = ByteBuffer.allocate(0x28).order(ByteOrder.LITTLE_ENDIAN);
        ByteBuffer copyBuff = ByteBuffer.allocate(512 * 1024).order(ByteOrder.LITTLE_ENDIAN);
        final int buffSize = 0x28 + 0x70;
        ByteBuffer head = ByteBuffer.allocate(buffSize).order(ByteOrder.LITTLE_ENDIAN); // odex+dex head
        for (long pos : possibleOdexs) {
            System.err.println(String.format(">> Check for %08x", pos));
            channel.position(pos);
            head.position(0);

View on GitHub (pinned to b5bda4fb49)