Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setup native library for root detection #1201

Merged

Conversation

fractalwrench
Copy link
Contributor

@fractalwrench fractalwrench commented Mar 18, 2021

Goal

Creates a native library loaded by the bugsnag-android-core module that is responsible for detecting rooted devices. This is independent from the ANR/NDK native libraries and its sole purpose is to detect rooted devices.

Changeset

  • Created a new native library named bugsnag-core
  • Loaded bugsnag-core library within the RootDetector class
  • Perform a JNI call as part of the root detection. Currently this is unimplemented but a future PR will perform various root detection measures
  • If the library cannot be loaded, default to false. This could either be due to root detection countermeasures blocking the library from loading, or genuine bugs with how the Android OS loads libraries.
  • Added some additional logging

Testing

  • Confirmed that the native library loads through manual testing
  • Confirmed that the libbugsnag-core.so file is extracted to /build/intermediates/bugsnag-libs by the bugsnag gradle plugin.

@fractalwrench fractalwrench marked this pull request as ready for review March 18, 2021 17:10
Copy link
Contributor

@twometresteve twometresteve left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@fractalwrench fractalwrench merged commit b89e9f4 into integration/road-989-root-detection Mar 19, 2021
@fractalwrench fractalwrench deleted the setup-native-library branch March 19, 2021 16:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants