owf12/paug conf days android tools for developpeurs, paul marois, design and development engineer,...

19
Paul Marois - GenYmobile Android Tools for Developers

Upload: open-world-forum

Post on 10-Dec-2014

890 views

Category:

Documents


2 download

DESCRIPTION

 

TRANSCRIPT

Page 1: OWF12/PAUG Conf Days Android tools for developpeurs, paul marois, design and development engineer, genymobile

Paul Marois - GenYmobile

Android Tools for Developers

Page 2: OWF12/PAUG Conf Days Android tools for developpeurs, paul marois, design and development engineer, genymobile

Who Am I ?● Android Developer.● Android GENYMOBILE employee.

What this presentation will be ? ● A totally subjective presentation about official tools I find

interesting or useful.● Not about tools presented elsewhere in OWF.

Introduction

Page 3: OWF12/PAUG Conf Days Android tools for developpeurs, paul marois, design and development engineer, genymobile

Emulator

Page 4: OWF12/PAUG Conf Days Android tools for developpeurs, paul marois, design and development engineer, genymobile

Latest addition

GPU Support● SDK tools > 17● emulator -avd <avd_name> -gpu on

Improved CPU performance

More hardware feature emulation● SDKController in tools/apps/● adb forward tcp:1970 localabstract:android.sdk.controller

○ MultiTouch Input Emulation○ Sensor Emulation

Emulator

Page 5: OWF12/PAUG Conf Days Android tools for developpeurs, paul marois, design and development engineer, genymobile

Emulator

Emulator Telnet Interface

Page 6: OWF12/PAUG Conf Days Android tools for developpeurs, paul marois, design and development engineer, genymobile

Emulator

Telephony DDMS / Emulator

Camera Webcam

Sensor Tethered Device

Multitouch Tethered Device

NFC / Bluetooth Future ?

Page 7: OWF12/PAUG Conf Days Android tools for developpeurs, paul marois, design and development engineer, genymobile

New Wizard & Layout Configuration

Page 8: OWF12/PAUG Conf Days Android tools for developpeurs, paul marois, design and development engineer, genymobile

Lint

● Available in ADT > 16.● Bug detector.● Multiple Inputs file types : xml, java, ...● Multiple Output file types : text, html, xml, ...● Multiple Front-Ends : Eclipse, IntelliJ, command line.● Multiple severity warnings.● Jenkins Plugin.

○ https://wiki.jenkins-ci.org/display/JENKINS/Android+Lint+Plugin

● API to write additional checks.

Page 9: OWF12/PAUG Conf Days Android tools for developpeurs, paul marois, design and development engineer, genymobile

Lint

Create Your Own Rules

● Import lint_api.jar

● Create a detector which can identify one or more different types of "issues" that you'll create too.○ public class MyDetector extends ResourceXmlDetector

● Provide your own registry. ○ public class MyIssueRegistry extends IssueRegistry

● Create your manifest○ Lint-Registry: owf.demo.MyIssueRegistry

● Put the jar into ~/.android/lint folder

Page 10: OWF12/PAUG Conf Days Android tools for developpeurs, paul marois, design and development engineer, genymobile

Device Monitor

HierarchyViewer

Page 11: OWF12/PAUG Conf Days Android tools for developpeurs, paul marois, design and development engineer, genymobile

Device Monitor

HierarchyViewer

● Do not work on devices for security reason○ https://github.com/romainguy/ViewServer○ Requires Internet Permission○ Mode Debug only

● onCreate :○ ViewServer.get(this).addWindow(this);

● onDestroy ○ ViewServer.get(this).removeWindow(this);

● onResume ○ ViewServer.get(this).setFocusedWindow(this);

● Customizable○ @ViewDebug.ExportedProperty

Page 12: OWF12/PAUG Conf Days Android tools for developpeurs, paul marois, design and development engineer, genymobile

Device Monitor

adb command lines

● Adb bugreport○ Complete log of the system.

● adb shell dumpsys : log of services○ ex : adb shell dumpsys meminfo <pid>

Exs : SurfaceFlingermeminfoalarmnetwork_managementappwidgetnfcaudionotificationbattery

permissionbatteryinfophonebluetoothpowergfxinfovibratorhardwarewallpaper...

Page 13: OWF12/PAUG Conf Days Android tools for developpeurs, paul marois, design and development engineer, genymobile

Device Monitor

Ex : adb shell dumpsys meminfo <pid>

Page 14: OWF12/PAUG Conf Days Android tools for developpeurs, paul marois, design and development engineer, genymobile

Device Monitor

Systrace

● Settings > Developer Options > Enable Traces● sdk/tools/systrace● python ./systrace.py

Page 15: OWF12/PAUG Conf Days Android tools for developpeurs, paul marois, design and development engineer, genymobile

Device Monitor

Traceview

Page 16: OWF12/PAUG Conf Days Android tools for developpeurs, paul marois, design and development engineer, genymobile

Device Monitor

Monkey

● Generate pseudo-random streams of user events on an emulator or device

● adb shell monkey [options] <event-count>○ ex : adb shell monkey -p com.google.android.apps.iosched -v

500

Page 17: OWF12/PAUG Conf Days Android tools for developpeurs, paul marois, design and development engineer, genymobile

And more...

● Draw9patch● OpenGLTracer● Procrank

● DexGuard● AndroVM● AndroidAnnotations● RenderScript

● ETC...

Page 18: OWF12/PAUG Conf Days Android tools for developpeurs, paul marois, design and development engineer, genymobile

Q & A

Thanks

Page 19: OWF12/PAUG Conf Days Android tools for developpeurs, paul marois, design and development engineer, genymobile

Bonus

MAT