有个Android项目刚启动不久时,测试SmartLock时,发现里面只有On-body detection,Trusted places/ Trusted devices/ Trusted face和Trusted voice均不可见,不可使用。
初步方案:
先登录一下Google帐号看看情况,结果登录帐号时,在checkin时总是会提示无法,网络communication存在问题,根本没有输入Google帐号的机会。
经过抓取的log,首先发现有一大片的ioctl问题,看不懂,继续往下看又没别的问题。
10-27 04:14:11.361765 2576 2589 E GasService: Error on query GED info, err=1
10-27 04:14:12.362687 2576 2589 E GED : Failed to execute ioctl 3222824709, BridgeID(5), err(-1)
10-27 04:14:12.362782 2576 2589 E GasService: Error on query GED info, err=1
10-27 04:14:13.363625 2576 2589 E GED : Failed to execute ioctl 3222824709, BridgeID(5), err(-1)
10-27 04:14:13.363720 2576 2589 E GasService: Error on query GED info, err=1
10-27 04:14:14.364632 2576 2589 E GED : Failed to execute ioctl 3222824709, BridgeID(5), err(-1)
10-27 04:14:14.364728 2576 2589 E GasService: Error on query GED info, err=1
10-27 04:14:15.365611 2576 2589 E GED : Failed to execute ioctl 3222824709, BridgeID(5), err(-1)
10-27 04:14:15.365708 2576 2589 E GasService: Error on query GED info, err=1
10-27 04:14:16.366685 2576 2589 E GED : Failed to execute ioctl 3222824709, BridgeID(5), err(-1)
10-27 04:14:16.366778 2576 2589 E GasService: Error on query GED info, err=1
10-27 04:14:17.367655 2576 2589 E GED : Failed to execute ioctl 3222824709, BridgeID(5), err(-1)
10-27 04:14:17.367755 2576 2589 E GasService: Error on query GED info, err=1
10-27 04:14:18.368660 2576 2589 E GED : Failed to execute ioctl 3222824709, BridgeID(5), err(-1)
10-27 04:14:18.368755 2576 2589 E GasService: Error on query GED info, err=1
10-27 04:20:47.764157 2576 2589 E GasService: Error on query GED info, err=1
10-27 04:20:48.765074 2576 2589 E GED : Failed to execute ioctl 3222824709, BridgeID(5), err(-1)
10-27 04:20:48.765174 2576 2589 E GasService: Error on query GED info, err=1
10-27 04:20:48.855754 2881 10666 E CheckinTask: Checkin failed: https://android.clients.google.com/checkin (request #0): java.io.IOException: Rejected response from server: invalid hardware identifier: "A5A INFINI" is not a valid device
据提示,一直提示网络communication有问题的原因应该在这,也正好验证了不是VPN网络的问题,因为同时用另外一台别的项目来登录连接Google正常。
经整份log搜索,类似reject log有很多,于是怀疑是不是项目未注册,导致服务器未验证通过,从而遭遇决绝。解决方案:
既然报invalid hardware identifier不无效不合法,那么修改暂时修改一下标识ro.product.device未已知可用项目的名称,结果可以登录。
登录成功后,网络检测到Play需要更新开始自动下载,进入SmartLOCK发现,相关项全部显示出来。
注意:
以上显示的各项并非适合每个项目,且Trusted face会依赖与FaceLock.apk(com.android.facelock)是否集成。
根本原因:
项目还处于早期,尚未过首轮xTS测试,也即未向Google进行项目的注册,导致Google server中不含当前项目设备,才会报invalid hardware identifier。正式已出货的项目是不可能有此原因引起的问题。
首次遇此问题,姑且以笔记之。