summaryrefslogtreecommitdiff
path: root/cmds/sm/src
diff options
context:
space:
mode:
authorJeff Sharkey <jsharkey@android.com>2016-04-01 23:20:31 -0600
committerJeff Sharkey <jsharkey@android.com>2016-04-02 19:31:19 -0600
commitb5e89c6debca90be92bf5bc2e0e79d109de6d08f (patch)
tree0a5caae160e405b7bce6943572bff0c76bff8c99 /cmds/sm/src
parent6855c48093e109c92df39340a8355a3be2540b8e (diff)
Support direct-boot tests.
Add shell commands to check on current FBE status and system ready status. Mark variables without first-class locking as volatile. Fix bug where UI automation would crash while device was locked by marking it as forced direct-boot aware. Bug: 26498834 Change-Id: Ib4dfb9350925e5413f93a09baacf84c62f2ba0ea
Diffstat (limited to 'cmds/sm/src')
-rw-r--r--cmds/sm/src/com/android/commands/sm/Sm.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/cmds/sm/src/com/android/commands/sm/Sm.java b/cmds/sm/src/com/android/commands/sm/Sm.java
index b208e438f171..0e674c864137 100644
--- a/cmds/sm/src/com/android/commands/sm/Sm.java
+++ b/cmds/sm/src/com/android/commands/sm/Sm.java
@@ -88,6 +88,8 @@ public final class Sm {
runForget();
} else if ("set-emulate-fbe".equals(op)) {
runSetEmulateFbe();
+ } else if ("get-fbe-mode".equals(op)) {
+ runGetFbeMode();
} else {
throw new IllegalArgumentException();
}
@@ -145,6 +147,16 @@ public final class Sm {
StorageManager.DEBUG_EMULATE_FBE);
}
+ public void runGetFbeMode() {
+ if (StorageManager.isFileEncryptedNativeOnly()) {
+ System.out.println("native");
+ } else if (StorageManager.isFileEncryptedEmulatedOnly()) {
+ System.out.println("emulated");
+ } else {
+ System.out.println("none");
+ }
+ }
+
public void runPartition() throws RemoteException {
final String diskId = nextArg();
final String type = nextArg();