PC 版 Google Play Games の完全性の保護
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
PC 版 Google Play Games は、Play Integrity API とその他のいくつかの Google Play 機能による完全性の保護をサポートしています。これにより、ゲームが改ざんされていないことや信頼できないソースからインストールされていないことを確認できます。
Play Integrity API
Play Integrity API により、潜在的に危険で不正な操作からゲームを保護できます。この API を使用すると、攻撃や、不正行為、偽装、不正アクセスなどの不正使用を防止できます。Play Integrity API は、SafetyNet Attestation API(SNAA)と Play App Licencing API に代わるものです。SNAA は PC 版 Google Play Games では使用できません。
デバイスの完全性フィールド
deviceRecognitionVerdict
フィールドには deviceRecognitionVerdict
という値のみが含まれます。この値は、デバイスがアプリの完全性をどの程度強化できるかを表します。デフォルトでは、deviceRecognitionVerdict
は次のいずれかの値です。
MEETS_DEVICE_INTEGRITY
: アプリは Google Play 開発者サービスを備えた Android デバイスで実行されています。このデバイスはシステム完全性チェックに合格し、Android の互換性要件を満たしています。
MEETS_VIRTUAL_INTEGRITY
: アプリは Google Play 開発者サービスを備えた仮想 Android 環境で実行されています(現在 PC 版 Google Play Games に限定されています)。この環境は Android の互換性に関する主要な要件を満たしており、Google Play の完全性チェックに合格しています。
- なし(空の値): アプリは、API フックなどの攻撃やルート権限取得などのシステム侵害の兆候があるデバイス、または Google Play の完全性チェックに合格していない仮想デバイス(エミュレータなど)で実行されています。
Play Integrity API は、deviceRecognitionVerdict
値の MEETS_VIRTUAL_INTEGRITY
を使用して、ゲームが PC 版 Google Play Games で実行されていることを示します。Play Integrity API からのレスポンスを渡す例を次に示します。
deviceIntegrity: {
// "MEETS_VIRTUAL_INTEGRITY" indicates the game is running on Google Play Games on PC
deviceRecognitionVerdict: ["MEETS_VIRTUAL_INTEGRITY"]
}
モバイルと PC 版 Google Play Games の両方でクロス プラットフォーム ゲームを利用できる場合は、検証ロジックで MEETS_VIRTUAL_INTEGRITY
と MEETS_DEVICE_INTEGRITY
の両方をチェックします。
自動保護
Google Play の自動保護は、不正な再配布や著作権侵害からゲームを保護するためのサービスです。保護対象のアプリを不明な配信チャネルから入手したユーザーには、Google Play から正式なアプリを入手するよう求めるメッセージが表示されます。自動保護は、データ接続がなくてもアプリで機能します。Google Play Console でワンクリックで有効にすることができ、テスト前のデベロッパーの作業やバックエンド サーバーとの統合は不要です。自動保護を利用すると、ゲームに次の機能を追加できます。
- インストーラ チェック: 自動保護により、アプリのコードに Google Play インストーラ チェックを追加できます。このチェックはアプリの起動時に行われ、インストーラ チェックに失敗した場合、Google Play でアプリを入手するよう求めるメッセージがユーザーに表示されます。
- 改ざん対策
(この機能は一部の Play パートナーのみご利用いただけます): アプリのコードにランタイム チェックを追加して改変を検出できます。さらに、高度な難読化手法を使用してチェックの削除やリバース エンジニアリングも防ぐことができます。このチェックが失敗した場合、Google Play でアプリを入手するよう求めるメッセージがユーザーに表示され、アプリは実行されません。
自動保護では、テスト前にコードを変更したり、デベロッパーが作業したりする必要はありません。詳しくは、Google Play Console ヘルプセンターの自動保護をご覧ください。
このページのコンテンツやコードサンプルは、コンテンツ ライセンスに記載のライセンスに従います。Java および OpenJDK は Oracle および関連会社の商標または登録商標です。
最終更新日 2025-07-27 UTC。
[null,null,["最終更新日 2025-07-27 UTC。"],[],[],null,["# Integrity protection for Google Play Games on PC\n\nGoogle Play Games on PC supports integrity protection through the Play\nIntegrity API and several other Google Play features to help ensure that\nyour game hasn't been tampered with or installed from an untrustworthy source.\n\nPlay Integrity API\n------------------\n\nThe [Play Integrity API](/google/play/integrity) helps protect your\ngames from potentially risky and fraudulent interactions. The API\nenables you to reduce attacks and abuse such as\nfraud, cheating, and unauthorized access. The\n[Play Integrity API](/google/play/integrity) replaces the\nSafetyNet Attestation API (SNAA) and Play App Licencing API.\nSNAA does not work with Google Play Games on PC.\n\n### Device Integrity Field\n\nThe\n[`deviceRecognitionVerdict`](/google/play/integrity/verdict#device-integrity-field)\nfield contains a single value, `deviceRecognitionVerdict`,\nthat represents how well a device can enforce app integrity. By default,\n`deviceRecognitionVerdict` can have one of these values:\n\n- `MEETS_DEVICE_INTEGRITY`: The app is running on an Android-powered device with Google Play services. The device passes system integrity checks and meets Android compatibility requirements.\n- `MEETS_VIRTUAL_INTEGRITY`: The app is running in a virtual Android environment with Google Play services, currently limited to Google Play Games on PC. The environment meets core Android compatibility requirements and passes Google Play integrity checks.\n- None (a blank value): The app is running on a device that has signs of attack (such as API hooking) or system compromise (such as being rooted), or the app is running on a non-physical device (such as an emulator) that does not pass Google Play integrity checks.\n\nThe Play Integrity API uses the `deviceRecognitionVerdict` value\n`MEETS_VIRTUAL_INTEGRITY` to indicate that the game is running on Google Play Games on PC. Here's an example of a passing response from\nthe Play Integrity API: \n\n deviceIntegrity: {\n // \"MEETS_VIRTUAL_INTEGRITY\" indicates the game is running on Google Play Games on PC\n deviceRecognitionVerdict: [\"MEETS_VIRTUAL_INTEGRITY\"]\n }\n\nIf you have a cross-platform game available on both mobile and\nGoogle Play Games on PC, make sure your\nvalidation logic checks for both `MEETS_VIRTUAL_INTEGRITY` and\n`MEETS_DEVICE_INTEGRITY`.\n\nAutomatic protection\n--------------------\n\nGoogle Play's [automatic protection](https://support.google.com/googleplay/android-developer/answer/10183279) is a service\nthat helps you protect your game against unauthorized redistribution and\npiracy. When users get your protected app from an unknown distribution\nchannel, they'll be prompted to get your official app from\nGoogle Play. Automatic protection works in your app without a data\nconnection. It can be turned on with one click in the\nPlay Console, and requires no developer work before testing and no\nbackend server integration. Automatic protection can add the following\nfeatures to your game:\n\n- **Installer checks**: Automatic protection can add Google Play installer checks to your app's code that happen at runtime when your app is opened. If the installer checks fail, users will be prompted to get your app on Google Play.\n- **Anti-tamper protection** **(this feature is only available to selected Play partners)**: Automatic protection can add runtime checks to your app's code to detect modification and use advanced obfuscation techniques to prevent the checks from being removed or reverse engineered. If the checks fail, the user will be prompted to get your app on Google Play or the app will not run.\n\nAutomatic protection requires no code changes or developer work before\ntesting. Learn more about\n[automatic protection in the Play Console help center](https://support.google.com/googleplay/android-developer/answer/10183279)."]]