com.pairip.licensecheck.LicenseClient calls System.exit() — app process terminated with no crash record (REASON_EXIT_SELF)
My app's process is being terminated repeatedly, and I cannot find anything that does it.
- `ApplicationExitInfo` reports `REASON_EXIT_SELF status=0`. Per AOSP, that reason is only set on `WIFEXITED` — meaning a thread inside my own process called `exit()`. A SIGKILL would report `REASON_SIGNALED`.
- Nothing appears in Android Vitals or Crashlytics. No crash record at all.
- My source contains no `System.exit`, `Runtime.exit` or `Runtime.halt` call.
- Scanning my own compiled AAB for those calls finds nothing either.
So the exit record says the process terminated itself, and nothing I can find in my own code or my own build artifact is capable of doing that.
What is calling `exit()`?
Environment: a bound `MediaLibraryService` on Android Automotive OS (API 33), started by the vehicle launcher at startup. Installed from Google Play.
Google automatic integrity protection injects com.pairip.licensecheck into the signed APKs it generates from your AAB at distribution time.
If you are chasing your own code looking for selfexit and not finding it anywhere, if you have play protection enabled google injects their own code into the AAB, That code contains a call for self exit, and if the AAOS vehicle platform fails to satisfy the check, Google's code will initiate self-exit with code 0, causing the vehicle to call the app again over and over in a loop.
So, the solution , if you run into this, is turn OFF play protection and push the app again. Then observe to see if the problem goes away.