Profiling is important for
mobile apps, in particular for the Android platform. This presentation summarizes the state
of the art in profiling Android applications as of Android version 4.3 "Jelly Bean"
2. What is Android?
• First Developed by Android, Inc., since 2005
part of Google
• JAVA because of support of Tool Support and
Open Source Activity [Bornstein2008]
• First Android phone was sold in October 2008
HTC Dream (aka G1) iPhone
06/2007
2
3. Latest Addition: Tablets
• With release of Nexus 7 2012 upsurge in
tablet market
• Android 4 – Design Guidelines
iPad
04/2010
3
4. Dalvik Executable
• Convert java .class files into .dex format
• dx: Java Bytecode -> an alternative instruction
set compatible with Dalvik VM.
Write an Android Applications in any language
that compile to .class
4
6. Why Profiling?
• When apps don’t perform as expected or
advertised, 99% of respondents said they
would take action: [Apigee2012]
Delete
immediately
33%
Delete if it
freeze > 30s
28%
Tell my peers
how bad it is
24%
Complain on
social media
15%
6
7. Example: Google I/O App 2012
• (https://code.google.com/p/iosched/)
Default state todayAfter network/API? limit 7
8. Google I/O App 2012
• Do you notice the difference?
≈ 5% CPU ≈ 80% CPU
8
9. Overview Profiling
From System profiling to UI Profiling:
On the device
Dalvik Debug Monitor
Static analysis
9
Eclipse
Android Monitor
Standalone
10. On the device (Developer options)
Monitoring>Show CPU usage Drawing>Show Layout bounds
10
12. Overview Profiling
• Dalvik Debug Monitor Server (DDMS)
• Running multiple Debugger Monitor sessions
through an USB cable?
DDMS
On the device
Static analysis
12
13. Remote Java Profiling
Client Device
adb adbd
TCP/IP over
USB Cable
DDMS JDWP
Android
Runtime
Application Framework
App1 App2Debugger Eclipse
Screengrab ...
vendor-
defined
packets
14
Debugger
Port: 8600