Revert 224458 "Enabling MediaStreamInfoBarTest.DenyingCameraDoes..."
[chromium-blink-merge.git] / tools / telemetry / docs / telemetry.core.chrome.adb_commands.html
blob7203e4229bb355e16af4e211bcdce79a91b75acf
2 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
3 <html><head><title>Python: module telemetry.core.chrome.adb_commands</title>
4 </head><body bgcolor="#f0f0f8">
6 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
7 <tr bgcolor="#7799ee">
8 <td valign=bottom>&nbsp;<br>
9 <font color="#ffffff" face="helvetica, arial">&nbsp;<br><big><big><strong><a href="telemetry.html"><font color="#ffffff">telemetry</font></a>.<a href="telemetry.core.html"><font color="#ffffff">core</font></a>.<a href="telemetry.core.chrome.html"><font color="#ffffff">chrome</font></a>.adb_commands</strong></big></big></font></td
10 ><td align=right valign=bottom
11 ><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="../telemetry/core/chrome/adb_commands.py">telemetry/core/chrome/adb_commands.py</a></font></td></tr></table>
12 <p><tt>Brings&nbsp;in&nbsp;Chrome&nbsp;Android's&nbsp;android_commands&nbsp;module,&nbsp;which&nbsp;itself&nbsp;is&nbsp;a<br>
13 thin(ish)&nbsp;wrapper&nbsp;around&nbsp;adb.</tt></p>
14 <p>
15 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
16 <tr bgcolor="#aa55cc">
17 <td colspan=3 valign=bottom>&nbsp;<br>
18 <font color="#ffffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
20 <tr><td bgcolor="#aa55cc"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
21 <td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="pylib.android_commands.html">pylib.android_commands</a><br>
22 <a href="pylib.cmd_helper.html">pylib.cmd_helper</a><br>
23 </td><td width="25%" valign=top><a href="pylib.forwarder.html">pylib.forwarder</a><br>
24 <a href="os.html">os</a><br>
25 </td><td width="25%" valign=top><a href="pylib.ports.html">pylib.ports</a><br>
26 <a href="sys.html">sys</a><br>
27 </td><td width="25%" valign=top><a href="pylib.valgrind_tools.html">pylib.valgrind_tools</a><br>
28 </td></tr></table></td></tr></table><p>
29 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
30 <tr bgcolor="#ee77aa">
31 <td colspan=3 valign=bottom>&nbsp;<br>
32 <font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
34 <tr><td bgcolor="#ee77aa"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
35 <td width="100%"><dl>
36 <dt><font face="helvetica, arial"><a href="__builtin__.html#object">__builtin__.object</a>
37 </font></dt><dd>
38 <dl>
39 <dt><font face="helvetica, arial"><a href="telemetry.core.chrome.adb_commands.html#AdbCommands">AdbCommands</a>
40 </font></dt><dt><font face="helvetica, arial"><a href="telemetry.core.chrome.adb_commands.html#Forwarder">Forwarder</a>
41 </font></dt></dl>
42 </dd>
43 </dl>
44 <p>
45 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
46 <tr bgcolor="#ffc8d8">
47 <td colspan=3 valign=bottom>&nbsp;<br>
48 <font color="#000000" face="helvetica, arial"><a name="AdbCommands">class <strong>AdbCommands</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr>
50 <tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
51 <td colspan=2><tt>A&nbsp;thin&nbsp;wrapper&nbsp;around&nbsp;ADB<br>&nbsp;</tt></td></tr>
52 <tr><td>&nbsp;</td>
53 <td width="100%">Methods defined here:<br>
54 <dl><dt><a name="AdbCommands-Adb"><strong>Adb</strong></a>(self)</dt></dl>
56 <dl><dt><a name="AdbCommands-CloseApplication"><strong>CloseApplication</strong></a>(self, package)</dt><dd><tt>Attempt&nbsp;to&nbsp;close&nbsp;down&nbsp;the&nbsp;application,&nbsp;using&nbsp;increasing&nbsp;violence.<br>
57 &nbsp;<br>
58 Args:<br>
59 &nbsp;&nbsp;package:&nbsp;Name&nbsp;of&nbsp;the&nbsp;process&nbsp;to&nbsp;kill&nbsp;off,&nbsp;e.g.<br>
60 &nbsp;&nbsp;com.google.android.apps.chrome</tt></dd></dl>
62 <dl><dt><a name="AdbCommands-ExtractPid"><strong>ExtractPid</strong></a>(self, process_name)</dt><dd><tt>Extracts&nbsp;Process&nbsp;Ids&nbsp;for&nbsp;a&nbsp;given&nbsp;process&nbsp;name&nbsp;from&nbsp;Android&nbsp;Shell.<br>
63 &nbsp;<br>
64 Args:<br>
65 &nbsp;&nbsp;process_name:&nbsp;name&nbsp;of&nbsp;the&nbsp;process&nbsp;on&nbsp;the&nbsp;device.<br>
66 &nbsp;<br>
67 Returns:<br>
68 &nbsp;&nbsp;List&nbsp;of&nbsp;all&nbsp;the&nbsp;process&nbsp;ids&nbsp;(as&nbsp;strings)&nbsp;that&nbsp;match&nbsp;the&nbsp;given&nbsp;name.<br>
69 &nbsp;&nbsp;If&nbsp;the&nbsp;name&nbsp;of&nbsp;a&nbsp;process&nbsp;exactly&nbsp;matches&nbsp;the&nbsp;given&nbsp;name,&nbsp;the&nbsp;pid&nbsp;of<br>
70 &nbsp;&nbsp;that&nbsp;process&nbsp;will&nbsp;be&nbsp;inserted&nbsp;to&nbsp;the&nbsp;front&nbsp;of&nbsp;the&nbsp;pid&nbsp;list.</tt></dd></dl>
72 <dl><dt><a name="AdbCommands-FileExistsOnDevice"><strong>FileExistsOnDevice</strong></a>(self, file_name)</dt></dl>
74 <dl><dt><a name="AdbCommands-Forward"><strong>Forward</strong></a>(self, local, remote)</dt></dl>
76 <dl><dt><a name="AdbCommands-IsRootEnabled"><strong>IsRootEnabled</strong></a>(self)</dt></dl>
78 <dl><dt><a name="AdbCommands-KillAll"><strong>KillAll</strong></a>(self, process)</dt><dd><tt>Android&nbsp;version&nbsp;of&nbsp;killall,&nbsp;connected&nbsp;via&nbsp;adb.<br>
79 &nbsp;<br>
80 Args:<br>
81 &nbsp;&nbsp;process:&nbsp;name&nbsp;of&nbsp;the&nbsp;process&nbsp;to&nbsp;kill&nbsp;off<br>
82 &nbsp;<br>
83 Returns:<br>
84 &nbsp;&nbsp;the&nbsp;number&nbsp;of&nbsp;processess&nbsp;killed</tt></dd></dl>
86 <dl><dt><a name="AdbCommands-Pull"><strong>Pull</strong></a>(self, remote, local)</dt></dl>
88 <dl><dt><a name="AdbCommands-Push"><strong>Push</strong></a>(self, local, remote)</dt></dl>
90 <dl><dt><a name="AdbCommands-RunShellCommand"><strong>RunShellCommand</strong></a>(self, command, timeout_time<font color="#909090">=20</font>, log_result<font color="#909090">=False</font>)</dt><dd><tt>Send&nbsp;a&nbsp;command&nbsp;to&nbsp;the&nbsp;adb&nbsp;shell&nbsp;and&nbsp;return&nbsp;the&nbsp;result.<br>
91 &nbsp;<br>
92 Args:<br>
93 &nbsp;&nbsp;command:&nbsp;String&nbsp;containing&nbsp;the&nbsp;shell&nbsp;command&nbsp;to&nbsp;send.&nbsp;Must&nbsp;not&nbsp;include<br>
94 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;the&nbsp;single&nbsp;quotes&nbsp;as&nbsp;we&nbsp;use&nbsp;them&nbsp;to&nbsp;escape&nbsp;the&nbsp;whole&nbsp;command.<br>
95 &nbsp;&nbsp;timeout_time:&nbsp;Number&nbsp;of&nbsp;seconds&nbsp;to&nbsp;wait&nbsp;for&nbsp;command&nbsp;to&nbsp;respond&nbsp;before<br>
96 &nbsp;&nbsp;&nbsp;&nbsp;retrying,&nbsp;used&nbsp;by&nbsp;AdbInterface.SendShellCommand.<br>
97 &nbsp;&nbsp;log_result:&nbsp;Boolean&nbsp;to&nbsp;indicate&nbsp;whether&nbsp;we&nbsp;should&nbsp;log&nbsp;the&nbsp;result&nbsp;of&nbsp;the<br>
98 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;shell&nbsp;command.<br>
99 &nbsp;<br>
100 Returns:<br>
101 &nbsp;&nbsp;list&nbsp;containing&nbsp;the&nbsp;lines&nbsp;of&nbsp;output&nbsp;received&nbsp;from&nbsp;running&nbsp;the&nbsp;command</tt></dd></dl>
103 <dl><dt><a name="AdbCommands-StartActivity"><strong>StartActivity</strong></a>(self, package, activity, wait_for_completion<font color="#909090">=False</font>, action<font color="#909090">='android.intent.action.VIEW'</font>, category<font color="#909090">=None</font>, data<font color="#909090">=None</font>, extras<font color="#909090">=None</font>, trace_file_name<font color="#909090">=None</font>)</dt><dd><tt>Starts&nbsp;|package|'s&nbsp;activity&nbsp;on&nbsp;the&nbsp;device.<br>
104 &nbsp;<br>
105 Args:<br>
106 &nbsp;&nbsp;package:&nbsp;Name&nbsp;of&nbsp;package&nbsp;to&nbsp;start&nbsp;(e.g.&nbsp;'com.google.android.apps.chrome').<br>
107 &nbsp;&nbsp;activity:&nbsp;Name&nbsp;of&nbsp;activity&nbsp;(e.g.&nbsp;'.Main'&nbsp;or<br>
108 &nbsp;&nbsp;&nbsp;&nbsp;'com.google.android.apps.chrome.Main').<br>
109 &nbsp;&nbsp;wait_for_completion:&nbsp;wait&nbsp;for&nbsp;the&nbsp;activity&nbsp;to&nbsp;finish&nbsp;launching&nbsp;(-W&nbsp;flag).<br>
110 &nbsp;&nbsp;action:&nbsp;string&nbsp;(e.g.&nbsp;'android.intent.action.MAIN').&nbsp;Default&nbsp;is&nbsp;VIEW.<br>
111 &nbsp;&nbsp;category:&nbsp;string&nbsp;(e.g.&nbsp;'android.intent.category.HOME')<br>
112 &nbsp;&nbsp;data:&nbsp;Data&nbsp;string&nbsp;to&nbsp;pass&nbsp;to&nbsp;activity&nbsp;(e.g.&nbsp;'<a href="http://www.example.com/">http://www.example.com/</a>').<br>
113 &nbsp;&nbsp;extras:&nbsp;Dict&nbsp;of&nbsp;extras&nbsp;to&nbsp;pass&nbsp;to&nbsp;activity.&nbsp;Values&nbsp;are&nbsp;significant.<br>
114 &nbsp;&nbsp;trace_file_name:&nbsp;If&nbsp;used,&nbsp;turns&nbsp;on&nbsp;and&nbsp;saves&nbsp;the&nbsp;trace&nbsp;to&nbsp;this&nbsp;file&nbsp;name.</tt></dd></dl>
116 <dl><dt><a name="AdbCommands-__init__"><strong>__init__</strong></a>(self, device)</dt></dl>
118 <dl><dt><a name="AdbCommands-device"><strong>device</strong></a>(self)</dt></dl>
120 <hr>
121 Data descriptors defined here:<br>
122 <dl><dt><strong>__dict__</strong></dt>
123 <dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dd>
124 </dl>
125 <dl><dt><strong>__weakref__</strong></dt>
126 <dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
127 </dl>
128 </td></tr></table> <p>
129 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
130 <tr bgcolor="#ffc8d8">
131 <td colspan=3 valign=bottom>&nbsp;<br>
132 <font color="#000000" face="helvetica, arial"><a name="Forwarder">class <strong>Forwarder</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr>
134 <tr><td bgcolor="#ffc8d8"><tt>&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
135 <td width="100%">Methods defined here:<br>
136 <dl><dt><a name="Forwarder-Close"><strong>Close</strong></a>(self)</dt></dl>
138 <dl><dt><a name="Forwarder-__init__"><strong>__init__</strong></a>(self, adb, *port_pairs)</dt></dl>
140 <hr>
141 Static methods defined here:<br>
142 <dl><dt><a name="Forwarder-KillDevice"><strong>KillDevice</strong></a>(adb)</dt></dl>
144 <dl><dt><a name="Forwarder-KillHost"><strong>KillHost</strong></a>()</dt></dl>
146 <hr>
147 Data descriptors defined here:<br>
148 <dl><dt><strong>__dict__</strong></dt>
149 <dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dd>
150 </dl>
151 <dl><dt><strong>__weakref__</strong></dt>
152 <dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
153 </dl>
154 <dl><dt><strong>url</strong></dt>
155 </dl>
156 </td></tr></table></td></tr></table><p>
157 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
158 <tr bgcolor="#eeaa77">
159 <td colspan=3 valign=bottom>&nbsp;<br>
160 <font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr>
162 <tr><td bgcolor="#eeaa77"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
163 <td width="100%"><dl><dt><a name="-AllocateTestServerPort"><strong>AllocateTestServerPort</strong></a>()</dt></dl>
164 <dl><dt><a name="-GetAttachedDevices"><strong>GetAttachedDevices</strong></a>()</dt><dd><tt>Returns&nbsp;a&nbsp;list&nbsp;of&nbsp;attached,&nbsp;online&nbsp;android&nbsp;devices.<br>
165 &nbsp;<br>
166 If&nbsp;a&nbsp;preferred&nbsp;device&nbsp;has&nbsp;been&nbsp;set&nbsp;with&nbsp;ANDROID_SERIAL,&nbsp;it&nbsp;will&nbsp;be&nbsp;first&nbsp;in<br>
167 the&nbsp;returned&nbsp;list.</tt></dd></dl>
168 <dl><dt><a name="-GetOutDirectory"><strong>GetOutDirectory</strong></a>()</dt></dl>
169 <dl><dt><a name="-HasForwarder"><strong>HasForwarder</strong></a>(buildtype<font color="#909090">=None</font>)</dt></dl>
170 <dl><dt><a name="-IsAndroidSupported"><strong>IsAndroidSupported</strong></a>()</dt></dl>
171 <dl><dt><a name="-ResetTestServerPortAllocation"><strong>ResetTestServerPortAllocation</strong></a>()</dt></dl>
172 </td></tr></table>
173 </body></html>