In my experience trying to track down memory leaks in Android is kind of difficult since I couldn't find a good tool that would record all allocation traffic. There's stuff that will capture a Java heap snapshot, some things will interpose malloc and free, but there's not really a one-stop thing that does both that I could find. The best option I could see was the profiler in Android Studio, which was super buggy and had very few correlation features :(
The tool mentioned in the article - Perfetto - does have heap allocation profiling capability.
It can be done in background/from CLI as well.
While this article is focused on the Java heap dump side of Perfetto, we do support both native and Java heap dumps in a single trace.
Recently we've also been investing into a new feature of the UI called Memscope (https://perfetto.dev/docs/visualization/memscope) to put this behind a one-click graphical interface which hides all the complex configuration options of Perfetto and "just works" collecting both Java heap dumps and native heap profiling.
On the analysis side, we then time align them and present it with a new exploration UI. This is still under very active development so it should continue getting better with time :)