حفاظت از یکپارچگی برای بازی های Google Play در رایانه شخصی
با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
بازیهای Google Play روی رایانه شخصی از محافظت از یکپارچگی از طریق Play Integrity API و چندین ویژگی دیگر Google Play پشتیبانی میکند تا اطمینان حاصل شود که بازی شما دستکاری نشده یا از منبع غیرقابل اعتمادی نصب نشده است.
Play Integrity API
Play Integrity API به محافظت از بازیهای شما در برابر تعاملات احتمالی مخاطرهآمیز و متقلبانه کمک میکند. API شما را قادر می سازد تا حملات و سوء استفاده هایی مانند تقلب، تقلب و دسترسی غیرمجاز را کاهش دهید. Play Integrity API جایگزین SafetyNet Attestation API (SNAA) و Play Licensing API می شود. SNAA با بازی های Google Play روی رایانه شخصی کار نمی کند.
فیلد یکپارچگی دستگاه
فیلد deviceRecognitionVerdict
حاوی یک مقدار واحد است، deviceRecognitionVerdict
، که نشان میدهد دستگاه چقدر میتواند یکپارچگی برنامه را اعمال کند. به طور پیش فرض، deviceRecognitionVerdict
می تواند یکی از این مقادیر را داشته باشد:
-
MEETS_DEVICE_INTEGRITY
: این برنامه در دستگاهی با سیستم عامل Android با خدمات Google Play اجرا می شود. دستگاه بررسی های یکپارچگی سیستم را انجام می دهد و شرایط سازگاری Android را برآورده می کند. -
MEETS_VIRTUAL_INTEGRITY
: این برنامه در یک محیط اندروید مجازی با سرویسهای Google Play اجرا میشود که در حال حاضر محدود به بازیهای Google Play در رایانه شخصی است. این محیط الزامات اصلی سازگاری Android را برآورده میکند و بررسیهای یکپارچگی Google Play را انجام میدهد. - هیچ (یک مقدار خالی): برنامه روی دستگاهی اجرا میشود که نشانههایی از حمله (مانند اتصال API) یا به خطر افتادن سیستم (مانند روت شدن) دارد، یا برنامه روی دستگاهی غیر فیزیکی (مانند شبیه ساز) که بررسی های یکپارچگی Google Play را رد نمی کند.
Play Integrity API از مقدار deviceRecognitionVerdict
MEETS_VIRTUAL_INTEGRITY
استفاده میکند تا نشان دهد بازی در بازیهای Google Play روی رایانه شخصی اجرا میشود. در اینجا نمونه ای از پاسخ گذرا از Play Integrity API آمده است:
deviceIntegrity: {
// "MEETS_VIRTUAL_INTEGRITY" indicates the game is running on Google Play Games on PC
deviceRecognitionVerdict: ["MEETS_VIRTUAL_INTEGRITY"]
}
اگر بازی چند پلتفرمی را هم در تلفن همراه و هم در بازیهای Google Play روی رایانه شخصی دارید، مطمئن شوید که منطق اعتبارسنجی شما برای MEETS_VIRTUAL_INTEGRITY
و MEETS_DEVICE_INTEGRITY
بررسی میشود.
حفاظت خودکار
محافظت خودکار Google Play سرویسی است که به شما کمک می کند از بازی خود در برابر توزیع مجدد غیرمجاز و دزدی دریایی محافظت کنید. هنگامی که کاربران برنامه محافظت شده شما را از یک کانال توزیع ناشناخته دریافت می کنند، از آنها خواسته می شود برنامه رسمی شما را از Google Play دریافت کنند. محافظت خودکار در برنامه شما بدون اتصال داده کار می کند. می توان آن را با یک کلیک در Play Console روشن کرد و نیازی به کار توسعه دهنده قبل از آزمایش و ادغام سرور باطن ندارد. محافظت خودکار می تواند ویژگی های زیر را به بازی شما اضافه کند:
- بررسیهای نصبکننده : محافظت خودکار میتواند چکهای نصبکننده Google Play را به کد برنامه شما اضافه کند که در زمان اجرا و زمانی که برنامه شما باز میشود، اتفاق میافتد. اگر بررسیهای نصبکننده ناموفق باشد، از کاربران خواسته میشود برنامه شما را در Google Play دریافت کنند.
- محافظت در برابر دستکاری (این ویژگی فقط برای شرکای منتخب Play در دسترس است) : حفاظت خودکار میتواند بررسیهای زمان اجرا را به کد برنامه شما برای تشخیص تغییرات اضافه کند و از تکنیکهای مبهمسازی پیشرفته برای جلوگیری از حذف چکها یا مهندسی معکوس استفاده کند. اگر بررسی ها ناموفق باشد، از کاربر خواسته می شود برنامه شما را در Google Play دریافت کند یا برنامه اجرا نمی شود.
حفاظت خودکار به هیچ تغییر کد یا کار توسعه دهنده قبل از آزمایش نیاز ندارد. در مرکز راهنمای Play Console درباره محافظت خودکار بیشتر بیاموزید.
محتوا و نمونه کدها در این صفحه مشمول پروانههای توصیفشده در پروانه محتوا هستند. جاوا و OpenJDK علامتهای تجاری یا علامتهای تجاری ثبتشده Oracle و/یا وابستههای آن هستند.
تاریخ آخرین بهروزرسانی 2025-07-29 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 2025-07-29 بهوقت ساعت هماهنگ جهانی."],[],[],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)."]]