Android System Debug Tools

Android is built on top of Linux, so many Linux tools can be leveraged. For example, to show the applications currently running and the resources they are using, the top command can be used. The following command can be issued at the command line when a device is connected to a host computer through USB cable or the emulator is running:

> adb shell top

An example output from this command is shown in Figure 12.9.

The top command also shows the percentage of CPU and memory used in the overall system.

Another important tool is ps, which lists all the processes currently running on the Android system:

> adb shell ps

An example output from this command is shown in Figure 12.10.

Figure 12.10 Sample output from the ps command.

This provides the process ID (PID) and user ID of each running process. Memory allocation can be seen using dumpsys: > adb shell dumpsys meminfo <package name>

An example output from this command is shown in Figure 12.11.

nelsontos-MacBook-

Pro

tools

nto$ ./adb shell

dumpsys 2B4

Can't find service

: 284

nelsontos-MacBook-

Pro

tools

nto$ ./adb shell

dumpsys meminfo com.facebook.android

Applications Memory Usage (kB):

Uptime: 63486347

Realtime:

634B6347

** MEMINFO in pid

284

[com.

facebook.android]

**

native

dalvik other

total

size

3952

3719 N/A

7671

allocated

3325

2621 N/A

5946

free

42

1098 N/A

1140

(Pss)

790

1978 1038

3806

(shared dirty}

1532

4160 1060

6752

(priv dirty)

684

1184 708

2576

Objects

Views

0

ViewRoots:

0

AppContexts

0

Activities:

0

Assets

2

AssetManagers:

2

Local Binders

5

Proxy Binders:

9

Death Recipients

0

OpenSSL Sockets

0

SQL

heap

0

memoryUsed:

0

pageCacheOverflo

0

largestMemAlloc:

0

Asset Allocations

zip:/data/app/com

facebook.android-2. apk:

/resources.arse: 3K

nelsontos-MacBook-

Pro

tools

nto$ 1

Fan Page Dollars 2

Fan Page Dollars 2

In this course I am going to show you brand new, hidden strategies of making money from Facebook Fan pages. Now if you purchased Fan page Dollars 1 you will have noticed that I talked about lots of different strategies of making money from Facebook Fan pages and how to get fans in a short space of time.

Get My Free Ebook


Post a comment