Merge "[TradefedCluster] Add Device Controller"
diff --git a/res/config/atest.xml b/res/config/atest.xml
index 2dbfed5..e2afcc6 100644
--- a/res/config/atest.xml
+++ b/res/config/atest.xml
@@ -14,9 +14,5 @@
      limitations under the License.
 -->
 <configuration description="Points to the TF entry point runner for atest.">
-  <target_preparer class="com.android.tradefed.targetprep.RootTargetPreparer">
-    <option name="force-root" value="false" />
-  </target_preparer>
-
   <test class="com.android.tradefed.testtype.suite.AtestRunner" />
 </configuration>
diff --git a/src/com/android/tradefed/device/cloud/RemoteAndroidVirtualDevice.java b/src/com/android/tradefed/device/cloud/RemoteAndroidVirtualDevice.java
index 97ab519..511023b 100644
--- a/src/com/android/tradefed/device/cloud/RemoteAndroidVirtualDevice.java
+++ b/src/com/android/tradefed/device/cloud/RemoteAndroidVirtualDevice.java
@@ -47,6 +47,8 @@
 import java.util.Arrays;
 import java.util.List;
 
+import javax.annotation.Nullable;
+
 /**
  * Extends {@link RemoteAndroidDevice} behavior for a full stack android device running in the
  * Google Compute Engine (Gce). Assume the device serial will be in the format
@@ -377,6 +379,22 @@
         return super.getTombstones();
     }
 
+    /**
+     * Returns the {@link GceAvdInfo} from the created remote VM. Returns null if the bring up was
+     * not successful.
+     */
+    public @Nullable GceAvdInfo getAvdInfo() {
+        if (mGceAvd == null) {
+            CLog.w("Requested getAvdInfo() but GceAvdInfo is null.");
+            return null;
+        }
+        if (!GceStatus.SUCCESS.equals(mGceAvd.getStatus())) {
+            CLog.w("Requested getAvdInfo() but the bring up was not successful, returning null.");
+            return null;
+        }
+        return mGceAvd;
+    }
+
     @VisibleForTesting
     boolean fetchRemoteDir(File localDir, String remotePath) {
         return RemoteFileUtil.fetchRemoteDir(
diff --git a/src/com/android/tradefed/util/PsParser.java b/src/com/android/tradefed/util/PsParser.java
index 58f0197..15dcc6b 100644
--- a/src/com/android/tradefed/util/PsParser.java
+++ b/src/com/android/tradefed/util/PsParser.java
@@ -16,8 +16,6 @@
 
 package com.android.tradefed.util;
 
-import com.android.tradefed.log.LogUtil.CLog;
-
 import java.util.ArrayList;
 import java.util.List;
 
@@ -64,7 +62,6 @@
          */
         for (int lineCount = startLineNum; lineCount < processLines.length; lineCount++) {
             String processInfoStr[] = processLines[lineCount].split(PROCESS_INFO_SEPARATOR);
-            CLog.i(processLines[lineCount]);
             ProcessInfo psInfo = new ProcessInfo(processInfoStr[0],
                     Integer.parseInt(processInfoStr[1]), processInfoStr[processInfoStr.length - 1]);
             processesInfo.add(psInfo);