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