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

Question: What is the difference between ReLinker and SoLoader? #76

Closed
maxim-pandra opened this issue Sep 23, 2020 · 2 comments
Closed

Comments

@maxim-pandra
Copy link

ReLinker is "A robust native library loader for Android"

SoLoader is a native code loader for Android. It takes care of unpacking your native libraries and recursively loads dependencies on platforms that don't support that out of the box.

What should I choose for native library loading? What is the difference between the two?

@benjamin-bader
Copy link
Contributor

benjamin-bader commented Sep 23, 2020

They originated as two different libraries that approached the same problem in different ways. Relinker was the first to properly handle transitive dependencies by parsing elf files, but I believe SoLoader has grown that capability by now.

Basically the difference is down to the internal approach. SoLoader attempts to hook in to the native machinery underpinning System.loadLibrary, while ReLinker does its fixes at a higher level, without reflecting in to the runtime. Each approach has its merits, but ReLinker ends up being a lighter dependency, if only by a bit. Certainly it's easier to build, hack on, and debug relinker, due to SoLoader using Buck for its build system - though since you're asking which library to use, that's probably not so relevant to you :)

As far as I'm aware, both libraries do the job just fine.

Edited to add: I don't know SoLoader very well. If I've misrepresented it, or left out something important, I'd love to be corrected!

@philippb
Copy link
Contributor

philippb commented Jul 6, 2021

Created a wiki page and added this as the first FAQ
https://github.com/KeepSafe/ReLinker/wiki

@philippb philippb closed this as completed Jul 6, 2021
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

No branches or pull requests

3 participants