0

I was trying to use on dex tools to look on high level overview of classes and methods on android dex file (classes.dex) But i found the following error when i use dexdump

dexdump -d classes.dex | less

dexdump: command not found

Can someone help me please?

Thanks.

H.Mel
  • 41
  • 6

1 Answers1

2

to invoke it directly you need to have the full qualified path to PATH and it is not. On my machine is located under build-tools/{version}. E.g.

./build-tools/19.0.1/dexdump
./build-tools/19.1.0/dexdump
./build-tools/20.0.0/dexdump
./build-tools/21.0.2/dexdump
./build-tools/21.1.1/dexdump
./build-tools/21.1.2/dexdump
./build-tools/22.0.1/dexdump
./build-tools/23.0.1/dexdump
./build-tools/23.0.2/dexdump

what you can do is to cd in your sdk directory and look for it

find . -name dexdump

and then prepend the relative path to the command, like build-tools/19.0.1/dexdump, or use the full qualified path like /path/to/sdk/build-tools/19.0.1/dexdump

or in your case

/path/to/sdk/build-tools/19.0.1/dexdump -d classes.dex | less
Blackbelt
  • 156,034
  • 29
  • 297
  • 305
  • Thanks. But that was what I did. I just run the command being in the directory where dexdump resides. No command 'dexdump' found, did you mean: Command 'hexdump' from package 'bsdmainutils' (main) Command 'devdump' from package 'genisoimage' (main) Command 'derdump' from package 'libnss3-tools' (main) dexdump: command not found .......is what I got. @Blackbelt – H.Mel Nov 29 '15 at 19:57
  • if you are inside the same directory you have to use `./dexdump` . Please note `./` before `dexdump` – Blackbelt Nov 29 '15 at 19:59