Module: DroidAdbs::Devices

Defined in:
lib/droid_adbs/commons/devices.rb

Class Method Summary collapse

Class Method Details

.current_languageString

Returns message from adb command.

Examples:

result of message

"en"

Returns:

  • (String)

    message from adb command



37
38
39
40
41
42
# File 'lib/droid_adbs/commons/devices.rb', line 37

def current_language
  language = `#{::DroidAdbs.shell} getprop persist.sys.language`.strip
  return language unless language.empty?

  `#{::DroidAdbs.shell} getprop ro.product.locale.language`.strip
end

.current_localeString

Returns message from adb command.

Examples:

result of message

"ja-JP"

Returns:

  • (String)

    message from adb command



47
48
49
50
51
52
# File 'lib/droid_adbs/commons/devices.rb', line 47

def current_locale
  locale = `#{::DroidAdbs.shell} getprop persist.sys.locale`.strip
  return locale unless locale.empty?

  `#{::DroidAdbs.shell} getprop ro.product.locale`.strip
end

.device_build_version_releaseString

Returns message from adb command.

Examples:

result of message

4.2.2

Returns:

  • (String)

    message from adb command



23
24
25
# File 'lib/droid_adbs/commons/devices.rb', line 23

def device_build_version_release
  `#{::DroidAdbs.shell} getprop ro.build.version.release`.strip
end

.device_build_version_sdkString

Returns message from adb command.

Examples:

result of message

17

Returns:

  • (String)

    message from adb command



30
31
32
# File 'lib/droid_adbs/commons/devices.rb', line 30

def device_build_version_sdk
  `#{::DroidAdbs.shell} getprop ro.build.version.sdk`.strip
end

.device_fingerprintString

device infos

Examples:

result of message

docomo/SO-04E_1274-2936/SO-04E:4.2.2/10.3.1.B.0.256/_753rg:user/release-keys

Returns:

  • (String)

    message from adb command



8
9
10
# File 'lib/droid_adbs/commons/devices.rb', line 8

def device_fingerprint
  `#{::DroidAdbs.shell} getprop ro.build.fingerprint`.strip
end

.device_modelString

device infos

Examples:

result of message

SO-04E

Returns:

  • (String)

    message from adb command



16
17
18
# File 'lib/droid_adbs/commons/devices.rb', line 16

def device_model
  `#{::DroidAdbs.shell} getprop ro.product.model`.strip
end