GMS认证软件问题参考

1.android.bluetooth.cts.BluetoothLeScanTest#testBasicBleScan    

fail

junit.framework.AssertionFailedError: Scanresults shouldn't be empty

android.bluetooth.cts.BluetoothLeScanTest#testBatchScan         

fail

junit.framework.AssertionFailedError

android.bluetooth.cts.BluetoothLeScanTest#testOpportunisticScan   

fail

junit.framework.AssertionFailedError: Scanresults shouldn't be empty

android.bluetooth.cts.BluetoothLeScanTest#testScanFilter 

fail

junit.framework.AssertionFailedError:Scan results shouldn't be empty

环境问题,可以忽略


2

1.      最新的安全补丁可以到MOL—Quick start—CTS—google security patch上查看并申请

2.      查看设置关于手机中有关于安全补丁的日期

3.      系统代码在build/core/version_default.mk中定义:PLATFORM_SECURITY_PATCH:= 2017-12-05

系统读取安全补丁日期是通过读取property:ro.build.version.security_patch


3

GoogleDialer内置导致系统无法安装第三方app,且系统一直循环报错(GooglePackageInstaller报错)

 Fatal exception

E DeviceDoctorHandler: FATAL EXCEPTION:GoogleLocationService

E AndroidRuntime:java.lang.SecurityException: "gps" location provider requires

等报错信息

系统/frameworks/base/services/core/java/com/android/server/pm/DefaultPermissionGrantPolicy.java,默认给Dialer赋予了permission,因此去掉此permission就不会造成此错误(建议给权限前先进行非空处理,之前直接给权限没判断非空,而google代码在给权限前判断了非空的。如果不判断非空,而直接给某应用权限,当没有预置该应用时,会导致各种异常,比如无法安装第三方apk)

4

开机第一帧添加“Powered by Android”标准文档,实验室送测问题反馈

反馈类似如下:

the “powered by Android” mark can beno larger than 90% of the complete partner logo size.;

“powered by Android”图标大小要小于系统logo的90%

a The “Powered byAndroid” mark cannot be modified or altered inany ways.

“Powered by Android”不能改动(大小、粗细)

bThe boot upsequence frames must be layered over a solid light ordark background color.

For dark or bright colored background, use #FFFFFF colorfont forthe Android mark.

For a light colored background, use #757575 color font fortheAndroid mark.

字体的颜色不能改,按照官方给的图片

 c power byandroid logo should not smaller than 25% of the device width and no larger than50% of the width

“Powered by Android”不能小于屏幕宽度的25%,也不能大于屏幕宽度的50%

5

系统要求支持分屏,会有fail项:cts测试CtsServicesHostTestCases中多项出现:unit.framework.AssertionFailedError:There should be one and only one resumed activity in the system.expected:<1> but was:<0>

修改文件:

1、frameworks\base\core\res\res\values\config.xml

         false

true

        

2、frameworks\base\core\res\res\values\other_symbols.xml

        

 

3、frameworks\base\core\java\android\app\ActivityManager.java

                   staticpublic boolean supportsMultiWindow() {

       return !isLowRamDeviceStatic()

&&Resources.getSystem().getBoolean(

                   com.android.internal.R.bool.zzz_config_supportsMultiWindowKST);

}

6

ExpressPlus中提到使用SearchLauncher和系统launcher3的整合范例代码(可以直接使用,及部分注意事项)

将原生packages/apps/Launcher3/ 复制到vendor/google/app/Seachlauncher目录下

删除掉/Seachlauncher/Launcher3/里面的res_op09目录

删除掉/Seachlauncher/Launcher3\src\com\android\launcher3\op09\目录

删除掉/Seachlauncher/Android.mk文件

屏蔽Launcher3\src\com\mediatek\launcher3\AllAppsListPluginEx.java里

import com.android.internal.util.XmlUtils;

XmlUtils.beginDocument(parser,TAG_TOPPACKAGES);这两行代码

将SearchLauncher\src\com\android\searchlauncher\SearchLauncherCallbacks.java

里面public boolean shouldMoveToDefaultScreenOnHomeIntent() {

return false;改为 return true;

} // 按home键回到主界面


修改/Seachlauncher/Android.mk

屏蔽代码#LOCAL_SDK_VERSION := current

添加LOCAL_CERTIFICATE := platform

屏蔽代码#LAUNCHER_PATH := ../../../../packages/apps/Launcher3

添加LAUNCHER_PATH := Launcher3

7

CTS-VerifiermanualTests#com.android.cts.verifier.usb.MtpHostTestActivity,MTP HOST TEST fail

不支持OTG请将/frameworks/native/data/etc/android.hardware.usb.host.xml 中的

这一行注释或者移除掉

8

登陆Google Play商店的时候出现:设备未获得Google认证,如下:

GMS认证软件问题参考_第1张图片

您好,需要将android.signature.cts.SignatureTest#testSignature单测报告发给实验室,请实验室帮忙跟Google申请白名单,

申请成功之后,贵司将有45天时间去开发项目(期间不会弹出此提示)


9

1. 项目支持 VOLTE,若是支持VILTE 即4G 视频通话,就需要关闭 MTK_VT3G324M_SUPPORT=no这个是WCDMA 视频通话

VILTE 是指4G 视频通话,两者不能同时共存

10

预置googledialer后,用5.1r2工具包跑gts ,有fail项。

GtsNmgiarcTestCases

com.google.android.nmgiarc.gts.CarrierServicesTests#testCarrierServicesInstalledCorrectly

junit.framework.AssertionFailedError: CarrierServices is notinstalled! at junit.framework.Assert.fail(Assert.java:50) at….

可以看出是没预置carrierservices.

预置carrierservices后又有fail

com.google.android.nmgiarc.gts.CarrierServicesTests#testCarrierServicesInstalledCorrectly

junit.framework.AssertionFailedError:CarrierServices is missingthe required permission: android.permission.BIND_IMS_SERVICE

GMS认证软件问题参考_第2张图片

举例:

 

PRODUCT_PROPERTY_OVERRIDES += \

         ro.com.google.acsa=true

PRODUCT_COPY_FILES += \

vendor/archos/google/CarrierServices/carrierservices.xml:system/etc/sysconfig/carrierservices.xml

carrierservices.xml

 

11

实验室Pretest提出gmail没有calendar权限

frameworks/base/services/core/java/com/android/server/pm/DefaultPermissionGrantPolicy.java

加入

if(getSystemPackageLPr("com.google.android.gm")!=null){

         grantRuntimePermissionsLPw(getSystemPackageLPr("com.google.android.gm"),

CALENDAR_PERMISSIONS,userId);

}

12

实验室要求长按home进入google asistance

1.确认预置的Googleapp version 6.13 or later
2.在device.mk文件上添加以下属性:
PRODUCT_PROPERTY_OVERRIDES += ro.opa.eligible_device=true      

如何验证google assistant已经添加进去了?

Searchlauncher中右滑进search页,左上角有个设置图标,点进去,再点settings,如果添加了属性,会多出google assistant的设置项。没加属性的话是没有。可以对比下

虚拟按键:

上面加了属性,如果之前config.xml已经配置成进入googlenow的话现在就ok了。长按home键就跳过去了。

实体按键:

Phonewindowmanager.java的launchAssistAction加上

intent.setClassName("com.google.android.googlequicksearchbox",

"com.google.android.apps.gsa.staticplugins.opa.OpaActivity");就ok了。

注意:google assistance不支持中文,所以当切成中文的时候,会依然跳google search

13

CTS-Verifier

1 Device Owner Tests——Policy transparency Test——Set maximum time to lock

进入如图1界面,设置休眠时间为X,点击“update”再“open setting”打开设置如图2,应该自动显示勾选X。——目前此项时间显示不统一

修改文件Z:\37_n_base\update\alps\packages\apps\Settings\src\com\android\settings\TimeoutListPreference.java

查看另一篇博客 CTS-Verifier 时间显示不统一 修改

14

android.telephony.cts.TelephonyManagerTest#testGetDeviceId

fail junit.framework.AssertionFailedError: Incorrect check digit for 355100000006979 expected:<2> but was:<9>

android.telephony.cts.TelephonyManagerTest#testGetDeviceIdForSlotId

fail junit.framework.AssertionFailedError: Incorrect check digit for 355100000006979 expected:<2> but was:<9>

 

写入正确的imei号 即可pass


15

Android 8.1,CtsAppTestCases --android.app.cts.ActivityKeyboardShortcutsTest#testRequestShowKeyboardShortcuts fail


修改 \frameworks\base\core\res\res\values\config.xml

           2

16

AppCategory

Command Line(Linux)

Expected result

Browser

adb shell am start -W -a android.intent.action.VIEW -d 'https://www.wikipedia.org/'  | grep -c com.android.chrome

1

adb shell am start -W -a android.intent.action.VIEW -d 'http://www.wikipedia.org/'  | grep -c com.android.chrome

1

Messaging

adb shell am start -W -a android.intent.action.SENDTO -d sms:CCXXXXXXXXXX | grep -c com.google.android.apps.messaging

1

adb shell am start -W -a android.intent.action.SENDTO -d smsto:CCXXXXXXXXXX | grep -c com.google.android.apps.messaging

1

Email

adb shell am start -W -a android.intent.action.SENDTO -d mailto:[email protected] | grep -c com.google.android.gm.lite

1

adb shell dumpsys package com.google.android.gm.lite | grep -c "android.permission.READ_CALENDAR: granted=true"

1

adb shell dumpsys package com.google.android.gm.lite | grep -c "android.permission.WRITE_CALENDAR: granted=true"

1

adb shell dumpsys package com.google.android.gm.lite | grep -c "android.permission.READ_CONTACTS: granted=true"

1

adb shell dumpsys package com.google.android.gm.lite | grep -c "android.permission.WRITE_CONTACTS: granted=true"

1

Keyboard

adb shell settings get secure default_input_method | grep -c com.google.android.inputmethod

1

adb shell ime list -a | grep mId | grep -v -c mId=com.google.android

0

Voice  Assistant

adb shell am start -W -a android.intent.action.ASSIST | grep -c com.google.android.apps.assistant

1

Search

adb shell am start -W -a android.intent.action.WEB_SEARCH -e query wikipedia | grep -c com.google.android.apps.searchlite

1

17

默认情况下配置gms带开机向导的,开机向导到wifi设置部分必须连接外网wifi才可以跳过的问题,修改如下:

文件: alps/vendor/google/products/gms.mk
修改:删除以下红色这一样
# Overrides
PRODUCT_PROPERTY_OVERRIDES += \
    ro.setupwizard.require_network=any \
    ro.setupwizard.mode=OPTIONAL\
   ro.com.google.gmsversion=7.0_r7
改为:
# Overrides
PRODUCT_PROPERTY_OVERRIDES += \
   ro.setupwizard.mode=OPTIONAL \
   ro.com.google.gmsversion=7.0_r7












你可能感兴趣的:(GMS认证软件问题参考)