Exemplo n.º 1
0
 public function run(array $context = [])
 {
     $this->adb->connect();
     if (stripos($this->adb->shell->output, 'connected') !== false) {
         $this->adb->exec('devices');
         if (strpos($this->adb->shell->output, "{$this->adb->host}\tdevice") !== false) {
             $this->logger->notice('adb connection established successfully.');
             return Manager::RET_LOOP;
         } else {
             $this->failure('devices');
         }
     } else {
         $this->failure('connect');
     }
 }