| OLD | NEW |
| (Empty) | |
| 1 |
| 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"> |
| 5 |
| 6 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading"> |
| 7 <tr bgcolor="#7799ee"> |
| 8 <td valign=bottom> <br> |
| 9 <font color="#ffffff" face="helvetica, arial"> <br><big><big><strong><a hre
f="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=
"file:/Users/nduca/Local/chrome/src/tools/telemetry/telemetry/core/chrome/adb_co
mmands.py">/Users/nduca/Local/chrome/src/tools/telemetry/telemetry/core/chrome/a
db_commands.py</a></font></td></tr></table> |
| 12 <p><tt>Brings in Chrome Android's android_commands
module, which itself is a<br> |
| 13 thin(ish) wrapper around 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> <br> |
| 18 <font color="#ffffff" face="helvetica, arial"><big><strong>Modules</strong></big
></font></td></tr> |
| 19 |
| 20 <tr><td bgcolor="#aa55cc"><tt> </tt></td><td>
</td> |
| 21 <td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=t
op><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.valgri
nd_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> <br> |
| 32 <font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big
></font></td></tr> |
| 33 |
| 34 <tr><td bgcolor="#ee77aa"><tt> </tt></td><td>
</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.ht
ml#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> <br> |
| 48 <font color="#000000" face="helvetica, arial"><a name="AdbCommands">class <stron
g>AdbCommands</strong></a>(<a href="__builtin__.html#object">__builtin__.object<
/a>)</font></td></tr> |
| 49 |
| 50 <tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td> |
| 51 <td colspan=2><tt>A thin wrapper around ADB<br> </tt></
td></tr> |
| 52 <tr><td> </td> |
| 53 <td width="100%">Methods defined here:<br> |
| 54 <dl><dt><a name="AdbCommands-Adb"><strong>Adb</strong></a>(self)</dt></dl> |
| 55 |
| 56 <dl><dt><a name="AdbCommands-CloseApplication"><strong>CloseApplication</strong>
</a>(self, package)</dt><dd><tt>Attempt to close down the&nb
sp;application, using increasing violence.<br> |
| 57 <br> |
| 58 Args:<br> |
| 59 package: Name of the process to kill&n
bsp;off, e.g.<br> |
| 60 com.google.android.apps.chrome</tt></dd></dl> |
| 61 |
| 62 <dl><dt><a name="AdbCommands-ExtractPid"><strong>ExtractPid</strong></a>(self, p
rocess_name)</dt><dd><tt>Extracts Process Ids for a giv
en process name from Android Shell.<br> |
| 63 <br> |
| 64 Args:<br> |
| 65 process_name: name of the process on t
he device.<br> |
| 66 <br> |
| 67 Returns:<br> |
| 68 List of all the process ids (as s
trings) that match the given name.<br> |
| 69 If the name of a process exactly
matches the given name, the pid of<br> |
| 70 that process will be inserted to the&n
bsp;front of the pid list.</tt></dd></dl> |
| 71 |
| 72 <dl><dt><a name="AdbCommands-FileExistsOnDevice"><strong>FileExistsOnDevice</str
ong></a>(self, file_name)</dt></dl> |
| 73 |
| 74 <dl><dt><a name="AdbCommands-Forward"><strong>Forward</strong></a>(self, local,
remote)</dt></dl> |
| 75 |
| 76 <dl><dt><a name="AdbCommands-IsRootEnabled"><strong>IsRootEnabled</strong></a>(s
elf)</dt></dl> |
| 77 |
| 78 <dl><dt><a name="AdbCommands-KillAll"><strong>KillAll</strong></a>(self, process
)</dt><dd><tt>Android version of killall, connected via
adb.<br> |
| 79 <br> |
| 80 Args:<br> |
| 81 process: name of the process to kill&n
bsp;off<br> |
| 82 <br> |
| 83 Returns:<br> |
| 84 the number of processess killed</tt></dd></dl> |
| 85 |
| 86 <dl><dt><a name="AdbCommands-Pull"><strong>Pull</strong></a>(self, remote, local
)</dt></dl> |
| 87 |
| 88 <dl><dt><a name="AdbCommands-Push"><strong>Push</strong></a>(self, local, remote
)</dt></dl> |
| 89 |
| 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 a command to 
;the adb shell and return the result.<br> |
| 91 <br> |
| 92 Args:<br> |
| 93 command: String containing the shell comman
d to send. Must not include<br> |
| 94 the singl
e quotes as we use them to escape the&nb
sp;whole command.<br> |
| 95 timeout_time: Number of seconds to wait&nbs
p;for command to respond before<br> |
| 96 retrying, used by AdbInterface.SendShellC
ommand.<br> |
| 97 log_result: Boolean to indicate whether we&
nbsp;should log the result of the<br> |
| 98 &n
bsp;shell command.<br> |
| 99 <br> |
| 100 Returns:<br> |
| 101 list containing the lines of output re
ceived from running the command</tt></dd></dl> |
| 102 |
| 103 <dl><dt><a name="AdbCommands-StartActivity"><strong>StartActivity</strong></a>(s
elf, 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<fon
t color="#909090">=None</font>, trace_file_name<font color="#909090">=None</font
>)</dt><dd><tt>Starts |package|'s activity on the devic
e.<br> |
| 104 <br> |
| 105 Args:<br> |
| 106 package: Name of package to start (e.g
. 'com.google.android.apps.chrome').<br> |
| 107 activity: Name of activity (e.g. '.Main'&nb
sp;or<br> |
| 108 'com.google.android.apps.chrome.Main').<br> |
| 109 wait_for_completion: wait for the activity
to finish launching (-W flag).<br> |
| 110 action: string (e.g. 'android.intent.action.MAIN').&n
bsp;Default is VIEW.<br> |
| 111 category: string (e.g. 'android.intent.category.HOME'
)<br> |
| 112 data: Data string to pass to activity&
nbsp;(e.g. '<a href="http://www.example.com/">http://www.example.com/</a>')
.<br> |
| 113 extras: Dict of extras to pass to 
;activity. Values are significant.<br> |
| 114 trace_file_name: If used, turns on and 
;saves the trace to this file name.</tt></dd></dl> |
| 115 |
| 116 <dl><dt><a name="AdbCommands-__init__"><strong>__init__</strong></a>(self, devic
e)</dt></dl> |
| 117 |
| 118 <hr> |
| 119 Data descriptors defined here:<br> |
| 120 <dl><dt><strong>__dict__</strong></dt> |
| 121 <dd><tt>dictionary for instance variables (if defined)<
/tt></dd> |
| 122 </dl> |
| 123 <dl><dt><strong>__weakref__</strong></dt> |
| 124 <dd><tt>list of weak references to the object 
;(if defined)</tt></dd> |
| 125 </dl> |
| 126 </td></tr></table> <p> |
| 127 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> |
| 128 <tr bgcolor="#ffc8d8"> |
| 129 <td colspan=3 valign=bottom> <br> |
| 130 <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> |
| 131 |
| 132 <tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td> |
| 133 <td width="100%">Methods defined here:<br> |
| 134 <dl><dt><a name="Forwarder-Close"><strong>Close</strong></a>(self)</dt></dl> |
| 135 |
| 136 <dl><dt><a name="Forwarder-__init__"><strong>__init__</strong></a>(self, adb, *p
ort_pairs)</dt></dl> |
| 137 |
| 138 <hr> |
| 139 Data descriptors defined here:<br> |
| 140 <dl><dt><strong>__dict__</strong></dt> |
| 141 <dd><tt>dictionary for instance variables (if defined)<
/tt></dd> |
| 142 </dl> |
| 143 <dl><dt><strong>__weakref__</strong></dt> |
| 144 <dd><tt>list of weak references to the object 
;(if defined)</tt></dd> |
| 145 </dl> |
| 146 <dl><dt><strong>url</strong></dt> |
| 147 </dl> |
| 148 </td></tr></table></td></tr></table><p> |
| 149 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> |
| 150 <tr bgcolor="#eeaa77"> |
| 151 <td colspan=3 valign=bottom> <br> |
| 152 <font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></b
ig></font></td></tr> |
| 153 |
| 154 <tr><td bgcolor="#eeaa77"><tt> </tt></td><td>
</td> |
| 155 <td width="100%"><dl><dt><a name="-AllocateTestServerPort"><strong>AllocateTestS
erverPort</strong></a>()</dt></dl> |
| 156 <dl><dt><a name="-GetAttachedDevices"><strong>GetAttachedDevices</strong></a>()
</dt><dd><tt>Returns a list of attached, online an
droid devices.<br> |
| 157 <br> |
| 158 If a preferred device has been set with
ANDROID_SERIAL, it will be first in<br> |
| 159 the returned list.</tt></dd></dl> |
| 160 <dl><dt><a name="-GetOutDirectory"><strong>GetOutDirectory</strong></a>()</dt><
/dl> |
| 161 <dl><dt><a name="-HasForwarder"><strong>HasForwarder</strong></a>(buildtype<fon
t color="#909090">=None</font>)</dt></dl> |
| 162 <dl><dt><a name="-IsAndroidSupported"><strong>IsAndroidSupported</strong></a>()
</dt></dl> |
| 163 <dl><dt><a name="-ResetTestServerPortAllocation"><strong>ResetTestServerPortAll
ocation</strong></a>()</dt></dl> |
| 164 </td></tr></table> |
| 165 </body></html> |
| OLD | NEW |