2

I made some cool code that I want to contribute to both Android Open Source Project (AOSP) and other Linux distos, and perhaps even upstream at the Linux Kernel.

The problem is that AOSP says that they want contributions under Apache 2.0: https://source.android.com/docs/setup/about/licenses

And other Linux distos and the Linux Kernel want GPL.

Is there any way I can dual license my code under both GPL and Apache so that I can give the Apache version to AOSP and the GPL version to other linux distos?

In this case, what would I put at the top of my code when contributing, because AOSP request this:

# Copyright 2022 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

Would I have to modify that in any way to mention that GPL is also supported?

Thank you so much for your help in adavance!

1 Answer 1

2

You as sole author can license it whatever you want under as many licenses as you want.

You are only bound on the license of your code, if your code is based on other existing code. Then you have to follow the license of the one yours is a derivative of - e. g. when you copy code from another project which you did not write in its entirety.

Your question makes it sound like you have some idea and solution for a common problem and want to supply a pull request with necessary changes to several projects. Just make your changes and submit the patch under the license you want, individually for each project.

1
  • Thank you so much for your help, I was really confused but you made it all a lot clearer for me! Sep 25, 2022 at 6:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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