RootcanalUtils.RootcanalController

public static class RootcanalUtils.RootcanalController
extends Object implements AutoCloseable

java.lang.Object
   ↳ com.android.sts.common.RootcanalUtils.RootcanalController


摘要

公共方法

void close()
RootcanalUtils.HciDevice createHciDevice()

通过连接到 rootcanal 的 HCI 套接字创建新的 HCI 设备。

String sendTestChannelCommand(String cmd, String... args)

向 rootcanal 测试渠道发送一条命令。

公共方法

关闭

public void close ()

抛出
IOException

createHciDevice

public RootcanalUtils.HciDevice createHciDevice ()

通过连接到 rootcanal 的 HCI 套接字创建新的 HCI 设备。

返回
RootcanalUtils.HciDevice 允许从 HCI 端口发送/接收的 HciDevice 对象

抛出
DeviceNotAvailableException
IOException
InterruptedException

sendTestChannelCommand

public String sendTestChannelCommand (String cmd, 
                String... args)

向 rootcanal 测试渠道发送一条命令。

发送 `help` 命令以获取 Rootcanal 接受的命令列表。

参数
cmd String:要发送的命令

args String:命令的参数

返回
String 来自 rootcanal 的响应字符串

抛出
IOException
InterruptedException