Android常用调试命令

 

1、查看进程使用内存的情况

adb shell dumpsys meminfo <packagename>

例:

MY-MAC:~ xiaoyu$ adb shell dumpsys meminfo com.muzhiwan.market
Applications Memory Usage (kB):
Uptime: 6918199 Realtime: 7614790

** MEMINFO in pid 20390 [com.muzhiwan.market] **
                         Shared  Private     Heap     Heap     Heap
                   Pss    Dirty    Dirty     Size    Alloc     Free
                ------   ------   ------   ------   ------   ------
       Native       48       20       48     2736     2374      361
       Dalvik     1110     8520      856    10056     8683     1373
       Cursor        0        0        0                           
       Ashmem        0        0        0                           
    Other dev        4       32        0                           
     .so mmap      123      840       80                           
    .jar mmap        0        0        0                           
    .apk mmap        9        0        0                           
    .ttf mmap        0        0        0                           
    .dex mmap        2        0        0                           
   Other mmap      237      348       72                           
      Unknown     1384      796     1332                           
        TOTAL     2917    10556     2388    12792    11057     1734
 
 Objects
               Views:        0         ViewRootImpl:        0
         AppContexts:        4           Activities:        0
              Assets:        3        AssetManagers:        3
       Local Binders:        2        Proxy Binders:        9
    Death Recipients:        0
     OpenSSL Sockets:        0
 
 SQL
         MEMORY_USED:        0
  PAGECACHE_OVERFLOW:        0          MALLOC_SIZE:        0
 
 
 Asset Allocations
    zip:/data/app/com.muzhiwan.market-1.apk:/resources.arsc: 449K

 

 

2、

3、

4、

5、

 

郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。