New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
run dump_classes_from_hprof.py KeyError #387
Comments
Hello, I apologize but it looks like this script has not been maintained or kept up to date. Therefore, it's unlikely to work on heap dumps from modern OS versions. We're likely to remove this soon, since we haven't been using it. |
@wsanville my android phone is xiaomi mix2 ,android version 8.0,is cause of android version ?for modern OS versions what should I do now?dump heap from a lower os version? |
Yeah, the script doesn't support android 8. I think the script was written back when most android phones were 4.x. So it's pretty out of date. |
@justinjhendrick Is that interdex option also worked at modern version? if I dump from lower version like 5.x or 4.x version ,is that dump from 5.x also ok?cause my oldest os version is 5.1. lower version dump analyzed by this script also worked at modern os version like android 8.0? |
I dump from 5.1.1 also run error since now dump not work at modern os version ,just run redex path/to/your.apk -o path/to/output.apk use default config is OK right? |
Interdex should work okay on any android version. A dump from an older phone should still work on a newer phone (though, I doubt the optimal order is the same across many OS versions). I'm not sure where that script works. My guess is that it might only work on 4.x devices. |
I gave up Interdex cause I can't handle it ,doc seems very simple I can't generate a dump classes for interdex config ,do you have any sample? it seem compatibility not very well,now I can only use default config for redex |
What do you recommend to use as a replacement for this script? @justinjhendrick @wsanville |
I'd recommend building an instrumented version of your app that logs which classes are loaded (and in what order). Then you can use that data to generate a class list for interdex. |
We haven't updated this script, nor do we use it for a long time now. |
when I run dump_classes_from_hprof.py,wrong error as below
my python version is 2.7.15, os is macOS 10.14.2
and that is my command :python2 dump_classes_from_hprof.py --hprof mydump.hprof > list_of_classes.txt
what is this issue? anyone can help?
Traceback (most recent call last):
File "dump_classes_from_hprof.py", line 1265, in
hp = parse_filename(args.hprof)
File "dump_classes_from_hprof.py", line 57, in parse_filename
return parse_hprof_dump(open(filename, 'rb'))
File "dump_classes_from_hprof.py", line 49, in parse_hprof_dump
hprof_data.resolve()
File "dump_classes_from_hprof.py", line 889, in resolve
root.resolve(self)
File "dump_classes_from_hprof.py", line 304, in resolve
self.obj = hprof_data.object_id_dict[self.object_id]
KeyError: 328084648
and here is the my dump file
lenderdump.hprof.zip
The text was updated successfully, but these errors were encountered: