Home

Awesome

No Maintenance Intended

Headless Android Heap Analyzer

“Ha Ha!” - Nelson

This repository is DEPRECATED

Introduction

HAHA is a Java library to automate the analysis of Android heap dumps.

This project is essentially a repackaging of the work of others to make it available as a small footprint Maven dependency.

Usage

To learn how to dump the heap, read the Android documentation. Here's an example:

File heapDumpFile = ...
Debug.dumpHprofData(heapDumpFile.getAbsolutePath());

After dumping the heap, use HAHA to parse and analyze it.

DataBuffer buffer = new MemoryMappedFileBuffer(heapDumpFile);
Snapshot snapshot = Snapshot.createSnapshot(buffer);

// The rest is up to you.
ClassObj someClass = snapshot.findClass("com.example.SomeClass");

Gradle config

dependencies {
  compile 'com.squareup.haha:haha:2.1'
}

Versions

HAHA 2.1

HAHA 2.0.4

This release separates out Trove4j from HAHA since Trove4j is available under LGPL 2.1 and HAHA is available under Apache 2.

HAHA 2.0, 2.0.1, 2.0.2, 2.0.3

HAHA 1.1, 1.2 and 1.3

Releasing

mvn release:prepare && mvn release:perform