def cmd(self, *args, **kwargs):
        serial = self.device_serial()
        if serial:
            if " " in serial:  # TODO how to include special chars on command line
                serial = "'%s'" % serial
            return self.raw_cmd(*["-s", serial] + list(args))
        else:
            return self.raw_cmd(*args)
adb command, add -s serial by default. return the subprocess.Popen object.
dataset/ETHPy150Open xiaocong/uiautomator/uiautomator/__init__.py/Adb.cmd