1
2<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
3<html><head><title>Python: module telemetry.internal.backends.mandoline.android</title>
4<meta charset="utf-8">
5</head><body bgcolor="#f0f0f8">
6
7<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
8<tr bgcolor="#7799ee">
9<td valign=bottom>&nbsp;<br>
10<font color="#ffffff" face="helvetica, arial">&nbsp;<br><big><big><strong><a href="telemetry.html"><font color="#ffffff">telemetry</font></a>.<a href="telemetry.internal.html"><font color="#ffffff">internal</font></a>.<a href="telemetry.internal.backends.html"><font color="#ffffff">backends</font></a>.<a href="telemetry.internal.backends.mandoline.html"><font color="#ffffff">mandoline</font></a>.android</strong></big></big></font></td
11><td align=right valign=bottom
12><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="../telemetry/internal/backends/mandoline/android.py">telemetry/internal/backends/mandoline/android.py</a></font></td></tr></table>
13    <p><tt>#&nbsp;Copyright&nbsp;2014&nbsp;The&nbsp;Chromium&nbsp;Authors.&nbsp;All&nbsp;rights&nbsp;reserved.<br>
14#&nbsp;Use&nbsp;of&nbsp;this&nbsp;source&nbsp;code&nbsp;is&nbsp;governed&nbsp;by&nbsp;a&nbsp;BSD-style&nbsp;license&nbsp;that&nbsp;can&nbsp;be<br>
15#&nbsp;found&nbsp;in&nbsp;the&nbsp;LICENSE&nbsp;file.</tt></p>
16<p>
17<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
18<tr bgcolor="#aa55cc">
19<td colspan=3 valign=bottom>&nbsp;<br>
20<font color="#ffffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
21
22<tr><td bgcolor="#aa55cc"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
23<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="devil.android.apk_helper.html">devil.android.apk_helper</a><br>
24<a href="atexit.html">atexit</a><br>
25<a href="devil.base_error.html">devil.base_error</a><br>
26<a href="pylib.constants.html">pylib.constants</a><br>
27</td><td width="25%" valign=top><a href="devil.android.device_errors.html">devil.android.device_errors</a><br>
28<a href="devil.android.device_utils.html">devil.android.device_utils</a><br>
29<a href="logging.html">logging</a><br>
30<a href="os.html">os</a><br>
31</td><td width="25%" valign=top><a href="signal.html">signal</a><br>
32<a href="subprocess.html">subprocess</a><br>
33<a href="sys.html">sys</a><br>
34<a href="threading.html">threading</a><br>
35</td><td width="25%" valign=top><a href="time.html">time</a><br>
36</td></tr></table></td></tr></table><p>
37<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
38<tr bgcolor="#ee77aa">
39<td colspan=3 valign=bottom>&nbsp;<br>
40<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
41
42<tr><td bgcolor="#ee77aa"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
43<td width="100%"><dl>
44<dt><font face="helvetica, arial"><a href="__builtin__.html#object">__builtin__.object</a>
45</font></dt><dd>
46<dl>
47<dt><font face="helvetica, arial"><a href="telemetry.internal.backends.mandoline.android.html#AndroidShell">AndroidShell</a>
48</font></dt></dl>
49</dd>
50</dl>
51 <p>
52<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
53<tr bgcolor="#ffc8d8">
54<td colspan=3 valign=bottom>&nbsp;<br>
55<font color="#000000" face="helvetica, arial"><a name="AndroidShell">class <strong>AndroidShell</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr>
56
57<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
58<td colspan=2><tt>Used&nbsp;to&nbsp;set&nbsp;up&nbsp;and&nbsp;run&nbsp;a&nbsp;given&nbsp;mojo&nbsp;shell&nbsp;binary&nbsp;on&nbsp;an&nbsp;Android&nbsp;device.<br>
59|config|&nbsp;is&nbsp;the&nbsp;mopy.config.Config&nbsp;for&nbsp;the&nbsp;build.<br>&nbsp;</tt></td></tr>
60<tr><td>&nbsp;</td>
61<td width="100%">Methods defined here:<br>
62<dl><dt><a name="AndroidShell-InitShell"><strong>InitShell</strong></a>(self, device<font color="#909090">=None</font>)</dt><dd><tt>Runs&nbsp;adb&nbsp;as&nbsp;root,&nbsp;and&nbsp;installs&nbsp;the&nbsp;apk&nbsp;as&nbsp;needed.&nbsp;&nbsp;|device|&nbsp;is&nbsp;the&nbsp;target<br>
63device&nbsp;to&nbsp;run&nbsp;on,&nbsp;if&nbsp;multiple&nbsp;devices&nbsp;are&nbsp;connected.&nbsp;Returns&nbsp;0&nbsp;on&nbsp;success&nbsp;or<br>
64a&nbsp;non-zero&nbsp;exit&nbsp;code&nbsp;on&nbsp;a&nbsp;terminal&nbsp;failure.</tt></dd></dl>
65
66<dl><dt><a name="AndroidShell-ShowLogs"><strong>ShowLogs</strong></a>(self, stdout<font color="#909090">=&lt;open file '&lt;stdout&gt;', mode 'w'&gt;</font>)</dt><dd><tt>Displays&nbsp;the&nbsp;mojo&nbsp;shell&nbsp;logs&nbsp;and&nbsp;returns&nbsp;the&nbsp;process&nbsp;reading&nbsp;the&nbsp;logs.</tt></dd></dl>
67
68<dl><dt><a name="AndroidShell-StartActivity"><strong>StartActivity</strong></a>(self, activity_name, arguments, stdout, on_fifo_closed, temp_gdb_dir<font color="#909090">=None</font>)</dt><dd><tt>Starts&nbsp;the&nbsp;shell&nbsp;with&nbsp;the&nbsp;given&nbsp;|arguments|,&nbsp;directing&nbsp;output&nbsp;to&nbsp;|stdout|.<br>
69|on_fifo_closed|&nbsp;will&nbsp;be&nbsp;run&nbsp;if&nbsp;the&nbsp;FIFO&nbsp;can't&nbsp;be&nbsp;found&nbsp;or&nbsp;when&nbsp;it's&nbsp;closed.<br>
70|temp_gdb_dir|&nbsp;is&nbsp;set&nbsp;to&nbsp;a&nbsp;location&nbsp;with&nbsp;appropriate&nbsp;symlinks&nbsp;for&nbsp;gdb&nbsp;to<br>
71find&nbsp;when&nbsp;attached&nbsp;to&nbsp;the&nbsp;device's&nbsp;remote&nbsp;process&nbsp;on&nbsp;startup.</tt></dd></dl>
72
73<dl><dt><a name="AndroidShell-__init__"><strong>__init__</strong></a>(self, config, chrome_root)</dt></dl>
74
75<dl><dt><a name="AndroidShell-kill"><strong>kill</strong></a>(self)</dt><dd><tt>Stops&nbsp;the&nbsp;mojo&nbsp;shell;&nbsp;matches&nbsp;the&nbsp;Popen.kill&nbsp;method&nbsp;signature.</tt></dd></dl>
76
77<hr>
78Data descriptors defined here:<br>
79<dl><dt><strong>__dict__</strong></dt>
80<dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dd>
81</dl>
82<dl><dt><strong>__weakref__</strong></dt>
83<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
84</dl>
85</td></tr></table></td></tr></table><p>
86<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
87<tr bgcolor="#55aa55">
88<td colspan=3 valign=bottom>&nbsp;<br>
89<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>
90
91<tr><td bgcolor="#55aa55"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
92<td width="100%"><strong>LOGCAT_TAGS</strong> = ['AndroidHandler', 'MojoFileHelper', 'MojoMain', 'MojoShellActivity', 'MojoShellApplication', 'chromium']<br>
93<strong>MAPPING_PREFIX</strong> = '--map-origin='</td></tr></table>
94</body></html>