2010-11-24 147 views

回答

5

设置shell命令超时5分钟(而不是5秒:-))更

diff --git a/tools/host/src/com/android/cts/TestDevice.java b/tools/host/src/com/android/cts/TestDevice.java 
index 65ff969..b8578bc 100644 
--- a/tools/host/src/com/android/cts/TestDevice.java 
+++ b/tools/host/src/com/android/cts/TestDevice.java 
@@ -18,6 +18,7 @@ package com.android.cts; 

import com.android.ddmlib.Client; 
import com.android.ddmlib.ClientData; 
+import com.android.ddmlib.DdmPreferences; 
import com.android.ddmlib.IDevice; 
import com.android.ddmlib.IShellOutputReceiver; 
import com.android.ddmlib.MultiLineReceiver; 
@@ -143,6 +144,7 @@ public class TestDevice implements DeviceObserver { 
     mDeviceInfo = new DeviceParameterCollector(); 
     mPackageActionTimer = new PackageActionTimer(); 
     mObjectSync = new ObjectSync(); 
+  DdmPreferences.setTimeOut(300000); 
    } 
+0

读取补丁很困难。请考虑格式化它。除此之外,你的解决方案似乎也适合我。谢谢。 – Robert 2011-02-02 19:58:58

0

有点笔记新手跟我一样:

  1. 下载Android源
  2. 申请修补程序,并用命令编译:make cts
  3. 复制新建文件cts.jar来替换库存的一个。

此问题修复了CTS超时问题,因为某些adb命令需要超过20秒才能在我的MotoA953设备上返回(其中之一为am instrument -w -e bundle true android.tests.devicesetup/android.tests.getinfo.DeviceInfoInstrument)。

相关问题