Reading the repo
Opening the box…
Reading the repo
Opening the box…
How to install on Linux
Saved setup from 18 h ago
Will it work on Linux?
tools/ foldercompileSdk = 37, targetSdk = 37, and demo version 1.1.0, while keeping Android 16 edge-to-edge handling and 16 KB page-size alignment for native .so output.dumpsys meminfo as the primary row ledger and attaches same-category smaps PSS/SwapPSS and mapping evidence to every comparable row. Memtrack rows remain explicitly non-comparable, while smaps-only input still reports native allocator, graphics, DMA-BUF, code, stack, and top mappings.exit_info.txt, memory_limiter_status.txt, package UID, process lists, Android release/sdk, build fingerprint, and page size before requiring PID-dependent artifacts.smaps collection, use fallback order for better device compatibility:
adb shell cat /proc/<pid>/smapsadb shell su -c "cat /proc/<pid>/smaps"adb shell su 0 cat /proc/<pid>/smapspidof is preferred for PID lookup, and ps -A parsing is used as fallback.git clone https://github.com/Gracker/Android-App-Memory-Analysis.git
cd Android-App-Memory-Analysis
# List running apps on connected device
python3 analyze.py live --list
# Dump and analyze a specific app
python3 analyze.py live --package com.example.app
# Quick mode (skip hprof for faster results)
python3 analyze.py live --package com.example.app --skip-hprof
# Dump only (no analysis)
python3 analyze.py live --package com.example.app --dump-only -o ./dumps
# Analyze existing dump directory
python3 analyze.py panorama -d ./dumps/com.example.app_20231225_120000
# Analyze individual files
python3 analyze.py panorama -m meminfo.txt -g gfxinfo.txt -H app.hprof -S smaps.txt
# Analyze privileged process mappings only
python3 analyze.py panorama -S smaps.txt --json -o smaps_panorama.json
# Analyze Java heap (HPROF)
python3 analyze.py hprof demo/hprof_sample/heapdump_latest.hprof.gz
# Analyze native memory (smaps)
python3 analyze.py smaps demo/smaps_sample/smaps
# Analyze meminfo
python3 analyze.py meminfo dump/meminfo.txt
# Analyze gfxinfo
python3 analyze.py gfxinfo dump/gfxinfo.txt
# Traditional combined analysis (HPROF + smaps)
python3 analyze.py combined -H demo/hprof_sample/heapdump_latest.hprof.gz -S demo/smaps_sample/smaps
# Enhanced combined analysis (meminfo-aware, mtrack included)
python3 analyze.py combined --modern --hprof demo/hprof_sample/heapdump_latest.hprof.gz --smaps demo/smaps_sample/smaps --meminfo demo/smaps_sample/meminfo.txt --json-output report.json
# One-command demo shortcut (built-in hprof+smaps+meminfo)
python3 analyze.py combined --demo --json-output demo_report.json
Notes:
combined defaults to legacy mode (combined_analyzer.py) unless --modern, --meminfo, --pid, --json-output, or --demo is provided.-p/--pid, the tool auto-collects smaps and tries to collect dumpsys meminfo -d.heapdump_latest.hprof.gz to avoid large-file push limits. The unified analyze.py entry point reads .hprof.gz directly. If an old sample path ending in .hprof is missing but a sibling .hprof.gz exists, it automatically falls back to the packaged sample.Then run bash setup.sh. It stops at the first error and is safe to run again. Servers and tests aren't started; it lists them at the end. Read it first.
git clone https://github.com/Gracker/Android-App-Memory-Analysis.git cd Android-App-Memory-Analysis
Python 3
sudo apt install python3 python3-pip
In the maintainers' order. Do the README instructions above first — they cover steps outside the terminal.
python3 analyze.py live --list python3 analyze.py live --package com.example.app python3 analyze.py live --package com.example.app --skip-hprof python3 analyze.py live --package com.example.app --dump-only -o ./dumps python3 analyze.py panorama -d ./dumps/com.example.app_20231225_120000 python3 analyze.py panorama -m meminfo.txt -g gfxinfo.txt -H app.hprof -S smaps.txt python3 analyze.py panorama -S smaps.txt --json -o smaps_panorama.json python3 analyze.py hprof demo/hprof_sample/heapdump_latest.hprof.gz python3 analyze.py smaps demo/smaps_sample/smaps python3 analyze.py meminfo dump/meminfo.txt python3 analyze.py gfxinfo dump/gfxinfo.txt python3 analyze.py combined -H demo/hprof_sample/heapdump_latest.hprof.gz -S demo/smaps_sample/smaps python3 analyze.py combined --modern --hprof demo/hprof_sample/heapdump_latest.hprof.gz --smaps demo/smaps_sample/smaps --meminfo demo/smaps_sample/meminfo.txt --json-output report.json python3 analyze.py combined --demo --json-output demo_report.json
No reports for Linux yet.
GitManual AI Agent reads the 2 key files and writes a step-by-step guide for Linux. Once written, it's saved for everyone.