Method: Fastlane::Helper::AdbHelper#load_all_devices

Defined in:
fastlane/lib/fastlane/helper/adb_helper.rb

#load_all_devicesObject



52
53
54
55
56
57
58
59
60
61
62
63
# File 'fastlane/lib/fastlane/helper/adb_helper.rb', line 52

def load_all_devices
  self.devices = []

  command = [adb_path.shellescape, host_option, "devices -l"].compact.join(" ")
  output = Actions.sh(command, log: false)
  output.split("\n").each do |line|
    if (result = line.match(/^(\S+)(\s+)(device )/))
      self.devices << AdbDevice.new(serial: result[1])
    end
  end
  self.devices
end