Default About forking/"porting" Xposed

It has been brought to my attention that there are several Xposed "ports" now, which gives me reason to write about my opinion about forks and the open source character of modules.

Why is Xposed open source?
I want it make easy for people to understand how Xposed works, so they can learn something. It makes it easier to develop modules. No documentation can ever be as exact as the code itself. I also hope that it will motivate them to contribute improvements or fixes. And if I should decide to stop working on Xposed one day, others can take over.

Can others fork Xposed and publish their own version?
Yes, the Apache Licence 2.0 (in easy terms) allows this. However, you need to include the license/notices and provide clear attribution to the original authors.

Do I have to publish the source code of my fork?
No. However, I believe you should, for the reasons I mentioned above. It also leaves a bad taste if you take something free&open and then hide with it. It's like you always eat the biggest piece of cake when your colleagues celebrate their birthdays, but never bring anything to celebrate your own. The concept can only work if you participate.

Do I have to contribute changes back to the original project?
Again, this is not required by the license, but you really should, everyone (including yourself) will benefit. You found something that can be improved, so why not let everyone benefit from it? Also, if I publish a new version, you have to apply your changes again. If you contribute your changes back and I merge them, you don't have this effort. Let's not have one variant with features X+A and one with X+B, but one (or both) with X+A+B. The more changes you keep for yourself, the harder will it be to keep up with the latest official version.

Does it even make sense to publish my own variant?
It depends on the amount and impact of the changes you make. For a few bugfixes or improvements, in most cases the answer is no. These changes are usually unquestionable, so there is a big chance that I will merge them. Some other modifications (e.g. in the UI) might be a matter of opinion. Anyway, you should should ask yourself "Is this change useful for others?" and evaluate the benefit of publishing your own version. Try not being selfish about getting your name out, but also thing of the downsides of many different versions. Users will be confused which version they should install and will be forced to make a choice.

I want to publish my nice and fancy UI anyway. Then it shouldn't be a problem to modify the API as well, right?
Hell no! Think about it for a second. The API is public and kind of a contract to module developers with functions they can rely on. If you change it, your fork will be incompatible with existing modules (and your modules will not be compatible with the original version). There are lots of modules that people love and that they would request to be ported if they like your variant. Apart from the technical effort to do this and keep track of updates, you also need to consider proper attribution (see below).

Instead, open a pull request to contribute the changes and additions back to the original Xposed or simply contact me to discuss this. I have mentioned lots of reasons why you would want to do that above. Apart from that, there is a chance that I can improve your changes before merging them. You know, I have quite some experience with Xposed, Android internals, DalvikVM, Java etc.

If you have big plans and want to build something on top of Xposed that is totally different from the current API, then of course feel free to do it. But again, you can contact me to check if we can join forces and push Xposed into the direction you imagine.

So what about attribution? I'll mention you somewhere in footnotes, is that enough?
No. The license and ethical standards require that the attribution is clear and adequate.

I'm not sure if there is a clear definition for this, but I think it's common sense that the amount of attribution you give should be proportional to the amount of work you took from others. You can absolutely take the credit for your work, but not for other people's work. So if you just made a few changes and optimizations (or even just removed some code), don't act as if you wrote the whole thing. Even if your UI looks completely different, you are probably still using lots of the original code that took much time to develop.

And that's only the UI. It also took much time to come up with the idea and concept (lots of digging through the Android source code etc.) and to write the Xposed framework (binary and XposedBridge.jar) itself. I can't tell you exactly how much time I spend on each of these, but assuming that concept, framework and installer are roughly equal parts is probably not too far fetched.

So even if your UI looks completely different and you have a few new options here and there, it isn't a completely new app that justifies mentioning Xposed and my name only in small footnote or dropping it completely. When I say "my name", I also mean Tungstwenty's, because he has contributed a lot, not only with code but we also had great discussions about the concept.

This is a general rule, also for modules (and any other thinig you can think of). I have seen one of my modules redistributed, without any other change than to adjust for changed class names in the forked API and without any hints about the original author. Adding pretty much zero value and taking the credit for it is simply stealing. Don't annoy the people who give you something for free.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Alright, that's it for now. If you see new variants of Xposed popping up, feel free to link them to this post. I will also add a link to the FAQ, just in case someone actually looks at it.
And if you think the points above apply to you - just think about Xposed not being open source or even not being developed further in the future because I got too annoyed. That would make everyone's life harder. Don't let it come to that point.
Tired of updating your mod for every new ROM release?
You want give users the possibility to combine different mods without creating tons of different files for all possible combinations?
Then have a look at my Xposed framework - modifications without APK changes!