Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

This question already has an answer here:

Well this question is actually asked multiple times here already.

but the answers are contradictory

So that's why I ask it again (maybe time changed things). Can LGPL licensed libraries be used in closed source applications on androids? Specifically, when they are linked together dynamically through .so. but inside a single apk package.

this topic explains how this is possible and what steps should be taken. However it takes for granted that users are able to repackage the apk file (and thus open up the apk file).

Then this topic simply questions the given above. And the answer is "you don't".

So what is it, can users of your program (when you give them an APK) get their own version of the library, compile it and replace that?

(PS: not sure if I should place it here or on stackoverflow, please move to best location)

share|improve this question

marked as duplicate by Bart van Ingen Schenau, Jan Hudec, MichaelT, gnat, Kilian Foth Feb 4 at 10:01

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

    
I'm asking ABOUT that question a further question as I do not understand the answers there... In previous meta questions this was the correct form of action. Is this question getting closed for following the meta? Also I ask "HOW" to follow, not "IF" –  paul23 Jan 31 at 14:10
    
I have asked (and gotten) some further clarifications in the linked question. With those clarifications, I believe that it answers your question, hence the duplicate vote. –  Bart van Ingen Schenau Jan 31 at 14:34
    
@paul23: The answer is that you are just repeating the first question while the second question does not say anything about libraries, LGPL nor legality and is therefore completely irrelevant. Joining the duplicate vote. –  Jan Hudec Jan 31 at 14:34
    
Note that the linked SO question asks about installing files to a particular location, not about extracting files from a .apk file on a PC. –  Bart van Ingen Schenau Jan 31 at 14:35
    
What is the different between installing and extracting? The end result is the same. The contents are placed on your hdd. –  Ramhound Feb 1 at 7:37
add comment

2 Answers 2

The answer is yes. There are some specific requirements and you need to read and understand to be sure you comply. Read S4 in particular.

The requirements are not especially onerous for dynamic linking. Under 4 (d) 1, you only have to "use a suitable mechanism" and provide some additional information. There is language in the licence suggesting a kind of suitable mechanism, but it reads as enabling rather than mandatory, so an equivalent mechanism should suffice. There is a clear obligation that the mechanism be feasible. For example, a method that depended on repackaging the APK might be suitable and this might preclude signing or other protective measures.

There is no obligation that it be technically easy, and your obligations do not extend to educating the user (who is assumed to have the necessary technical skills), to providing active assistance or to changing your application to make it easier.

In practical terms, this obligation will not arise unless or until a specific user wants to replace the library you provide with a different one, perhaps with a bug fix. In that case you cannot withhold information needed to let them do so, or take any action to hinder them, but whether you provide assistance or offer a service is a commercial decision.

Disclaimer: I'm not a lawyer, but I do make these decisions on behalf of my company.

share|improve this answer
    
"In practical terms, this obligation will not arise unless or until a specific user wants to replace the library you provide with a different one, perhaps with a bug fix. In that case you cannot withhold information needed to let them do so, or take any action to hinder them, but whether you provide assistance or offer a service is a commercial decision." -- well I don't know how to do it myself.. And the second link indicated this is impossible –  paul23 Jan 31 at 13:24
    
See edit. I know it's possible to repackage an APK, and that it's also possible to make repackaging difficult or impossible. The precise boundaries of this mechanism would need some research, but it's not the only possibility. –  david.pfx Jan 31 at 14:06
    
Hmm well quite frankly I'm the supplier of a lgpl library (though I depend on other lgpl libraries itself so I can't simply say "yes") and have been asked this question. I want to try it myself and see if I can manage to do it myself –  paul23 Jan 31 at 14:11
add comment

There is absolutely no contradiction.

The first question you link to explains that you are allowed to use LGPL-licensed libraries in proprietary Android applications under the condition that they are compiled as separate shared libraries and that the application will continue working if the user repackages it to satisfy the LGPL requirement that the user must have a way to use their modified version of the LGPL code.

The second question concerns technical way of packaging executables, not libraries into Android packages and says nothing about licensing except for motivation. The answer there is also not that it's not possible, but only that it does not work the way the asker expected.

share|improve this answer
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.