I just wanted to close off this thread in case anyone else is trying to do the same thing.
I was finally able to track down the memory-leak in the Chromoting app - the video decoder was not being destroyed after disconnecting from the host.
The write-denied problem was solved by putting the device into SELinux "permissive" mode: adb shell setenforce 0
Analyzing the dumps was tricky at first, but was solved once I realized a couple of things:
For non-Chrome binaries, you have to use the "--alternative-dirs" option to dmprof. And you have to do that in every dmprof command, particularly the first, otherwise dmprof will cache some bogus data and use it in subsequent commands.
You can follow the examples given in the
docs, but you have to adjust both sides of the mapping. You have to explore the files on your device, and the files in your local output directory, to figure out the correct mapping.
The other problem was that "policies" are not explained very well in the docs. It seems they are specific to debugging Chrome. Since I was debugging something that wasn't Chrome, I simply ignored the policies and just chose a random one (such as "policy.android.browser") whenever a dmprof command required me to specify one. I think the policies just control how the allocations are bucketed. The result was that all the allocations ended up in a single generic bucket, but that didn't matter to me.