Test and Debug with Android Dev Tools <br />By Mike Wolfson<br />@mikewolfson<br />San Francisco, CA                      ...
Session Overview<br />Emulator<br />DDMS<br />ADB<br />Hierarchy Viewer<br />Other important tools<br />
Why are we here?<br />Fit and Finish<br />
Emulator - control<br />What it is<br />Capabilities<br />Limitations<br />SDK and AVD Manager<br />
Emulator - AVDs<br />What’s an Android Virtual Device?<br />Creating Custom AVDs<br />Using Skins<br />Speed it up<br />Di...
Emulator - AVDs<br />Hacking the emulator<br />Scale factor (0.1 – 3)<br />File system access (.androidavd)<br />Accessing...
Emulator - control<br />Key Commands: emulator –help-keys<br />Switch orientation: <br />Cntrl-F12; KEYPAD_9; Ctrl+Cmd+F11...
DDMS – Dalvik Debug Monitor Service<br />How DDMS Works<br />Starting DDMS<br />From Eclipse<br />From Command Line<br />D...
DDMS – Logs and output<br />Logcat<br />Different Levels<br />Viewing from DDMS<br />Controlling from command line<br />Ti...
DDMS – Logcat settings<br />V- Verbose<br />D- Debug<br />I – Info<br />W – Warning<br />E- Error<br />F- Fatal<br />S- Si...
DDMS – Memory and File Explorer<br />Memory<br />View Heap Usage<br />Tracking memory allocation<br />Threads<br />Garbage...
DDMS – Simulating Events & Extras<br />Simulate Events<br />Telephony (Status & Actions)<br />Location<br />Capture screen...
ADB –Android Device Bridge<br />What it is<br />Command control of device<br />adb devices<br />adb -s emulator-5556 insta...
ADB – Debugging<br />Emulator<br />Device<br />Install USB Driver<br />http://developer.android.com/sdk/oem-usb.html<br />...
Dev Tools App<br />Using the app<br />Run on emulator<br />Run on device<br />Settings<br />
Hierarchy Viewer<br />What it is<br />How to run<br />Layout View<br />Pixel Perfect View<br />Alternative: layoutopt tool...
Monkey Runner<br />Control via scripts<br />Testcontrol multiple devices at once<br />Functional and regression testing<br...
Other Tools<br />Traceview<br />Proguard<br />MonkeyRunner<br />Command Line<br />
Conclusion<br />Performance problems are bugs.  Find them quickly and easily – and fix them!<br />
Confused?<br />Questions?<br />@mikewolfson<br />
Upcoming SlideShare
Loading in …5
×

Android Development Tools Overview

2,988 views

Published on

This presentation details some of the most commonly used, and important tools used for Android development. This was a class given at AnDevCon.

0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
2,988
On SlideShare
0
From Embeds
0
Number of Embeds
13
Actions
Shares
0
Downloads
101
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Android Development Tools Overview

  1. 1. Test and Debug with Android Dev Tools <br />By Mike Wolfson<br />@mikewolfson<br />San Francisco, CA March 8, 2011<br />
  2. 2. Session Overview<br />Emulator<br />DDMS<br />ADB<br />Hierarchy Viewer<br />Other important tools<br />
  3. 3. Why are we here?<br />Fit and Finish<br />
  4. 4. Emulator - control<br />What it is<br />Capabilities<br />Limitations<br />SDK and AVD Manager<br />
  5. 5. Emulator - AVDs<br />What’s an Android Virtual Device?<br />Creating Custom AVDs<br />Using Skins<br />Speed it up<br />Disable boot & other animation<br />Leave it up<br />Honeycomb – change RAM to 1GB <br />Using “Snapshot” to save emulator state<br />
  6. 6. Emulator - AVDs<br />Hacking the emulator<br />Scale factor (0.1 – 3)<br />File system access (.androidavd)<br />Accessing the Market<br />http://developer.htc.com/google-io-device.html#s3<br />
  7. 7. Emulator - control<br />Key Commands: emulator –help-keys<br />Switch orientation: <br />Cntrl-F12; KEYPAD_9; Ctrl+Cmd+F11<br />Home: Home; Back: Esc<br />CallDial: F3<br />Camera: Ctrl-KEYPAD_5<br />Fullscreen Toggle: Alt-Enter<br />
  8. 8. DDMS – Dalvik Debug Monitor Service<br />How DDMS Works<br />Starting DDMS<br />From Eclipse<br />From Command Line<br />Devices<br />Tip: File>Preferences<br />
  9. 9. DDMS – Logs and output<br />Logcat<br />Different Levels<br />Viewing from DDMS<br />Controlling from command line<br />Tip<br />final static boolean DEBUG_MODE = false;if (DEBUG_MODE) Log.i(LOG_TAG,"Load level: " + mLevel);<br />
  10. 10. DDMS – Logcat settings<br />V- Verbose<br />D- Debug<br />I – Info<br />W – Warning<br />E- Error<br />F- Fatal<br />S- Silent<br />
  11. 11. DDMS – Memory and File Explorer<br />Memory<br />View Heap Usage<br />Tracking memory allocation<br />Threads<br />Garbage Collection<br />
  12. 12. DDMS – Simulating Events & Extras<br />Simulate Events<br />Telephony (Status & Actions)<br />Location<br />Capture screen images<br />File Explorer<br />
  13. 13. ADB –Android Device Bridge<br />What it is<br />Command control of device<br />adb devices<br />adb -s emulator-5556 install helloWorld.apk<br />adb install c:myappapp.apk<br />
  14. 14. ADB – Debugging<br />Emulator<br />Device<br />Install USB Driver<br />http://developer.android.com/sdk/oem-usb.html<br />On Device: Applications > Development, then enable USB debugging.<br />
  15. 15. Dev Tools App<br />Using the app<br />Run on emulator<br />Run on device<br />Settings<br />
  16. 16. Hierarchy Viewer<br />What it is<br />How to run<br />Layout View<br />Pixel Perfect View<br />Alternative: layoutopt tool<br />
  17. 17. Monkey Runner<br />Control via scripts<br />Testcontrol multiple devices at once<br />Functional and regression testing<br />The API<br />Running it<br />
  18. 18. Other Tools<br />Traceview<br />Proguard<br />MonkeyRunner<br />Command Line<br />
  19. 19. Conclusion<br />Performance problems are bugs. Find them quickly and easily – and fix them!<br />
  20. 20. Confused?<br />Questions?<br />@mikewolfson<br />

×