ubuntu下Android4.4 CTS搭建(二)

  • 1.安装和配置helper apps

Note: For CTS versions 2.1 R2 through 4.2 R4, set up your device (or emulator) to run the accessibility tests with:adb install -r android-cts/repository/testcases/CtsDelegatingAccessibilityService.apkOn the device, enable: Settings > Accessibility > Accessibility > Delegating Accessibility ServiceNote: For CTS 2.3 R4 and beyond on devices that declare the android.software.device_admin feature, set up your device to run the device administration tests with:adb install -r android-cts/repository/testcases/CtsDeviceAdmin.apk

(1)在手机上安装:

 adb install -r android-cts/repository/testcases/CtsDeviceAdmin.apk 

注意:如果adb无法使用或者遇到错误,需要安装apt-get install lib32z1以及apt-get install lib32z1-dev

(2)On the device, enable only the two android.deviceadmin.cts.CtsDeviceAdminReceiver* device administrators under: Settings > Security > device administrators. Make sure the android.deviceadmin.cts.CtsDeviceAdminDeactivatedReceiver and any other preloaded device administrators stay disabled in the same menu.

  • 2Copy the CTS media files to the device as follows:

Note: For CTS 2.3 R12 and beyond, if the device supports video codecs, the CTS media files must be copied to the device.

  Navigate (cd) to the path the media files are downloaded and unzipped to.
  Change the file permissions: chmod u+x copy_media.sh
  Run copy_media.sh:
      To copy clips up to a resolution of 720x480, run: ./copy_media.sh 720x480
      If you are not sure about the maximum resolution, try ./copy_media.sh all so that all files are copied.
      If there are multiple devices under adb, add the -s (serial) option to the end. For example, to copy up to 720x480 to the device with serial 1234567, run: ./copy_media.sh 720x480 -s 1234567 

如果./copy_medio.sh出错,“[”问题,可能是因为Ubuntu默认的不是bash,可以进行如下操作解决。 先用命令ls -l /bin/sh 看看 ,发现Ubuntu默认采用的是 dash 如果要修改默认的sh,可以采用命令:sudo dpkg-reconfigure dash再次运行./copy_media.sh all,完成

  • 3设置手机
  1. Factory data reset the device: Settings > Backup & reset > Factory data reset
  2. Set your device’s language to English (United States) from: Settings > Language & input > Language
  3. Turn on the location setting if there is a GPS or Wi-Fi / Cellular network feature on the device: Settings > Location
  4. Connect to a Wi-Fi network that supports IPv6, can treat the Device Under Test (DUT) as an isolated client (see the Physical Environment section above), and has an internet connection: Settings > Wi-Fi
  5. Make sure no lock pattern or password is set on the device: Settings > Security > Screen lock = 'None'
  6. Enable USB debugging on your device: Settings > Developer options > USB debugging.
  7. Select: Settings > Developer options > Stay Awake
  8. Select: Settings > Developer options > Allow mock locations
  9. Launch the browser and dismiss any startup/setup screen.
  10. Connect the desktop machine that will be used to test the device with a USB cable

Note: When you connect a device running Android 4.2.2 or later to your computer, the system shows a dialog asking whether to accept an RSA key that allows debugging through this computer. Select Allow USB debugging.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值