Class: Fastlane::Actions::AdbDevicesAction
Constant Summary
Fastlane::Action::AVAILABLE_CATEGORIES, Fastlane::Action::RETURN_TYPES
Class Method Summary
collapse
action_name, author, deprecated_notes, lane_context, method_missing, other_action, return_type, shell_out_should_use_bundle_exec?, step_text
Class Method Details
.authors ⇒ Object
64
65
66
|
# File 'fastlane/lib/fastlane/actions/adb_devices.rb', line 64
def self.authors
["hjanuschka"]
end
|
.available_options ⇒ Object
27
28
29
30
31
32
33
34
35
36
|
# File 'fastlane/lib/fastlane/actions/adb_devices.rb', line 27
def self.available_options
[
FastlaneCore::ConfigItem.new(key: :adb_path,
env_name: "FL_ADB_PATH",
description: "The path to your `adb` binary (can be left blank if the ANDROID_SDK_ROOT environment variable is set)",
is_string: true,
optional: true,
default_value: "adb")
]
end
|
.category ⇒ Object
56
57
58
|
# File 'fastlane/lib/fastlane/actions/adb_devices.rb', line 56
def self.category
:misc
end
|
.description ⇒ Object
17
18
19
|
# File 'fastlane/lib/fastlane/actions/adb_devices.rb', line 17
def self.description
"Get an array of Connected android device serials"
end
|
.details ⇒ Object
21
22
23
24
25
|
# File 'fastlane/lib/fastlane/actions/adb_devices.rb', line 21
def self.details
[
"Fetches device list via adb, e.g. run an adb command on all connected devices."
].join("\n")
end
|
.example_code ⇒ Object
41
42
43
44
45
46
47
48
49
50
|
# File 'fastlane/lib/fastlane/actions/adb_devices.rb', line 41
def self.example_code
[
'adb_devices.each do |device|
model = adb(command: "shell getprop ro.product.model",
serial: device.serial).strip
puts "Model #{model} is connected"
end'
]
end
|
.is_supported?(platform) ⇒ Boolean
68
69
70
|
# File 'fastlane/lib/fastlane/actions/adb_devices.rb', line 68
def self.is_supported?(platform)
platform == :android
end
|
.output ⇒ Object
38
39
|
# File 'fastlane/lib/fastlane/actions/adb_devices.rb', line 38
def self.output
end
|
.return_value ⇒ Object
60
61
62
|
# File 'fastlane/lib/fastlane/actions/adb_devices.rb', line 60
def self.return_value
"Returns an array of all currently connected android devices"
end
|
.run(params) ⇒ Object
7
8
9
10
11
|
# File 'fastlane/lib/fastlane/actions/adb_devices.rb', line 7
def self.run(params)
adb = Helper::AdbHelper.new(adb_path: params[:adb_path])
result = adb.load_all_devices
return result
end
|
.sample_return_value ⇒ Object
52
53
54
|
# File 'fastlane/lib/fastlane/actions/adb_devices.rb', line 52
def self.sample_return_value
[]
end
|