Android's GMS Certification

Source: Internet
Author: User
Tags home screen

GMS Overview

GMS Certification, general requirements we provide CTS, XTS, verify three test reports, such as:

Bin: Certified Software
Cts:cts's Test report
Gts:xts's Test report
Ctsverifierreports:verify Test Report

    • Cts:
      CTS (full name "Compatibility Test Suite", which is the "Compatibility Test Package"), a collection of. APK programs that can be tested on the website (http://source.android.com/ Compatibility/downloads.html) above for free download. The purpose of the CTS is to enable developers of Android devices, such as mobile phones, to develop better-compatible Android devices.
    • Gts:
      The GMS is all called Google Mobile service, or Google mobility. The GMS is the driving force for Google to develop and drive Android, and the soul of the Android system.
    • Verify:
      CTS are instruction automated tests, but there are some tests that have to be done manually, and this is a verify test or manual test.
1. Prepare the information:
    • GMS Certified video Files-android-cts-media-1.0.zip:
      use method One:
      New test folder (with Bbb_full,bbb_short,copy_media.sh,make_zip.sh,readme.txt inside), The phone needs to be copied android-cts-media-1.0.zip extracted to the test directory (using the T card instead of storage space is not supported)
      use method Two:
      Enter the android-cts-media-1.1 directory and execute:
      ./copy_media.shall, or ./copy_media.sh
      You can copy the video on the phone, very convenient and fast.
    • Android-cts file
      Decompression Android-cts-4.4_r1-linux_x86-arm.zip
    • ctsdeviceadmin.apk
      This apk is located in the (android-cts\repository\testcases) directory
    • Android-gts file
      Decompression Gts-2.1_r1.zip
    • ctsverifier.apk
      (Decompression android-cts-verifier-4.4_r3-linux_x86-arm.zip)

This information can be downloaded from the official website:
http://source.android.com/compatibility/downloads.html Website
Can also be provided by the customer.

2. Mobile-ready
  • Need insert empty SD card
  • Insert valid SIM Card
  • Set phone language to English: Enter Settings–language&input–language set to 中文版 (UnitedStates)
  • Input method by default using Android IME, Settings–language&input–default-english (US)
  • Mobile software needs to be user version (please use the ADB remount command to view), need to write IMEI (please press * #06 # view), Mac code (settings–about Phon–statu–wlan MAC address)
  • Remove the lock screen (Settings–security–screen lock–none)
  • Setting the screen time-out to 30 minutes maximum (settings–display–sleep–30minutes)
  • Go to Settings–date & time– Cancel automatic date&time tick, cancel automatic time zone tick, select time zone, choose gmt-8:00 Pacific Time (Note: Pacific Tim will become gmt-7:00 when daylight saving time is applied)
  • Open Developer Options,settings–about phone– Quick Click build number 7 times
  • Settings–developer Options–stay awake and USB debugging allow mock locations tick
  • Turn on WiFi and connect to the AP (requires a web that can turn over the wall, because Google's servers need to be connected during testing)
  • Turn on Bluetooth, Settings–bluetooth
  • Turn on gps,settings-location-Open
  • Open data connection, drop-down status bar-select data on
  • Installing ctsdeviceadmin.apk
    Can be copied to the SD card and then installed, can also be installed using the command: adb install '/home/android/cts_hexiaoming/hexiaoming/ctsdeviceadmin.apk '
  • Copy the test folder to an SD card, or you can use the command:
    ADB push '/home/android/cts_hexiaoming/hexiaoming/test '/sdcard/test
    (or go to the android-cts-media-1.1 directory and execute:
    ./copy_media.shall, or ./copy_media.sh)
  • Settings-security–device administrators– tick the top three options on the Device administrators list, the last one unchecked
  • Run-time let the screen be on the home main interface
  • Do not touch the screen and buttons while running

Note:
-While a device was running tests, it must not being used for any other tasks
-Before start CTS, device at the home screen
-Do not press any keys on the device while CTS is running
-Make sure the AP is usability and connectedly.
-Make sure USB cable is stability

3.PC Terminal: (Ubuntu System) 3.1 CTS test

Android-cts file (Unzip)
1. Connect a Linux PC with a USB cable
2. Open the terminal, enter the Android-cts/tools directory, enter the./cts-tradefed. Terminal display:

(if there is no line, the device is not connected to the PC)
3. Enter run Cts–plan CTSto begin testing CTS
4. When the test is complete, an XML report is automatically generated in the Anroid-cts/repository/results directory (testresult.xml).
5.LOG information in the directory: (android-cts\repository\logs)

In general, the CTS test does not pass all at once, so how can I test the fail item only?

    1. Manually modify the Testresult.xml, using Gedit to open the file (Gedit testresult.xml).
    2. Select the Find search failed item, replace with Notexecuted, and then save,

    3. Re-enter ./cts-tradefedcts-tf-> run cts–continue-session session_id
      PS:SESSION_ID can be seen by entering L R in the CTS command line. For example, enter L r to see the session_id is 0 then you should enter run Cts–continue-session 0 on the command line of the CTS so that it will only continue to test those items that were previously fail without testing those that have already been pass.

How we modify the report
For some test items, we have no environment, too. But we can make sure that this can be pass, so we can modify the report directly:
When we change the report, we refer to the previous pass and the next pass item of the test item to be modified, which is very simple. After the change, we'll let it run again and generate a new test report.

If we run a package or class individually:
To run a test package:
' Run Cts–package '
Run Cts-p Android.os
To run a test class:
' Run Cts–class '
run cts-c android.app.cts.systemfeaturestest-m testsensorfeatures
Run Cts-c Android.os.cts.Asyn

See more CTS command information:
' Run Cts–help '
L P ———— See what those features are
L packages--See what those bags are.

Precautions :
The 1.CTS 4.0 command is completely different from the CTS 2.3/2.3, so after entering the CTS, enter help to see the format and meaning of the command.
2. Normal test once CTS4.0, need 6-9 hours. So, when testing, please plug in the power, and try to test in the evening, will not affect the use of equipment
3.CTS is an automated test that requires no human intervention during the test. If you look at it every 1-2 hours during work hours,
4.cts4.0 no test reports are generated during the test, so ensure that the USB connection is stable and the platform is set up before testing
5.CTS when the run Cts–plan CTS is executed, the History Reports folder in Android-cts/repository/results is searched. If there are many files, the boot speed will be very slow. Therefore, periodically clean up the history report in the results folder (you can delete the report folder directly)

Problems:

    1. Sometimes, replication causes some permissions problems, at which point we can run sudo chmod 0777 filename to improve permissions.
    2. CTS Test QuickStart--mtk-Very Important
      https://onlinesso.mediatek.com/_layouts/15/mol/topic/ext/Topic.aspx?id=53
3.2 XTS test:

Android-gts file (unzip Gts-2.1_r1.zip)
The XTS test is the same as the CTS, just to change the command a little bit:
Run Xts–plan xts
Run xts–continue-session session_id
Run Xts-p Android.os
Run Xts-c android.app.cts.systemfeaturestest-m testsensorfeatures

3.3 Manual Test Cts-verifier:

ctsverifier.apk--(Decompression android-cts-verifier-4.4_r3-linux_x86-arm.zip)
This is a manual test, we just need to install this apk, and then follow the instructions to step through it. Finally, we export the report.

Things to note:

  • This test still has a test order, and the general policy serialization test this test item is last tested, because this item will cause the Keyguard Password verification entry in the back. We can test the Keyguard Password verification at the very beginning, and the last Test policy serialization testing.
  • Camera test items, we want a test, not directly by the pass directly, because the test report has the details of these test items.
  • Before testing the accelerometer measurement tests, we chose a default value in the SETTINGS-SOUND-DEFAULT notification sound, otherwise it might not be set, and the APK would crash, This item will not go through.
  • Streaming Video Quality verifier test items, rtsp three items, have WiFi words can be over, but the HTTP progressive three items are not. That is to say streaming Video Quality verifier test item is not over, this is normal phenomenon.
  • USB Accessory test Sometimes executes commands, is no effect, this may be the cause of the computer, change the computer to try several times.
    USB accessory test in CTS Verifier, follow up below steps to Test this item:
    1) Install ctsverifier.apk to the phone device.
    2) Add "18D1:2D01" Device to/etc/udev/rules.d/51-android.rules, and restart
    About Add "18d1:2d01" Device To/etc/udev/rules.d/51-android.rules,
    Hlep to refer SOP part of "Setup CTS Environment (3/4)"
    Ubuntu 10.4
    New a udev configuration file for the USB and change the mode
    sudo touch/etc/udev/rules.d/51-android.rules
    sudo chmod a+rw/etc/udev/rules.d/51-android.rules
    Add the below string in 51-android-rules to setup the USB
    subsystem== "USB", attrs{idvendor}== "0bb4", attrs{idproduct}== "0c03", mode= "0666"
    Restart the Udev service to update the configuration
    sudo restart Udev
    Restart the Ubuntu
    After connecting the Android device to the PC, type Lsusb and you should see the below string if the connection is success :
    Example
    Bus 002 Device 002:id 0bb4:0c03 High Tech computer Corp.
    3) Connect the phone to a Linux PC with ADB enabled
    4) Run cts-usb-accessory on Linux PC, wait for until "Found Android device in accessory mode (18D1:2D01)
    5) Device would pops a prompt to Cts-verifier, start the CTS verifier and run USB accessory test.
    6) Make sure no other devices connnect to the PC.

  • Bluetooth test items, the comparison takes time and patience, to be slow to operate. This is especially true of the BLE Client test. When we test this, we can first note the MAC address (can write some simple MAC address, such as (11:11:11:11:11:11) MAC address to be case-sensitive, this also should be noted), this is because this item is generally measured several times to pass, each request from the beginning, Enter the MAC address every time. According to the Test experience, generally 4. BLE Reliable Write This is the key that this test can pass, I generally am 4. BLE Reliable Write is tested in the penultimate step and multiple inputs (please do not enter only one letter at a time) until the waiting on Reliable the write from client test item on the other phone shows Green before the last execution of 8. BLE Client Disconnect can pass this test.

  • Data Backup test items:
    Start with a test in CTS verifier, open Backup and restore in Settings, and click Generate test Data->ok
    ADB shell Bmgr Enable true
    ADB Shell Bmgr Transport Android/com.android.internal.backup.localtransport
    ADB Shell Bmgr Run
    ADB uninstall Com.android.cts.verifier
    ADB install F:\CTS4.0\CTS4.0.3_r2\apk4.0.3_r2\CtsVerifier_4.0.3_r1.apk

  • After testing, we use the ADB Push command to export the test report.
    ADB pull/sdcard/ctsverifierreports/home/android/tmp

3.4 Some notes of the test results:
    • The problem with the test results table header in the document requires that the signature file type in the CTS and GTS device information in build fingerprint be release-key, that is, we test the software version of the signature to use Release-key as shown in:

    • The properties attribute in the test results of the GTS item that is required in the document should include the Ro.com.google.gmsversion, Ro.com.google.clientidbase, and some clients have a requirement for Ro.com.google.clientidbase's name. For example, a ro.com.google.clientidbase item is missing.

    • -

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

Android's GMS Certification

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.