If your app relies on server-side functionality to work, you should look into the SafetyNet Attestation API to see if you can block cracked apps from working by having the server refuse to talk to an app if it can't prove it was installed from google's app store.
The attestation API can be used to detect probable root, but that's not the only thing it does. It can be used to detect if an APK is modified(and thus probably cracked) or not. There are various things you can check for and you can allow rooted phones while disallowing modified APKs.