目标:用代码验证设备GMS 写入的keybox与上传的RKP有效性,用于生产防呆。
SafetyNet Attestation API 谷歌即将完全禁用
目前测的:下面的1、2他们的app都成功。
我遇到问题:自己新申请的api key不行,像是没有注册Google开者者账号。提示“Failed to register com.google.android.gms.providerinstaller#com.google.android.gms
dchg: 17: 17: API: Phenotype.API is not available on this device. Connection failed with: ConnectionResult{statusCode=DEVELOPER_ERROR, resolution=null, message=null}”
Play Integrity API 新
目前测的:提示次数用完了。换个时间测下面的1成功。
我遇到问题:好像都需要依赖网站。需要25美元注册Google开者者账号
1.合成了SafetyNet Attestation API与Play Integrity API 方案:https://github.com/herzhenr/spic-android




2.YASNAC app SafetyNet Attestation API 方案:https://github.com/RikkaW/YASNAC
1.我找到了YASNAC源码,并运行成功,但需要api key才能用。只有这个原来申请的可以,自己新申请的不行。用google play上现存的app的apiKey是可以的,比如YASNAC等。 apiKey=AIzaSyC4********************o67QXmF0M
2.新申请api key不能用,不知道是不是因为需要25美元注册Google开者者账号,还是因为新申请的不行。
3.密钥的配额为每天 10,000 次。
4.这代码已经停止了维护,而且即将过期,需要自己迁移到新的版本Play Integrity API上。
5.需连外网
Key Attestation app方案:
1.有源码,能看到一些基本信息。无需联网。无法确认GMS有效。
3.Play Integrity API Checker app Play Integrity API方案:https://github.com/1nikolas/play-integrity-checker-server/
需要服务端,使用vercel免费的服务。
服务搭好后,调用报Api request error:401 是不对
把凭证当成了key,出错
报错:Google API error. No key or keyFile set.
替换成正确的key json后
Domains为API_URL=https://play-integrity-checker-server-swart.vercel.app
报错:You are not authorized to decode the requested integrity token.
我部署的Server:https://vercel.com/chens-projects-812825f6/play-integrity-checker-server
Play Integrity API和https://github.com/herzhenr/spic-android
其它:
https://github.com/scottyab/safetynethelper
Vercel项目的主域名
从你的截图来看,在 Domains 下列出的域名就是你部署的网站地址。
根据图片内容,你可以使用以下地址访问你的网站:
-
主域名(推荐使用):
https://play-integrity-checker-server-swart.vercel.app -
其他自动生成的域名(这些通常是历史部署版本的地址):
https://play-integrity-checker-server-git-main-chens-projects-812825f6.vercel.apphttps://play-integrity-checker-server-ctmayg363-chens-projects-812825f6.vercel.app
如何选择?
通常推荐使用主域名(第一个地址),因为这是稳定的生产环境的 URL。如果你需要访问特定的部署版本,可以使用其他列出的地址。
点击 Visit 按钮也可以直接打开主域名。



已经获取了token说明登录的key是对的。
GaxiosError: You are not authorized to decode the requested integrity token. 解决这个需要开发者账号,这个注册需25美元。

254

被折叠的 条评论
为什么被折叠?



