add an additional permission to your app <uses-permission android:name=”android.permission.write_external_storage” /> to your manifest create hprof protected void ondestroy() { super.ondestroy(); try { debug.dumphprofdata(“/sdcard/data.hprof”); } catch (exception e) { log.e(“xy”, “couldn’t dump hprof”); } } or alternatively create a hprof file with: adb shell ps | grep yourpackage; adb shell kill
![Viewing hprof From Android With JVisualVM - DZone Java](https://cdn-ak-scissors.b.st-hatena.com/image/square/89110f060779fc2fc0597d3b193969d9b4cfe834/height=288;version=1;width=512/https%3A%2F%2Fdzone.com%2Fthemes%2Fdz20%2Fimages%2FArticleImg_10.jpg)