Android's GMS Certification

Source: Internet
Author: User
Tags home screen

Came to the new company, just know to do the mobile phone is required to do GMS certification. So from a small white to one months have not done a GMS certification to do 8 projects in the GMS certification. At last. I was vomiting all by myself. Every night is a person silly to work overtime. But also know that the support of Qualcomm to make people tremble, helpless shivering.
Here are a few notes I made for GMS certification. We are able to participate in the examination.
In fact, after I finished the GMS certification, I was thinking about how to make a person ignorant of a field to be able to handle it. Thought for a long time. I want to say that it should be accumulated .

The accumulation of experience, the accumulation of ability, the accumulation of confidence.

GMS Overview

GMS Certification. We are generally required to provide CTS. XTS. Verify three test reports. For example, with:

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

    • Cts:
      CTS (full name "Compatibility Test Suite". "Compatibility Test Pack"), which is a set 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. is also the soul of the Android system.

    • Verify:
      CTS are all instructions to take the initiative to test. But other tests have to be done manually, this is the verify test is a manual test.
1. Prepare the information:
    • GMS Certified video Files-android-cts-media-1.0.zip:
      Usage One:
      Create a new test folder with Bbb_full in it. Bbb_short. Copy_media.sh,make_zip.sh. README.txt), the phone needs to be copied android-cts-media-1.0.zip extracted to the test folder (in case of storage space is not supported by using the T card replacement)
      Usage Two:
      Go to the android-cts-media-1.1 folder and run:
      ./copy_media.shall. or ./copy_media.sh
      will be able to 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 under the (android-cts\repository\testcases) folder
    • 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 customers.

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)
  • The phone software needs to be the user version number (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: After daylight saving time is implemented. Pacific Tim will become gmt-7:00)
  • Open developer Options,settings–about phone– High-speed 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 FQ network, due to the need to connect to Google Server during the test)
  • Turn on Bluetooth, Settings–bluetooth
  • Turn on gps,settings-location-Open
  • Open the data connection. drop-down status bar-select data on
  • Installing ctsdeviceadmin.apk
    Ability to copy to SD card to install and install with command: adb install '/home/android/cts_hexiaoming/hexiaoming/ctsdeviceadmin.apk '
  • You can also use the command to copy the test folder to the SD card:
    ADB push '/home/android/cts_hexiaoming/hexiaoming/test '/sdcard/test
    (or go to the android-cts-media-1.1 folder and run:
    ./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 button during operation

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 and go to the Android-cts/tools folder. Input./cts-tradefed. Terminal display:

(Suppose there is no such line.) Indicates that the device is not connected to the PC)
3. Enter the run Cts–plan CTSand start testing the CTS
4. After testing, you will actively generate the XML report, in the Anroid-cts/repository/results folder (Testresult.xml).
5.LOG Information under folder: (Android-cts\repository\logs)

Normal case, CTS test can not all pass, then how to only test fail item?

    1. Manually change 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. Once again, 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 you will just continue to test those previous fail items without testing those already pass

How do we change the report?
For some test items. We have no environment. Not too much.

But we can make sure that this can pass, so we can change the report directly:
When we were changing the report. The previous pass and the next pass entry for the test item to be changed. The corresponding changes will be able, very simple. After the change, we let it run again. Generate a new test report to be able to.

Let's say we run a package or class alone:
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

view a number of other CTS command information:
' Run Cts–help '
L P ———— See what those features are
L packages--See what those bags are.

Precautions :
The command for 1.CTS 4.0 is completely different from the CTS 2.3/2.3, so after entering the CTS. Enter help first to see the format and meaning of the command.
2. Normal test once CTS4.0, need 6-9 hours. So, when testing, please connect the power supply, and try to test at night, will not affect the use of equipment
3.CTS is their own initiative to test, testing process without the need for VIP intervention. Let's say that every 1-2 hours you look at the office hours,
4.cts4.0 no test report is generated during the test, so. Before testing to ensure that the USB connection stability and Platform settings
5.CTS when running the run Cts–plan CTS, the History Reports folder in Android-cts/repository/results is searched. Assuming there are many files, the startup speed can be slow. So. Please periodically clean up the history report in the results folder (you can delete the report folder directly)

Problems:

    1. Sometimes, replication can cause some permissions problems. At this point, we are able to run sudo chmod 0777 filename to improve permissions.
    2. CTS Test High-speed entry--mtk-is important

      Id=53 ">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 order slightly accordingly, you can:
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. Then follow the instructions one step at a to be able to do it. Finally, we export the report.


Things to note:

  • The test still has a test order. General policy serialization test this test is the last Test, because this will cause the back Keyguard Password verification item too. We were able to test Keyguard Password verification at the start. The last Test policy serialization test.
  • Camera test, we want a test, not directly by the pass directly, is because the test report has the specific information of these test items.

  • Before testing accelerometer measurement tests, we select a default value in Settings-sound-default notification sound. Otherwise, the APK will be crash because it is not set. This item will not go through.
  • Streaming Video Quality verifier test item, RTSP three items, have wifi words can. But the three items of HTTP progressive are not. That is to say streaming Video Quality verifier test item is not over, this is normal phenomenon.

  • USB Accessory test Sometimes run 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.

  • The Bluetooth test test, which requires time and patience, should be done slowly. This is especially true for ble Client test tests.

    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 distinguish between uppercase and lowercase, this also need to pay attention to), this is because this is usually measured many times the talent pass, every time asked to start from the beginning, Enter the MAC address every time. Based on Test experience. General 4. BLE Reliable Write This is the key to whether this test can pass, I am usually 4. BLE Reliable write in the penultimate step to test. and enter the information several times (please do not enter only one letter at a time) until another phone's waiting on reliable the write from client test item shows green. Only last run 8. BLE Client Disconnect is able to pass this test.

  • Data backup test test item:
    Start with a test in CTS verifier, open Backup and Restore in Settings, 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

  • Test finished. We use the ADB Push command to export the test report.
    ADB pull/sdcard/ctsverifierreports/home/android/tmp

3.4 Some notes on test results:
    • The problem with the test results table header, in the documentation that requires the device information in the CTS and GTS, the signature file type in build fingerprint is release-key, that is. We test the software version number of the signature to use Release-key, for example, as seen in:

    • The properties attribute in the test results for GTS items in the documentation should contain 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.

4 Handling of Fail items
    • To Qualcomm case, to the MTK EService, because this general self can solve the less. The main is to rely on Qualcomm and MTK to solve.
    • Slowly accumulate your own fail item Library
    • Build up your ability to handle fail items slowly

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.