xref: /aosp_15_r20/external/chromium-trace/catapult/devil/docs/adb_wrapper.md (revision 1fa4b3da657c0e9ad43c0220bacf9731820715a5)
1*1fa4b3daSHector Dearman# [devil.android.sdk.adb_wrapper](https://chromium.googlesource.com/catapult.git/+/HEAD/devil/devil/android/sdk/adb_wrapper.py)
2*1fa4b3daSHector Dearman
3*1fa4b3daSHector Dearman*This page was autogenerated. Run `devil/bin/generate_md_docs` to update*
4*1fa4b3daSHector Dearman
5*1fa4b3daSHector Dearman## AdbWrapper
6*1fa4b3daSHector Dearman
7*1fa4b3daSHector DearmanA wrapper around a local Android Debug Bridge executable.
8*1fa4b3daSHector Dearman### AdbWrapper.Backup
9*1fa4b3daSHector Dearman
10*1fa4b3daSHector DearmanWrite an archive of the device's data to |path|.
11*1fa4b3daSHector Dearman```
12*1fa4b3daSHector Dearman    Args:
13*1fa4b3daSHector Dearman      path: Local path to store the backup file.
14*1fa4b3daSHector Dearman      packages: List of to packages to be backed up.
15*1fa4b3daSHector Dearman      apk: (optional) If set include the .apk files in the archive.
16*1fa4b3daSHector Dearman      shared: (optional) If set buckup the device's SD card.
17*1fa4b3daSHector Dearman      nosystem: (optional) If set exclude system applications.
18*1fa4b3daSHector Dearman      include_all: (optional) If set back up all installed applications and
19*1fa4b3daSHector Dearman        |packages| is optional.
20*1fa4b3daSHector Dearman      timeout: (optional) Timeout per try in seconds.
21*1fa4b3daSHector Dearman      retries: (optional) Number of retries to attempt.
22*1fa4b3daSHector Dearman```
23*1fa4b3daSHector Dearman
24*1fa4b3daSHector Dearman
25*1fa4b3daSHector Dearman### AdbWrapper.DisableVerity
26*1fa4b3daSHector Dearman
27*1fa4b3daSHector DearmanDisable Marshmallow's Verity security feature.
28*1fa4b3daSHector Dearman```
29*1fa4b3daSHector Dearman    Returns:
30*1fa4b3daSHector Dearman      The output of the disable-verity command as a string.
31*1fa4b3daSHector Dearman```
32*1fa4b3daSHector Dearman
33*1fa4b3daSHector Dearman
34*1fa4b3daSHector Dearman### AdbWrapper.Emu
35*1fa4b3daSHector Dearman
36*1fa4b3daSHector DearmanRuns an emulator console command.
37*1fa4b3daSHector Dearman```
38*1fa4b3daSHector Dearman    See http://developer.android.com/tools/devices/emulator.html#console
39*1fa4b3daSHector Dearman
40*1fa4b3daSHector Dearman    Args:
41*1fa4b3daSHector Dearman      cmd: The command to run on the emulator console.
42*1fa4b3daSHector Dearman      timeout: (optional) Timeout per try in seconds.
43*1fa4b3daSHector Dearman      retries: (optional) Number of retries to attempt.
44*1fa4b3daSHector Dearman
45*1fa4b3daSHector Dearman    Returns:
46*1fa4b3daSHector Dearman      The output of the emulator console command.
47*1fa4b3daSHector Dearman```
48*1fa4b3daSHector Dearman
49*1fa4b3daSHector Dearman
50*1fa4b3daSHector Dearman### AdbWrapper.EnableVerity
51*1fa4b3daSHector Dearman
52*1fa4b3daSHector DearmanEnable Marshmallow's Verity security feature.
53*1fa4b3daSHector Dearman```
54*1fa4b3daSHector Dearman    Returns:
55*1fa4b3daSHector Dearman      The output of the enable-verity command as a string.
56*1fa4b3daSHector Dearman```
57*1fa4b3daSHector Dearman
58*1fa4b3daSHector Dearman
59*1fa4b3daSHector Dearman### AdbWrapper.Forward
60*1fa4b3daSHector Dearman
61*1fa4b3daSHector DearmanForward socket connections from the local socket to the remote socket.
62*1fa4b3daSHector Dearman```
63*1fa4b3daSHector Dearman    Sockets are specified by one of:
64*1fa4b3daSHector Dearman      tcp:<port>
65*1fa4b3daSHector Dearman      localabstract:<unix domain socket name>
66*1fa4b3daSHector Dearman      localreserved:<unix domain socket name>
67*1fa4b3daSHector Dearman      localfilesystem:<unix domain socket name>
68*1fa4b3daSHector Dearman      dev:<character device name>
69*1fa4b3daSHector Dearman      jdwp:<process pid> (remote only)
70*1fa4b3daSHector Dearman
71*1fa4b3daSHector Dearman    Args:
72*1fa4b3daSHector Dearman      local: The host socket.
73*1fa4b3daSHector Dearman      remote: The device socket.
74*1fa4b3daSHector Dearman      allow_rebind: A boolean indicating whether adb may rebind a local socket;
75*1fa4b3daSHector Dearman        otherwise, the default, an exception is raised if the local socket is
76*1fa4b3daSHector Dearman        already being forwarded.
77*1fa4b3daSHector Dearman      timeout: (optional) Timeout per try in seconds.
78*1fa4b3daSHector Dearman      retries: (optional) Number of retries to attempt.
79*1fa4b3daSHector Dearman```
80*1fa4b3daSHector Dearman
81*1fa4b3daSHector Dearman
82*1fa4b3daSHector Dearman### AdbWrapper.ForwardList
83*1fa4b3daSHector Dearman
84*1fa4b3daSHector DearmanList all currently forwarded socket connections.
85*1fa4b3daSHector Dearman```
86*1fa4b3daSHector Dearman    Args:
87*1fa4b3daSHector Dearman      timeout: (optional) Timeout per try in seconds.
88*1fa4b3daSHector Dearman      retries: (optional) Number of retries to attempt.
89*1fa4b3daSHector Dearman    Returns:
90*1fa4b3daSHector Dearman      The output of adb forward --list as a string.
91*1fa4b3daSHector Dearman```
92*1fa4b3daSHector Dearman
93*1fa4b3daSHector Dearman
94*1fa4b3daSHector Dearman### AdbWrapper.ForwardRemove
95*1fa4b3daSHector Dearman
96*1fa4b3daSHector DearmanRemove a forward socket connection.
97*1fa4b3daSHector Dearman```
98*1fa4b3daSHector Dearman    Args:
99*1fa4b3daSHector Dearman      local: The host socket.
100*1fa4b3daSHector Dearman      timeout: (optional) Timeout per try in seconds.
101*1fa4b3daSHector Dearman      retries: (optional) Number of retries to attempt.
102*1fa4b3daSHector Dearman```
103*1fa4b3daSHector Dearman
104*1fa4b3daSHector Dearman
105*1fa4b3daSHector Dearman### AdbWrapper.GetDevPath
106*1fa4b3daSHector Dearman
107*1fa4b3daSHector DearmanGets the device path.
108*1fa4b3daSHector Dearman```
109*1fa4b3daSHector Dearman    Args:
110*1fa4b3daSHector Dearman      timeout: (optional) Timeout per try in seconds.
111*1fa4b3daSHector Dearman      retries: (optional) Number of retries to attempt.
112*1fa4b3daSHector Dearman
113*1fa4b3daSHector Dearman    Returns:
114*1fa4b3daSHector Dearman      The device path (e.g. usb:3-4)
115*1fa4b3daSHector Dearman```
116*1fa4b3daSHector Dearman
117*1fa4b3daSHector Dearman
118*1fa4b3daSHector Dearman### AdbWrapper.GetDeviceSerial
119*1fa4b3daSHector Dearman
120*1fa4b3daSHector DearmanGets the device serial number associated with this object.
121*1fa4b3daSHector Dearman```
122*1fa4b3daSHector Dearman    Returns:
123*1fa4b3daSHector Dearman      Device serial number as a string.
124*1fa4b3daSHector Dearman```
125*1fa4b3daSHector Dearman
126*1fa4b3daSHector Dearman
127*1fa4b3daSHector Dearman### AdbWrapper.GetState
128*1fa4b3daSHector Dearman
129*1fa4b3daSHector DearmanGet device state.
130*1fa4b3daSHector Dearman```
131*1fa4b3daSHector Dearman    Args:
132*1fa4b3daSHector Dearman      timeout: (optional) Timeout per try in seconds.
133*1fa4b3daSHector Dearman      retries: (optional) Number of retries to attempt.
134*1fa4b3daSHector Dearman
135*1fa4b3daSHector Dearman    Returns:
136*1fa4b3daSHector Dearman      One of 'offline', 'bootloader', or 'device'.
137*1fa4b3daSHector Dearman```
138*1fa4b3daSHector Dearman
139*1fa4b3daSHector Dearman
140*1fa4b3daSHector Dearman### AdbWrapper.Install
141*1fa4b3daSHector Dearman
142*1fa4b3daSHector DearmanInstall an apk on the device.
143*1fa4b3daSHector Dearman```
144*1fa4b3daSHector Dearman    Args:
145*1fa4b3daSHector Dearman      apk_path: Host path to the APK file.
146*1fa4b3daSHector Dearman      forward_lock: (optional) If set forward-locks the app.
147*1fa4b3daSHector Dearman      allow_downgrade: (optional) If set, allows for downgrades.
148*1fa4b3daSHector Dearman      reinstall: (optional) If set reinstalls the app, keeping its data.
149*1fa4b3daSHector Dearman      sd_card: (optional) If set installs on the SD card.
150*1fa4b3daSHector Dearman      streaming: (optional) If not set, use default way to install.
151*1fa4b3daSHector Dearman        If True, performs streaming install.
152*1fa4b3daSHector Dearman        If False, app is pushed to device and be installed from there.
153*1fa4b3daSHector Dearman        Note this option is not supported prior to adb version 1.0.40
154*1fa4b3daSHector Dearman      timeout: (optional) Timeout per try in seconds.
155*1fa4b3daSHector Dearman      retries: (optional) Number of retries to attempt.
156*1fa4b3daSHector Dearman```
157*1fa4b3daSHector Dearman
158*1fa4b3daSHector Dearman
159*1fa4b3daSHector Dearman### AdbWrapper.InstallMultiple
160*1fa4b3daSHector Dearman
161*1fa4b3daSHector DearmanInstall an apk with splits on the device.
162*1fa4b3daSHector Dearman```
163*1fa4b3daSHector Dearman    Args:
164*1fa4b3daSHector Dearman      apk_paths: Host path to the APK file.
165*1fa4b3daSHector Dearman      forward_lock: (optional) If set forward-locks the app.
166*1fa4b3daSHector Dearman      reinstall: (optional) If set reinstalls the app, keeping its data.
167*1fa4b3daSHector Dearman      sd_card: (optional) If set installs on the SD card.
168*1fa4b3daSHector Dearman      allow_downgrade: (optional) Allow versionCode downgrade.
169*1fa4b3daSHector Dearman      partial: (optional) Package ID if apk_paths doesn't include all .apks.
170*1fa4b3daSHector Dearman      streaming: (optional) If not set, use default way to install.
171*1fa4b3daSHector Dearman        If True, performs streaming install.
172*1fa4b3daSHector Dearman        If False, app is pushed to device and be installed from there.
173*1fa4b3daSHector Dearman        Note this option is not supported prior to adb version 1.0.40
174*1fa4b3daSHector Dearman      timeout: (optional) Timeout per try in seconds.
175*1fa4b3daSHector Dearman      retries: (optional) Number of retries to attempt.
176*1fa4b3daSHector Dearman```
177*1fa4b3daSHector Dearman
178*1fa4b3daSHector Dearman
179*1fa4b3daSHector Dearman### AdbWrapper.IterShell
180*1fa4b3daSHector Dearman
181*1fa4b3daSHector DearmanRuns a shell command and returns an iterator over its output lines.
182*1fa4b3daSHector Dearman```
183*1fa4b3daSHector Dearman    Args:
184*1fa4b3daSHector Dearman      command: A string with the shell command to run.
185*1fa4b3daSHector Dearman      timeout: Timeout in seconds.
186*1fa4b3daSHector Dearman
187*1fa4b3daSHector Dearman    Yields:
188*1fa4b3daSHector Dearman      The output of the command line by line.
189*1fa4b3daSHector Dearman```
190*1fa4b3daSHector Dearman
191*1fa4b3daSHector Dearman
192*1fa4b3daSHector Dearman### AdbWrapper.JDWP
193*1fa4b3daSHector Dearman
194*1fa4b3daSHector DearmanList of PIDs of processes hosting a JDWP transport.
195*1fa4b3daSHector Dearman```
196*1fa4b3daSHector Dearman    Args:
197*1fa4b3daSHector Dearman      timeout: (optional) Timeout per try in seconds.
198*1fa4b3daSHector Dearman      retries: (optional) Number of retries to attempt.
199*1fa4b3daSHector Dearman
200*1fa4b3daSHector Dearman    Returns:
201*1fa4b3daSHector Dearman      A list of PIDs as strings.
202*1fa4b3daSHector Dearman```
203*1fa4b3daSHector Dearman
204*1fa4b3daSHector Dearman
205*1fa4b3daSHector Dearman### AdbWrapper.Logcat
206*1fa4b3daSHector Dearman
207*1fa4b3daSHector DearmanGet an iterable over the logcat output.
208*1fa4b3daSHector Dearman```
209*1fa4b3daSHector Dearman    Args:
210*1fa4b3daSHector Dearman      clear: If true, clear the logcat.
211*1fa4b3daSHector Dearman      dump: If true, dump the current logcat contents.
212*1fa4b3daSHector Dearman      filter_specs: If set, a list of specs to filter the logcat.
213*1fa4b3daSHector Dearman      logcat_format: If set, the format in which the logcat should be output.
214*1fa4b3daSHector Dearman        Options include "brief", "process", "tag", "thread", "raw", "time",
215*1fa4b3daSHector Dearman        "threadtime", and "long"
216*1fa4b3daSHector Dearman      ring_buffer: If set, a list of alternate ring buffers to request.
217*1fa4b3daSHector Dearman        Options include "main", "system", "radio", "events", "crash" or "all".
218*1fa4b3daSHector Dearman        The default is equivalent to ["main", "system", "crash"].
219*1fa4b3daSHector Dearman      iter_timeout: If set and neither clear nor dump is set, the number of
220*1fa4b3daSHector Dearman        seconds to wait between iterations. If no line is found before the
221*1fa4b3daSHector Dearman        given number of seconds elapses, the iterable will yield None.
222*1fa4b3daSHector Dearman      check_error: Whether to check the exit status of the logcat command.
223*1fa4b3daSHector Dearman      timeout: (optional) If set, timeout per try in seconds. If clear or dump
224*1fa4b3daSHector Dearman        is set, defaults to DEFAULT_TIMEOUT.
225*1fa4b3daSHector Dearman      retries: (optional) If clear or dump is set, the number of retries to
226*1fa4b3daSHector Dearman        attempt. Otherwise, does nothing.
227*1fa4b3daSHector Dearman
228*1fa4b3daSHector Dearman    Yields:
229*1fa4b3daSHector Dearman      logcat output line by line.
230*1fa4b3daSHector Dearman```
231*1fa4b3daSHector Dearman
232*1fa4b3daSHector Dearman
233*1fa4b3daSHector Dearman### AdbWrapper.Ls
234*1fa4b3daSHector Dearman
235*1fa4b3daSHector DearmanList the contents of a directory on the device.
236*1fa4b3daSHector Dearman```
237*1fa4b3daSHector Dearman    Args:
238*1fa4b3daSHector Dearman      path: Path on the device filesystem.
239*1fa4b3daSHector Dearman      timeout: (optional) Timeout per try in seconds.
240*1fa4b3daSHector Dearman      retries: (optional) Number of retries to attempt.
241*1fa4b3daSHector Dearman
242*1fa4b3daSHector Dearman    Returns:
243*1fa4b3daSHector Dearman      A list of pairs (filename, stat) for each file found in the directory,
244*1fa4b3daSHector Dearman      where the stat object has the properties: st_mode, st_size, and st_time.
245*1fa4b3daSHector Dearman
246*1fa4b3daSHector Dearman    Raises:
247*1fa4b3daSHector Dearman      AdbCommandFailedError if |path| does not specify a valid and accessible
248*1fa4b3daSHector Dearman          directory in the device, or the output of "adb ls" command is less
249*1fa4b3daSHector Dearman          than four columns
250*1fa4b3daSHector Dearman```
251*1fa4b3daSHector Dearman
252*1fa4b3daSHector Dearman
253*1fa4b3daSHector Dearman### AdbWrapper.Pull
254*1fa4b3daSHector Dearman
255*1fa4b3daSHector DearmanPulls a file from the device to the host.
256*1fa4b3daSHector Dearman```
257*1fa4b3daSHector Dearman    Args:
258*1fa4b3daSHector Dearman      remote: Path on the device filesystem.
259*1fa4b3daSHector Dearman      local: Path on the host filesystem.
260*1fa4b3daSHector Dearman      timeout: (optional) Timeout per try in seconds.
261*1fa4b3daSHector Dearman      retries: (optional) Number of retries to attempt.
262*1fa4b3daSHector Dearman```
263*1fa4b3daSHector Dearman
264*1fa4b3daSHector Dearman
265*1fa4b3daSHector Dearman### AdbWrapper.Push
266*1fa4b3daSHector Dearman
267*1fa4b3daSHector DearmanPushes a file from the host to the device.
268*1fa4b3daSHector Dearman```
269*1fa4b3daSHector Dearman    Args:
270*1fa4b3daSHector Dearman      local: Path on the host filesystem.
271*1fa4b3daSHector Dearman      remote: Path on the device filesystem.
272*1fa4b3daSHector Dearman      sync: (optional) Whether to only push files that are newer on the host.
273*1fa4b3daSHector Dearman        Not supported when using adb prior to 1.0.39.
274*1fa4b3daSHector Dearman      timeout: (optional) Timeout per try in seconds.
275*1fa4b3daSHector Dearman      retries: (optional) Number of retries to attempt.
276*1fa4b3daSHector Dearman
277*1fa4b3daSHector Dearman    Raises:
278*1fa4b3daSHector Dearman      AdbVersionError if sync=True with versions of adb prior to 1.0.39.
279*1fa4b3daSHector Dearman```
280*1fa4b3daSHector Dearman
281*1fa4b3daSHector Dearman
282*1fa4b3daSHector Dearman### AdbWrapper.Reboot
283*1fa4b3daSHector Dearman
284*1fa4b3daSHector DearmanReboots the device.
285*1fa4b3daSHector Dearman```
286*1fa4b3daSHector Dearman    Args:
287*1fa4b3daSHector Dearman      to_bootloader: (optional) If set reboots to the bootloader.
288*1fa4b3daSHector Dearman      timeout: (optional) Timeout per try in seconds.
289*1fa4b3daSHector Dearman      retries: (optional) Number of retries to attempt.
290*1fa4b3daSHector Dearman```
291*1fa4b3daSHector Dearman
292*1fa4b3daSHector Dearman
293*1fa4b3daSHector Dearman### AdbWrapper.Remount
294*1fa4b3daSHector Dearman
295*1fa4b3daSHector DearmanRemounts the /system partition on the device read-write.
296*1fa4b3daSHector Dearman### AdbWrapper.Restore
297*1fa4b3daSHector Dearman
298*1fa4b3daSHector DearmanRestore device contents from the backup archive.
299*1fa4b3daSHector Dearman```
300*1fa4b3daSHector Dearman    Args:
301*1fa4b3daSHector Dearman      path: Host path to the backup archive.
302*1fa4b3daSHector Dearman      timeout: (optional) Timeout per try in seconds.
303*1fa4b3daSHector Dearman      retries: (optional) Number of retries to attempt.
304*1fa4b3daSHector Dearman```
305*1fa4b3daSHector Dearman
306*1fa4b3daSHector Dearman
307*1fa4b3daSHector Dearman### AdbWrapper.Root
308*1fa4b3daSHector Dearman
309*1fa4b3daSHector DearmanRestarts the adbd daemon with root permissions, if possible.
310*1fa4b3daSHector Dearman```
311*1fa4b3daSHector Dearman    Args:
312*1fa4b3daSHector Dearman      timeout: (optional) Timeout per try in seconds.
313*1fa4b3daSHector Dearman      retries: (optional) Number of retries to attempt.
314*1fa4b3daSHector Dearman```
315*1fa4b3daSHector Dearman
316*1fa4b3daSHector Dearman
317*1fa4b3daSHector Dearman### AdbWrapper.Shell
318*1fa4b3daSHector Dearman
319*1fa4b3daSHector DearmanRuns a shell command on the device.
320*1fa4b3daSHector Dearman```
321*1fa4b3daSHector Dearman    Args:
322*1fa4b3daSHector Dearman      command: A string with the shell command to run.
323*1fa4b3daSHector Dearman      expect_status: (optional) Check that the command's exit status matches
324*1fa4b3daSHector Dearman        this value. Default is 0. If set to None the test is skipped.
325*1fa4b3daSHector Dearman      timeout: (optional) Timeout per try in seconds.
326*1fa4b3daSHector Dearman      retries: (optional) Number of retries to attempt.
327*1fa4b3daSHector Dearman
328*1fa4b3daSHector Dearman    Returns:
329*1fa4b3daSHector Dearman      The output of the shell command as a string.
330*1fa4b3daSHector Dearman
331*1fa4b3daSHector Dearman    Raises:
332*1fa4b3daSHector Dearman      device_errors.AdbCommandFailedError: If the exit status doesn't match
333*1fa4b3daSHector Dearman        |expect_status|.
334*1fa4b3daSHector Dearman```
335*1fa4b3daSHector Dearman
336*1fa4b3daSHector Dearman
337*1fa4b3daSHector Dearman### AdbWrapper.StartShell
338*1fa4b3daSHector Dearman
339*1fa4b3daSHector DearmanStarts a subprocess on the device and returns a handle to the process.
340*1fa4b3daSHector Dearman```
341*1fa4b3daSHector Dearman    Args:
342*1fa4b3daSHector Dearman      args: A sequence of program arguments. The executable to run is the first
343*1fa4b3daSHector Dearman        item in the sequence.
344*1fa4b3daSHector Dearman
345*1fa4b3daSHector Dearman    Returns:
346*1fa4b3daSHector Dearman      An instance of subprocess.Popen associated with the live process.
347*1fa4b3daSHector Dearman```
348*1fa4b3daSHector Dearman
349*1fa4b3daSHector Dearman
350*1fa4b3daSHector Dearman### AdbWrapper.Uninstall
351*1fa4b3daSHector Dearman
352*1fa4b3daSHector DearmanRemove the app |package| from the device.
353*1fa4b3daSHector Dearman```
354*1fa4b3daSHector Dearman    Args:
355*1fa4b3daSHector Dearman      package: The package to uninstall.
356*1fa4b3daSHector Dearman      keep_data: (optional) If set keep the data and cache directories.
357*1fa4b3daSHector Dearman      timeout: (optional) Timeout per try in seconds.
358*1fa4b3daSHector Dearman      retries: (optional) Number of retries to attempt.
359*1fa4b3daSHector Dearman```
360*1fa4b3daSHector Dearman
361*1fa4b3daSHector Dearman
362*1fa4b3daSHector Dearman### AdbWrapper.WaitForDevice
363*1fa4b3daSHector Dearman
364*1fa4b3daSHector DearmanBlock until the device is online.
365*1fa4b3daSHector Dearman```
366*1fa4b3daSHector Dearman    Args:
367*1fa4b3daSHector Dearman      timeout: (optional) Timeout per try in seconds.
368*1fa4b3daSHector Dearman      retries: (optional) Number of retries to attempt.
369*1fa4b3daSHector Dearman```
370*1fa4b3daSHector Dearman
371*1fa4b3daSHector Dearman
372*1fa4b3daSHector Dearman### AdbWrapper.\_\_eq\_\_
373*1fa4b3daSHector Dearman
374*1fa4b3daSHector DearmanConsider instances equal if they refer to the same device.
375*1fa4b3daSHector Dearman```
376*1fa4b3daSHector Dearman    Args:
377*1fa4b3daSHector Dearman      other: The instance to compare equality with.
378*1fa4b3daSHector Dearman
379*1fa4b3daSHector Dearman    Returns:
380*1fa4b3daSHector Dearman      True if the instances are considered equal, false otherwise.
381*1fa4b3daSHector Dearman```
382*1fa4b3daSHector Dearman
383*1fa4b3daSHector Dearman
384*1fa4b3daSHector Dearman### AdbWrapper.\_\_init\_\_
385*1fa4b3daSHector Dearman
386*1fa4b3daSHector DearmanInitializes the AdbWrapper.
387*1fa4b3daSHector Dearman```
388*1fa4b3daSHector Dearman    Args:
389*1fa4b3daSHector Dearman      device_serial: The device serial number as a string.
390*1fa4b3daSHector Dearman```
391*1fa4b3daSHector Dearman
392*1fa4b3daSHector Dearman
393*1fa4b3daSHector Dearman### AdbWrapper.\_\_repr\_\_
394*1fa4b3daSHector Dearman
395*1fa4b3daSHector Dearman### AdbWrapper.\_\_str\_\_
396*1fa4b3daSHector Dearman
397*1fa4b3daSHector DearmanThe string representation of an instance.
398*1fa4b3daSHector Dearman```
399*1fa4b3daSHector Dearman    Returns:
400*1fa4b3daSHector Dearman      The device serial number as a string.
401*1fa4b3daSHector Dearman```
402*1fa4b3daSHector Dearman
403*1fa4b3daSHector Dearman
404*1fa4b3daSHector Dearman## DeviceStat
405*1fa4b3daSHector Dearman
406*1fa4b3daSHector DearmanDeviceStat(st\_mode, st\_size, st\_time)
407*1fa4b3daSHector Dearman### DeviceStat.\_\_getnewargs\_\_
408*1fa4b3daSHector Dearman
409*1fa4b3daSHector DearmanReturn self as a plain tuple.  Used by copy and pickle.
410*1fa4b3daSHector Dearman### DeviceStat.\_\_getstate\_\_
411*1fa4b3daSHector Dearman
412*1fa4b3daSHector DearmanExclude the OrderedDict from pickling
413*1fa4b3daSHector Dearman### DeviceStat.\_\_repr\_\_
414*1fa4b3daSHector Dearman
415*1fa4b3daSHector DearmanReturn a nicely formatted representation string
416*1fa4b3daSHector Dearman### VerifyLocalFileExists
417*1fa4b3daSHector Dearman
418*1fa4b3daSHector DearmanVerifies a local file exists.
419*1fa4b3daSHector Dearman```
420*1fa4b3daSHector Dearman  Args:
421*1fa4b3daSHector Dearman    path: Path to the local file.
422*1fa4b3daSHector Dearman
423*1fa4b3daSHector Dearman  Raises:
424*1fa4b3daSHector Dearman    IOError: If the file doesn't exist.
425*1fa4b3daSHector Dearman```
426*1fa4b3daSHector Dearman
427*1fa4b3daSHector Dearman
428