Home | History | Annotate | Download | only in privapp_permissions

Lines Matching refs:serial

79     def __init__(self, path, serial=None):
81 self.serial = serial
84 """A wrapper for `adb -s <SERIAL> pull <src> <dst>`.
108 command = '%s -s %s %s' % (self.path, self.serial, cmdline)
133 adb: A wrapper class around ADB with a default serial. Only needed when
139 serial=None, apks=None):
145 use_device = use_device or serial or \
148 self.adb.serial = self._resolve_serial(use_device, serial)
150 if self.adb.serial:
154 if self.adb.serial is None and not self._is_android_env:
223 def _resolve_serial(self, device, serial):
224 """Resolves the serial used for device files or generating permissions.
227 If -s/--serial is specified, it will return that serial.
231 MissingResourceError if the resolved serial would not be usable.
235 if serial:
238 (self.adb.path, serial))
242 'device with serial "%s". Is it connected and in '
243 'device mode?' % serial)
247 'into device mode and try again.' % serial)
248 return serial
251 serial = os.environ['ANDROID_SERIAL']
252 command = '%s -s %s get-state' % (self.adb, serial)
257 'Device with serial $ANDROID_SERIAL ("%s") not '
258 'found.' % serial)
260 return serial
262 'Device with serial $ANDROID_SERIAL ("%s") was '
274 'which device to run against with flag --serial.')
303 (device_apk, self.adb.serial))
322 'device "%s".' % self.adb.serial)
357 'build already on a device. See -s/--serial below for more '
376 '--serial',
379 metavar='<SERIAL>',
380 help='The serial of the device to generate permissions for. If no '
381 'serial is given, it will pick the only device connected over '
572 serial=args.serial,