Skip to content Skip to sidebar Skip to footer

After Migrating From Sdk 28 To Sdk 29 In Android My App Crashed And Facing : Signal 11 (sigsegv), Code 2 (segv_accerr), Error In Android Studio 3.4.1

Iam facing the issue only in OnePlus, Samsung , Poco F1 with Android OS version 10. It's working in pixel devices with Android 10. Please find the error logs below Build fingerpri

Solution 1:

The root cause of this crash is caused by behavior change from Android 10. Please refer to the following pages to understand the problem: https://developer.android.com/about/versions/10/behavior-changes-allhttps://developer.android.com/about/versions/10/behavior-changes-all

In a summary the issue is: Starting in Android 10, executable segments of system binaries and libraries are mapped into memory execute-only (non-readable) as a hardening technique against code-reuse attacks. If your app performs read operations into memory segments marked as execute-only – whether from bug, vulnerability, or intentional memory inspection – the system sends a SIGSEGV signal to your app.

As workaround it says to call "mprotect" to execute the method where crash happen. You can refer here to understand how to call this method: https://man7.org/linux/man-pages/man2/mprotect.2.html

I would say it is very annoying to implement this workaround as it add additional system call and not convenient at all.However i don't see a better way.

Post a Comment for "After Migrating From Sdk 28 To Sdk 29 In Android My App Crashed And Facing : Signal 11 (sigsegv), Code 2 (segv_accerr), Error In Android Studio 3.4.1"