Home / Insights / Mobile App Development
Mobile App Development
Google Play Integrity and App Hardening: Protecting Android Apps from Abuse Without Punishing Real Users
Bots, modified APKs and scripted API calls cost Android businesses money in fake sign-ups, promo abuse and scraped data. Play Integrity helps, but only as one layer. This guide explains how to combine it with app hardening and server-side controls.
TopicsMobile App Development
Key takeaways
- Start from the abuse you are losing money to (fake accounts, promo farming, scraping, cheating) and protect those specific actions, not the whole app equally.
- Play Integrity tells your server whether a request comes from your genuine Play-installed app on a genuine device; verify the verdict on your server, bind it to the request, and never trust a client-side pass/fail.
- Google itself says Play Integrity should not be your only anti-abuse mechanism; combine it with rate limits, account risk scoring and server-side business rules.
- App hardening (R8 obfuscation, Keystore-held keys, no secrets in the APK) raises the cost of tampering but does not make the client trustworthy.
- Roll out in observe-only mode first and tier your responses; most genuine users sit on ordinary devices, and blocking on the strictest signal will lock some of them out.
On this page
- Which kinds of abuse are you actually trying to stop?
- What does the Play Integrity API tell you, and what does it not?
- How should the integrity check be wired into your backend?
- Which app hardening measures are worth the effort?
- How strict should enforcement be for each action?
- How do you roll out integrity checks safely?
- Checklist: is your Android app reasonably protected against abuse?
- Frequently asked questions
- Sources and methodology
Every Android app that offers something of value, whether a sign-up bonus, a free trial, a leaderboard, in-app currency or simply an API full of useful data, eventually attracts people who want it without playing by the rules. They repackage the APK to remove checks, run it on emulators at scale, or skip the app entirely and call your API with scripts.
This article is for CTOs, product owners and engineering leads responsible for Android apps that handle money, rewards, regulated data or competitive play. It explains what the Google Play Integrity API actually tells you, what it does not, and how to combine it with app hardening and server-side controls so that abuse becomes expensive while genuine users notice nothing. At PoliteTech we build native Android apps in Kotlin, including Google Play publishing and ongoing maintenance, and integrity checks are a recurring part of that work for apps with rewards, payments or sensitive data.
A word on timing: Google has deprecated the older SafetyNet Attestation API in favour of Play Integrity and has published a turn-down timeline. If your app still calls SafetyNet, plan the migration now rather than when the deadline is close.
Which kinds of abuse are you actually trying to stop?
“Protect the app” is not a requirement. A useful threat model names the actions that attackers profit from and the cost each one imposes on you. Different threats need different controls, and some are not client-side problems at all.
| Abuse pattern | What it costs you | Where the main control sits |
|---|---|---|
| Fake account creation at scale | Bonus and referral payouts, SMS verification fees, polluted analytics | Server: integrity verdict at sign-up, rate limits, phone and device risk scoring |
| Modified APK (removed paywall, unlocked features) | Lost revenue, support load from broken clones | Server: entitlements checked server-side; app integrity verdict on premium calls |
| Scripted API calls bypassing the app | Scraped data, inventory hoarding, infrastructure cost | Server: integrity token required on sensitive endpoints, plus rate limits |
| Cheating in games or competitions | Unfair leaderboards, churn among honest players | Server-authoritative game logic; integrity verdicts on score submission |
| Credential stuffing against login | Account takeover, fraud, reputational damage | Server: rate limits, breached-password checks, step-up authentication |
Notice how often the main control is on the server. The client runs on hardware the attacker owns, so anything decided only in the app can be changed. Integrity signals are valuable precisely because they give the server evidence it can weigh.
Action: list the three actions in your app where abuse costs most, estimate the cost per abusive event, and use that to decide how much friction each action can tolerate.
What does the Play Integrity API tell you, and what does it not?
According to the Android developer documentation, the Play Integrity API helps you check that interactions and server requests come from your genuine app binary, installed by Google Play, running on a genuine Android device. Your app requests an integrity token, sends it to your backend, and your backend obtains and checks the verdict.
The core verdicts
- App integrity: whether the binary is recognised by Google Play, meaning its signing certificate matches and it has not been modified (
PLAY_RECOGNIZED), or whether it is unrecognised. - Account details: whether the user installed or acquired the app through Google Play (
LICENSED). - Device integrity: labels describing the device, from basic integrity (the device passes basic system checks but may not be a certified device) through device integrity (a genuine, certified Android device) to strong integrity, which adds hardware-backed proof of boot integrity.
- Request details: the package name and the value you bound to the request, so the server can confirm the token belongs to this specific action.
Standard versus classic requests
| Standard request | Classic request | |
|---|---|---|
| Typical latency | A few hundred milliseconds, after a warm-up | A few seconds |
| Best for | Frequent, on-demand checks | Infrequent, high-value actions |
| Replay protection | Handled by Google Play using a request hash you supply | Your own nonce plus server-side logic |
The documentation notes a default quota of 10,000 requests per day across all installs, which can be raised on request. That alone tells you not to call it on every screen; protect the actions that matter.
What it does not tell you
- It does not tell you whether the person is honest. A real user on a genuine device can still farm promotions manually.
- It does not cover users who installed your app outside Google Play, or devices without Google Play services, which matters in some markets and for enterprise fleets.
- It is not a replacement for server-side authorisation. Google’s own guidance says not to rely on it as your only anti-abuse mechanism.
Action: check your install base by country and device type before deciding which verdicts to enforce; users without Play services need a fallback path, not a block.
How should the integrity check be wired into your backend?
The value of Play Integrity is entirely in how the server uses it. A check that runs in the app and shows a “device not supported” dialog can be patched out in minutes.
A sound request flow
- Bind the token to the action. For a standard request, compute a hash of the meaningful request data (for example user ID, action type and amount) and pass it as the request hash. For a classic request, generate a nonce on the server. The documentation warns that this value is visible to your app and to Google, so hash or encrypt anything sensitive.
- Request the token close to the protected action. Fetching it long before the action gives attackers time to proxy or reuse it.
- Send the token with the API call. Treat it like any other credential in transit.
- Verify on the server. Obtain the verdict, then check that the package name and request hash or nonce match what you expect, that the timestamp is recent, and that the app and device verdicts meet your policy for this action.
- Decide and log. Allow, allow with limits, challenge or deny, and log the verdict alongside the outcome so you can tune policy later.
Design for failure
Google’s service can be unavailable, devices can be offline, and some genuine users will fail checks. Decide in advance what happens in each case. For low-value actions, fail open and flag for review. For high-value actions such as cash withdrawals, fail closed but offer a support route. Do not cache verdicts for reuse across actions; the documentation specifically warns that caching increases the risk of tokens being proxied.
Test it like any other backend feature
Integrity checks add latency and an external dependency to critical paths. Include them in load tests that reflect real usage patterns, as described in our guide to performance testing for mobile backends, and simulate the external service timing out.
Action: write the policy table first (action, required verdicts, response on failure, response on service error) and review it with product and support before any code is written.
Which app hardening measures are worth the effort?
Hardening makes your APK harder to understand and modify. It raises the cost of attacks; it does not make the client trustworthy. The OWASP Mobile Application Security Verification Standard reflects this by grouping these measures under a separate resilience category, alongside storage, cryptography, authentication, network, platform, code quality and privacy controls, rather than treating them as a substitute for those controls.
Measures with a good cost-benefit ratio
- R8 shrinking and obfuscation: the Android build documentation explains that R8 removes unreachable code, optimises what remains and shortens class, field and method names. That makes reverse engineering slower and also reduces app size. Keep the mapping file for each release so you can read crash reports.
- Keys in the Android Keystore: the Keystore system keeps key material out of the app process and can bind it to secure hardware, so a compromised app can use a key but cannot extract it. Use it for device-bound signing or encryption keys, optionally requiring user authentication.
- No secrets in the APK: API keys for paid third-party services, signing secrets and admin endpoints should live on the server. Anything shipped in the APK should be assumed public.
- Server-side entitlements: premium features, balances and rewards are decided by the server, never by a flag in local storage.
- Certificate pinning, selectively: useful for high-risk apps, but plan rotation carefully so a certificate change does not break every installed version.
Measures to treat with caution
- Home-grown root and emulator detection: easy to bypass, prone to false positives and costly to maintain. Prefer the device integrity verdict, weighed on the server.
- Aggressive anti-debugging: can trigger on legitimate accessibility tools or enterprise device management, and complicates your own support work.
- Commercial protectors: can be worthwhile for games and fintech, but test their effect on startup time, crash rate and Play policy compliance before committing.
Action: confirm R8 is enabled in release builds, search your codebase and build configuration for embedded secrets, and move any you find to the server.
How strict should enforcement be for each action?
The most common mistake is enforcing the strongest device label everywhere. Many genuine users have older or budget devices that will not meet the strictest level, and some will have legitimately unlocked bootloaders. A tiered policy protects revenue without locking them out.
| Action value | Example | Suggested policy (illustrative) |
|---|---|---|
| Low | Browsing content, reading public data | No integrity check; rely on rate limits |
| Medium | Creating an account, posting content, claiming a small reward | Require recognised app and basic device integrity; add friction (verification step) on failure |
| High | Redeeming credit, submitting a ranked score, initiating a payout | Require recognised app, licensed account and device integrity; manual review or step-up on failure |
| Very high | Changing payout details, large transfers | All of the above plus recent strong authentication and server-side risk scoring |
Combine signals
Integrity verdicts become far more useful alongside other evidence: account age, velocity of actions per account and per IP range, payment instrument history and behavioural anomalies. Many teams feed verdicts into a simple risk score rather than using them as hard gates. Where decisions involve user-generated content, the same layered approach applies; our guide to content moderation combining AI and human review covers how to route uncertain cases to people.
Action: map each protected endpoint to one row of a table like this and get product sign-off on the user experience for failures.
How do you roll out integrity checks safely?
- Enable the API in the Play Console and link your Google Cloud project; confirm the quota is adequate for your protected actions.
- Integrate in observe-only mode. Request tokens on protected actions, verify on the server and log verdicts, but do not change outcomes.
- Analyse two to four weeks of data (illustrative). What share of requests fail each check? Do failures cluster on known abuse, specific device models or particular countries?
- Define the policy per action based on that data, including user messages and support routes.
- Enforce gradually, starting with the highest-value action and a small share of traffic, watching conversion, support tickets and abuse metrics.
- Review regularly. Attackers adapt, device populations change and Google adds signals; revisit thresholds every quarter.
Common pitfalls
- Checking the verdict in the app instead of on the server.
- Not binding the token to the request, allowing a valid token to be replayed for a different action.
- Blocking all users without Google Play services, including legitimate enterprise devices.
- No monitoring of verification errors, so an outage silently blocks sign-ups.
- Treating integrity as a project rather than an ongoing operational process.
Checklist: is your Android app reasonably protected against abuse?
- You have a written list of the actions attackers profit from, with an estimated cost per abusive event.
- Every protected action requires a fresh integrity token bound to that request, verified on the server.
- Your server checks package name, request hash or nonce, timestamp, app recognition and the device label your policy requires.
- There is a defined response for failed checks and for service errors on each action.
- Entitlements, balances and rewards are decided server-side only.
- No third-party secrets or admin endpoints are shipped in the APK.
- R8 is enabled for release builds and mapping files are archived per version.
- Device-bound keys live in the Android Keystore.
- Integrity verdicts are logged and reviewed alongside abuse and conversion metrics.
- Any remaining SafetyNet Attestation calls have a migration plan to Play Integrity.
Frequently asked questions
Will Play Integrity stop all fraud in our app?
No. It tells your server whether a request comes from your genuine app on a genuine device. A real person on a real phone can still abuse promotions manually, so you still need rate limits, account risk scoring and business rules.
What happens to users whose devices fail the check?
That depends on your policy. For most actions, add friction such as an extra verification step rather than blocking outright. Reserve hard blocks for high-value actions, and give users a support route.
Does Play Integrity work for apps distributed outside Google Play?
Its core verdicts depend on Google Play and Play services. If you distribute through other stores or to devices without Play services, plan an alternative path, such as stronger server-side risk checks or enterprise device management signals.
Is obfuscation with R8 enough to protect our API keys?
No. Obfuscation slows reverse engineering but any secret shipped in the APK should be treated as public. Keep paid API keys and signing secrets on your server and proxy calls through it.
How much effort does integration take?
The client integration is relatively small. Most of the effort goes into the server-side policy, logging, observe-only analysis and support processes, which is where the protection actually comes from.
Sources and methodology
Guidance reflects PoliteTech delivery experience. The external references below informed specific points in this article.
- Android Developers: Play Integrity API overview — accessed 9 November 2026. What the verdicts cover, standard versus classic requests, request binding, default quota of 10,000 requests per day, and the advice not to rely on it alone or cache verdicts.
- Android Developers: Shrink, obfuscate and optimise your app — accessed 9 November 2026. R8 removes unreachable code, optimises and shortens class, field and method names.
- Android Developers: Android Keystore system — accessed 9 November 2026. Key material kept out of the app process and optionally bound to secure hardware so it cannot be extracted.
- OWASP: Mobile Application Security Verification Standard (MASVS) — accessed 9 November 2026. Resilience against reverse engineering and tampering as a distinct control group alongside storage, crypto, auth, network, platform, code and privacy.
Related reading
Continue your research
Which action in your Android app is costing you the most in abuse right now?
We can review your threat model, design a server-side integrity policy and roll it out in observe-only mode so you see the data before anyone is blocked.
