OverlayFsUtils

public class OverlayFsUtils
extends TestWatcher

java.lang.Object
org.junit.rules.TestWatcher
com.android.sts.common.OverlayFsUtils


允许写入只读分区并在完成后重启设备的 TestWatcher。

概括

领域

static final Pattern PERM_PATTERN

公共构造函数

OverlayFsUtils (BaseHostJUnit4Test test)

公共方法

boolean anyOverlayFsMounted ()
void finished (Description d)
void makeWritable (String dir, int megabytes)

将 OverlayFS 目录挂载到列表中最常见的目录之上。

领域

烫发模式

static final Pattern PERM_PATTERN

公共构造函数

OverlayFsUtils

public OverlayFsUtils (BaseHostJUnit4Test test)

参数
test BaseHostJUnit4Test

公共方法

anyOverlayFsMounted

public boolean anyOverlayFsMounted ()

退货
boolean

投掷
DeviceNotAvailableException

完成的

public void finished (Description d)

参数
d Description

使可写

public void makeWritable (String dir, 
                int megabytes)

将 OverlayFS 目录挂载到列表中最常见的目录之上。

成功返回后,该目录应该是可写的。要清理,请重新启动设备,因为不幸的是卸载 overlayfs 很复杂。

参数
dir String :要使其可写的目录。不支持带单引号的目录。

megabytes int

投掷
DeviceNotAvailableException
IOException
IllegalStateException