commit | 4b6ebad524d396d9dcd658576612bb5bffc4a7a7 | [log] [tgz] |
---|---|---|
author | Julien Desprez <jdesprez@google.com> | Mon Jun 13 10:56:49 2016 +0100 |
committer | Julien Desprez <jdesprez@google.com> | Wed Jun 15 18:51:19 2016 +0100 |
tree | cb52b9615dba2086498d4ea898b554d9df2b51f9 | |
parent | 782446dbaccc92443207d89ed965a8d7afda0b14 [diff] |
Fix Adb root/unroot for encryption test These steps are causing issue with Gce devices, root should be done via the ITestDevice API enableAdbRoot. Bug: 29127775 Change-Id: I0abc2f0d8d173f72ae2c6eb93bbcf58ffe95efd1
diff --git a/hostsidetests/security/src/android/security/cts/EncryptionHostTest.java b/hostsidetests/security/src/android/security/cts/EncryptionHostTest.java index 5e12143..8d9e576 100644 --- a/hostsidetests/security/src/android/security/cts/EncryptionHostTest.java +++ b/hostsidetests/security/src/android/security/cts/EncryptionHostTest.java
@@ -41,9 +41,15 @@ if (!mUserDebug) { return; } + mDevice.enableAdbRoot(); + } - mDevice.executeAdbCommand("root"); - assertTrue(mDevice.isAdbRoot()); + @Override + protected void tearDown() throws Exception { + if (mUserDebug) { + mDevice.disableAdbRoot(); + } + super.tearDown(); } public void testEncrypted() throws DeviceNotAvailableException {