Android developmenttools 20100424

1,886 views
1,782 views

Published on

http://www.sfandroid.org/calendar/13050451/

0 Comments
4 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,886
On SlideShare
0
From Embeds
0
Number of Embeds
16
Actions
Shares
0
Downloads
44
Comments
0
Likes
4
Embeds 0
No embeds

No notes for slide

Android developmenttools 20100424

  1. 1. Android Development Tools Debugging / Profiling Joachim Pfeiffer joachim.pfeiffer at gmail dot com San Francisco Android User’s Group 27 April 2010
  2. 2. Presentation Topics <ul><li>Resources </li></ul><ul><li>Android Debug Bridge (adb) </li></ul><ul><li>sqlite3 </li></ul><ul><li>Dalvik Debug Monitor Service (ddms) </li></ul><ul><li>Traceview </li></ul><ul><li>Emulator (focus on dev tools) </li></ul><ul><li>Discussion </li></ul>
  3. 3. Resources <ul><li>Google Android Developer Guide http:// developer.android.com/guide/developing/tools/index.html </li></ul><ul><li>Google I/O 2009 session videos Mattson: http://code.google.com/events/io/2009/sessions/DebuggingArtsNinjaMasters.html Guy: http://code.google.com/events/io/2009/sessions/TurboChargeUiAndroidFast.html </li></ul>
  4. 4. Android Developer Bridge (adb) <ul><li>Launch from CLI, e.g. Cygwin </li></ul><ul><li>Install / uninstall apps $adb install , adb uninstall </li></ul><ul><li>Push / pull files $ adb push , adb pull </li></ul><ul><li>Pull logs $ adb logcat </li></ul><ul><li>Attach jdb $ adb jdwp:<process> </li></ul><ul><li>Start remote shell $ adb shell Run shell commands. Use at own risk </li></ul>
  5. 5. sqlite3 <ul><li>Access through adb remote shell </li></ul><ul><li>Run SQL commands on SQLite databases </li></ul><ul><li>Similar to MySQL or Oracle SQL*Plus </li></ul><ul><li>Example: </li></ul>
  6. 6. Dalvik Debug Monitor Service (ddms) <ul><li>Screen capture </li></ul><ul><li>Thread and heap information </li></ul><ul><li>Logcat </li></ul><ul><li>System info </li></ul><ul><li>Call and location data spoofing </li></ul><ul><li>Launch Traceview from ddms </li></ul>
  7. 7. Dalvik Debug Monitor Service (ddms)
  8. 8. Dalvik Debug Monitor Service (ddms) <ul><li>Threads of a selected process </li></ul>
  9. 9. Dalvik Debug Monitor Service (ddms) <ul><li>Heap of a selected process </li></ul>
  10. 10. Dalvik Debug Monitor Service (ddms) <ul><li>Logcat with save-to-file </li></ul>
  11. 11. Dalvik Debug Monitor Service (ddms) <ul><li>System info </li></ul>
  12. 12. Dalvik Debug Monitor Service (ddms) <ul><li>Call and location data spoofing -> Run simulations for emulator </li></ul>
  13. 13. Traceview <ul><li>Launch from ddms </li></ul>
  14. 14. Traceview <ul><li>Record method invocations over a selected time period. For each method: - Percentage of time used - Number of calls - Average time / call </li></ul><ul><li>Drill down: - Show parent callers - Show children called - Magnify time scale </li></ul>
  15. 15. Traceview
  16. 16. Traceview
  17. 17. Traceview <ul><li>Insert expensive code, in drawStop(): </li></ul>
  18. 18. Traceview
  19. 19. Emulator (focus on dev tools) <ul><li>Emulator development tools are provided in a separate app, DevTools </li></ul><ul><li>Variety of functions, such as show processes, CPU utilization on screen (you’re probably better off using ddms) </li></ul><ul><li>Most useful component: Show screen updates </li></ul>
  20. 20. The End <ul><li>Discussion… </li></ul>

×