Class: AdbDevice::Device

Inherits:
Object
  • Object
show all
Defined in:
lib/adb_device.rb

Instance Method Summary collapse

Constructor Details

#initialize(sn) ⇒ Device

Returns a new instance of Device.



7
8
9
# File 'lib/adb_device.rb', line 7

def initialize(sn)
  @sn = sn
end

Instance Method Details

#brandObject



11
12
13
14
# File 'lib/adb_device.rb', line 11

def brand
  output = `adb -s #{@sn} shell getprop ro.product.brand`
  brand = output.tr("\n", "")
end

#modelObject



16
17
18
19
# File 'lib/adb_device.rb', line 16

def model
  output = `adb -s #{@sn} shell getprop ro.product.model`
  model = output.tr("\n", "")
end