I cannot list my Android devices in macOS because missed timeout file for sh command:
My suggestion to fix that:
# file: lib/mob_dev/discovery/android.ex
defp run_adb(args) do
cmd = Enum.join(["adb" | args], " ")
supporter =
case System.find_executable("timeout") do
timeout when is_binary(timeout) ->
"timeout 8"
nil ->
""
end
case System.cmd("sh", ["-c", "#{supporter} #{cmd}"], stderr_to_stdout: true) do
{output, 0} -> {:ok, output}
{_output, 124} -> {:error, "adb timed out"}
{output, _} -> {:error, output}
end
end
I cannot list my Android devices in macOS because missed timeout file for sh command:
My suggestion to fix that: