There are 7 options to capture heap dumps. jmap tool under <JAVA_HOME>\bin folder is an effective option. It can be invoked using command:
jmap -dump:format=b,file=<heap-dump-file-path> <process-id>
This article walks you through various options and steps to capture android heap dumps.
We parse multiple heap dump formats. But still, we keep uncovering new formats of heap dumps. If you can email your heap dump to email@example.com, we will enhance the tool to parse it.
Yes, the tool can parse binary and text format of heap dumps generated by both Java and Android platforms.