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

Use relinker to load native libraries #2219

Merged
merged 2 commits into from
Aug 25, 2022
Merged

Conversation

aitorvs
Copy link
Collaborator

@aitorvs aitorvs commented Aug 24, 2022

Task/Issue URL: https://app.asana.com/0/488551667048375/1202242362471737/f

Description

Use ReLinker (as also suggested by Google in here) to avoid issues when linking native libraryes. Like the ones we see with the bloom filter.

ReLinker internaly uses System.loadLibrary() but falls back to do their own thing when that fails. So it should not worsen the situation.

Steps to test this PR

Test libary loading

  • install from current branch
  • filter logcat by HttpsBloomFilterFactoryImpl
  • launch the app
  • verify Found https data at /data/user/0/com.duckduckgo.mobile.android.debug/files/HTTPS_BINARY_FILE, building filter and Loading took... logs appear
  • verify the error logcat message Error creating the bloom filter does not appear

@aitorvs
Copy link
Collaborator Author

aitorvs commented Aug 24, 2022

Current dependencies on/for this PR:

This comment was auto-generated by Graphite.

@aitorvs aitorvs force-pushed the feature/aitor/relinker branch 2 times, most recently from 3fa9947 to c8e3925 Compare August 24, 2022 18:25
@aitorvs aitorvs force-pushed the feature/aitor/relinker branch from c8e3925 to cce0e23 Compare August 25, 2022 12:18
Copy link
Contributor

@marcosholgado marcosholgado left a comment

Choose a reason for hiding this comment

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

LGTM, left a nit.

@@ -57,6 +57,8 @@ version.com.android.installreferrer..installreferrer=2.2

version.com.frybits.harmony..harmony=1.1.11

version.com.getkeepsafe.relinker..relinker=1.4.5
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: Don't think we are using this version because of implementation "com.getkeepsafe.relinker:relinker:_" ?

@aitorvs aitorvs merged commit 43fc01b into develop Aug 25, 2022
@aitorvs aitorvs deleted the feature/aitor/relinker branch August 25, 2022 14:08
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