Git Product home page Git Product logo

android-app-memory-analysis's Introduction

Android-App-Memory-Analysis

单纯使用 Meminfo 的数据,可以看到是哪部分比较大,但是没有具体的信息也不好分析,而 smaps 中则有比较详细的数据,此脚本就是结合 smaps 和 meminfo

脚本使用

知道 pid 直接解析(推荐)

注意 :需要手机有 Root 权限

python smaps_parser.py -p 21936 -o out.txt 

如果有现成的 smaps 文件

注意 :获取 smaps 文件需要手机有 Root 权限

  1. 获取对应进程的 smaps 文件
adb pull /proc/pid_of_app/smaps . 
  1. 执行解析脚本
python /smap/smaps_parser.py -f <path_of_smaps>

对比

Meminfo 数据

Meminfo 可以看到的数据

Meminfo

Smap 数据

Smaps 包含的数据

Smap

脚本解析后的视图

Smap

Smap

Sample

sample 文件夹里面包含了 Launcer 的数据,感兴趣的可以自己看一下

  1. smaps 文件
  2. meminfo 数据
  3. showmaps 数据
  4. smaps 经过解析后的文件

android-app-memory-analysis's People

Contributors

gracker avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.