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 目录安装在列表中最常见的目录之上。

领域

PERM_PATTERN

static final Pattern PERM_PATTERN

公共构造函数

OverlayFsUtils

public OverlayFsUtils (BaseHostJUnit4Test test)

参数
test BaseHostJUnit4Test

公共方法

已安装的任何OverlayFs

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