thaliproject / CI

CI project for testing mobile devices
MIT License
2 stars 3 forks source link

Handle unauthorized Android devices #32

Closed vjrantal closed 8 years ago

vjrantal commented 8 years ago

Devices may sometimes be unauthorized for adb access:

pi@thali05 ~ $ adb devices
List of devices attached 
LGH8153b36be34    unauthorized

Currently android.js has code like:

  if (res[0].indexOf("List of devices") == 0) {
    for (var i = 1; i < res.length; i++) {
      if (res[i].trim().length == 0) continue;
      if (res[i].indexOf('offline') > 0) {
        logme("Warning: Phone " + res[i] + " OFFLINE");
        continue; // phone offline
      }
      var dev = res[i].split('\t');

This code should be updated to also take into account the unauthorized case.