hprof-tools icon indicating copy to clipboard operation
hprof-tools copied to clipboard

Deobfuscation tool only able to manipulate 4 byte IDs HPROFs

Open mfkasim opened this issue 8 years ago • 5 comments

Dears, I just taken a heap dump using jmap tool, and while i try to deobfuscate its content using the deobfuscation, it said that ids is 8 bytes which not supported. is there anyway to manipulate this file?

mfkasim avatar May 24 '16 10:05 mfkasim

Hi,

Thank you for trying out the deobfuscation tool! I'm sorry that it is not working for you, currently we only support 32-bit hprof files (that uses 4-bytes for all ids). The reason for this is that 32 bits is still the most common setup on Android.

Adding support for 64 bit hprof files will be quite a lot of work. I hope to do this in the future but due to other ongoing projects I don't think I can do it in the next could of months.

erikandre avatar Jun 01 '16 10:06 erikandre

Hi erlkandre Thanks for your reply. As i was in bad need for deobfuscating 64bit Heap dump, i modified the Hprof tools lib & deobfuscator to support 64bit ID. i converted the representation of the id from being hardcoded 4 byte Integer to a generic representation class which use array of bytes inside it. the good news is it working and tested with 64bit Heaps but still not tested with 32bit. once i finish it, i will send a pull request to you. thanks for your help and fast reply

mfkasim avatar Jun 02 '16 08:06 mfkasim

Wow! That is awesome! Thank you very much :)

erikandre avatar Jun 02 '16 08:06 erikandre

Dear erik, I just pushed my changes to my forked repo. it includes:

  1. the 8 bytes ID
  2. fixing issue when the heap dump only contains HEAP_DUMP tag.
  3. adding support for deobfuscating method names and arguments in thread stack traces

mfkasim avatar Jun 20 '16 11:06 mfkasim

hi,all image

when i compile use "gradlew hprof-viewer:jarWithDependencies",i met some error in the pictrue.

who can help me? thank you!

bending1 avatar Jul 04 '16 13:07 bending1