Пример #1
0
 def _background(self, command, stdout, stderr, as_root):
     adb_shell, pid = adb_background_shell(self, command, stdout, stderr,
                                           as_root)
     bg_cmd = AdbBackgroundCommand(conn=self,
                                   adb_popen=adb_shell,
                                   pid=pid,
                                   as_root=as_root)
     return bg_cmd
Пример #2
0
 def background(self, command, stdout=subprocess.PIPE, stderr=subprocess.PIPE, as_root=False):
     adb_shell, pid = adb_background_shell(self, command, stdout, stderr, as_root)
     bg_cmd = AdbBackgroundCommand(
         conn=self,
         adb_popen=adb_shell,
         pid=pid,
         as_root=as_root
     )
     self._current_bg_cmds.add(bg_cmd)
     return bg_cmd