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