cts测试时可能遇到的问题

上一篇 / 下一篇  2011-02-12 12:05:40 / 个人分类:CTS

常见问题:

a)        问题描述:在执行paln时,执行一段时间后会抛异常,异常如下:

CTS_INFO >>> Restarting device ...
Device(HC09MPL00037) disconnected
Exception in thread "Thread-17" com.android.ddmlib.AdbCommandRejectedException: 
insufficient permissions for device
   at com.android.ddmlib.AdbHelper.setDevice(AdbHelper.java:736)
   at com.android.ddmlib.SyncService.openSync(SyncService.java:164)
   at com.android.ddmlib.Device.getSyncService(Device.java:253)
   at com.android.cts.DeviceManager$DeviceServiceMonitor.run(DeviceManager.java:217)

解决方案:是因为权限不够,提升至root权限可解决,命令如下$sudo ./startcts  这时可能会出现找不到java命令的错误,将startcts脚本文件中的最后一行的运行java命令添加上自己的java绝对路 径就可以了,如可改成:android/jdk1.5.0_19/bin/java ${JAVA_OPTS} -cp ${JARS}...)

b)        问题描述:输入./adbshell出现如下异常:

error: insufficient permissions for device

解决方案:输入:

$sudo -s

./adb kill-server

./adb devices

c)     问题描述:出现如下异常:Unable to locate  android-sdk-linux_86/tools/adb.

解决方案:是因为android-sdk-linux_86tools目录下没有adb文件,可以从platfrorm-tools目录下的adb文件拷贝到tools目录下,或者去SVN上取下

d)        问题描述:error: device not found

解决方法:1)请确认你的手机是否连接电脑,(2)以连接PC,重新拔下来,在连一次(3)如果2操作后还不行,看下USB连接方式是否为默认(仅充电),选htcUSB连接。

e)        写入测试结果时报Too many open files的错误,这是因为网络请求过多,也就导致了系统打开的文件过多。每一个连接都会当成“文件”看待的。

解决方案:ulimit –a命令查看每个用户允许打开的最大文件数,看到是的1024,把它改大点,用命令:ulimit -n 4096

 

补充说明:

为了避免一些没必要的错误,在测试前先更改一下手机设置:

1.   You need to download the TTS files via Settings > Speech synthesis > Install
voice data before running CTS tests. (Note that this assumes you have Android
Market installed on the device, if not you will need to install the files manually via
adb)

2. It is advisable to log in to the device with atestGoogleaccount, not an account
that you actually use.

3. Make sure the device has a SD card plugged in and the card is empty. Warning:
CTS may modify/erase data on the SD card plugged in to the device.

4. Do a factory data reset on the device (Settings > SD Card & phone storage >
Factory data reset). Warning: This will erase all user data from the phone.

5. Make sure no lock pattern is set on the device (Settings > Security & location >
Require Pattern should be unchecked.
Google Confidential

6. Make sure the "Screen Timeout" is set to "Never Timeout" (Settings > Sound &
Display > Screen Timeout should be set to "Never Timeout".

our board have not this selection, so we can select the longest time 30min

7. Make sure the "Stay Awake" development option is checked (Settings >
Applications > Development > Stay awake).

8. Make sure Settings > Application > Development > Allow mock locations is set
to true.

9. Make sure the device is at the home screen at the start of CTS (Press the home
button).

10. While a device is running tests, it must not be used for any other tasks.

11. Do not press any keys on the device while CTS is running. Pressing keys or
touching the screen of a test device will interfere with the running tests and may
lead to test failures.


TAG:

薇_笑的个人空间 引用 删除 薇_笑   /   2012-05-29 16:55:04
5
 

评分:0

我来说两句

日历

« 2024-05-07  
   1234
567891011
12131415161718
19202122232425
262728293031 

数据统计

  • 访问量: 21752
  • 日志数: 35
  • 建立时间: 2010-10-09
  • 更新时间: 2011-11-25

RSS订阅

Open Toolbar