Lines Matching refs:self

86     def __init__(self, conn_type, remote_ip="", device_sn="", repote_port="", name=""):
87 self.conn_type = conn_type
88 self.device_sn = device_sn
89 self.name = name
90 self.test_path = "data/test"
92 self.device_params = self.get_device_hdc_para(
96 self.device_params = self.get_device_para(
98 self.init_device()
164 def remount(self):
165 if self.conn_type:
169 command = "%s %s %s" % (HDC_TOOLS, self.device_params, remount)
170 self.execute_command(command)
172 def init_device(self):
173 self.remount()
174 self.shell('rm -rf %s' % self.test_path)
175 self.shell('mkdir -p %s' % self.test_path)
176 self.shell('chmod 777 -R %s' % self.test_path)
177 self.shell("mount -o rw,remount,rw /%s" % "system")
179 def unlock_screen(self):
180 self.shell("svc power stayon true")
182 def unlock_device(self):
183 self.shell("input keyevent 82")
184 self.shell("wm dismiss-keyguard")
186 def push_file(self, srcpath, despath):
187 if self.conn_type:
193 self.device_params,
197 return self.execute_command(command)
199 def pull_file(self, srcpath, despath):
200 if self.conn_type:
206 self.device_params,
210 return self.execute_command(command)
212 def lock_screen(self):
213 self.shell("svc power stayon false")
215 def disable_keyguard(self):
216 self.unlock_screen()
217 self.unlock_device()
219 def shell(self, command=""):
220 return self.execute_command("%s %s shell %s%s%s" % (
222 self.device_params,
227 def shell_with_output(self, command=""):
228 return self.execute_command_with_output("%s %s shell %s%s%s" % (
230 self.device_params,