2010-11-24 142 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)。

相關問題