Signing key - Defy Q&A, Help & Troubleshooting

I have two questions and one of them I'm hoping someone can either point the flaw in my logic or try it out
So firstly, has Motorola released sources for the boot loader as they should in accordance with the GPL? If so could we not do the same as I am suggesting with next question,
Seen as we have kernel sources and we can compile it could we not compile the same kernel as we have, ie compile the 179 group kernel ourselves, (it would have to be am exact duplicate to a kernel we have already), take our compiled kernel and a moto compiled kernel, look at them at a binary level and reverse engineer the signing key from the differences between them?
I know there must be a part I'm missing but still its just a thought
teamwork makes the dream work

Related

XDA-Developers and the GPL

Dear Developers
I'm sure you already heard about the GPL around the forums. In case you did not, the GPL ("GNU General Public License") is the most common license that affects many projects, like the Linux Kernel (the Linux Kernel is licensed under the GPLv2). This affects us, XDA and its members, as we are often working with the Linux Kernel (every Android platform runs on top of the Linux Kernel).
You may ask yourself now "Well, that's nice, but how does this affect me and what does the GPL do?" The answer is pretty simple actually: The GPL guarantees users to examine, modify and share their and others code by enforcing open-sourceness. This means you are free to use any GPL'ed sourcecode for your project, but you must make your used code publically available again.
Now, as many advantages this has, it also means quite some work for us developers. All used sources must be completely public by the time the compiled binary (like a Kernel) goes online. Another requirement is, that the OP must include all information to compile the exact same binary as uploaded by the developer. This means you need to specify:
The used toolchain including its version (linking to your toolchain source is always a good idea)
The used defconfig
The link to your sourcecode (including the used branch, tags,...)
If used, also upload your scripts used for the compilation
If you upload a kernel, publish the source, but the source is not compilable, it means you are breaking the GPL as you did not release the used source. Breaking the GPL actually means breaking the law, which means the sanctions on XDA could possibly be the least of your problems...
Example:
GPL:
- Used sources (cm-10.1 branch)
- Used defconfig
- Used toolchain
- Used scripts
Click to expand...
Click to collapse
@ROM devs, using a precompiled kernel
As you are not compiling the kernel yourself, you do not have to give the above information. However, you have to link to the source of your kernel binary (for example: link to the OP of the used kernel). If you use the stock kernel, you must state this. Linking to the stock sources is not a requirement, but it is not the worst idea.
Keep in mind; if the kernel used is not GPL compliant, your ROM is not GPL compliant either. This may cause your thread to be closed and/or further action on your account may be taken.
Example:
GPL:
The kernel included in this ROM is located HERE. I have not altered anything.
Click to expand...
Click to collapse
If you need/want further information, you might want to take a look at THIS news article written by our Developer Admin pulser_g2

XDA-Developers and the GPL

Dear Developers
I'm sure you already heard about the GPL around the forums. In case you did not, the GPL ("GNU General Public License") is the most common license that affects many projects, like the Linux Kernel (the Linux Kernel is licensed under the GPLv2). This affects us, XDA and its members, as we are often working with the Linux Kernel (every Android platform runs on top of the Linux Kernel).
You may ask yourself now "Well, that's nice, but how does this affect me and what does the GPL do?" The answer is pretty simple actually: The GPL guarantees users to examine, modify and share their and others code by enforcing open-sourceness. This means you are free to use any GPL'ed sourcecode for your project, but you must make your used code publically available again.
Now, as many advantages this has, it also means quite some work for us developers. All used sources must be completely public by the time the compiled binary (like a Kernel) goes online. Another requirement is, that the OP must include all information to compile the exact same binary as uploaded by the developer. This means you need to specify:
The used toolchain including its version (linking to your toolchain source is always a good idea)
The used defconfig
The link to your sourcecode (including the used branch, tags,...)
If used, also upload your scripts used for the compilation
If you upload a kernel, publish the source, but the source is not compilable, it means you are breaking the GPL as you did not release the used source. Breaking the GPL actually means breaking the law, which means the sanctions on XDA could possibly be the least of your problems...
Example:
GPL:
- Used sources (cm-10.1 branch)
- Used defconfig
- Used toolchain
- Used scripts
Click to expand...
Click to collapse
@ROM devs, using a precompiled kernel
As you are not compiling the kernel yourself, you do not have to give the above information. However, you have to link to the source of your kernel binary (for example: link to the OP of the used kernel). If you use the stock kernel, you must state this. Linking to the stock sources is not a requirement, but it is not the worst idea.
Keep in mind; if the kernel used is not GPL compliant, your ROM is not GPL compliant either. This may cause your thread to be closed and/or further action on your account may be taken.
Example:
GPL:
The kernel included in this ROM is located HERE. I have not altered anything.
Click to expand...
Click to collapse
If you need/want further information, you might want to take a look at THIS news article written by our Developer Admin pulser_g2

[Devs] Looking for a kernel base to work with? Start here.

Hello!
I'm hoping to get custom kernel & rom development up and running quickly for the G5 community, and have created a git repository which provides a kernel source base to start with.
What I've done is taken the v10a release sources and modified them to work with build directories and multiple variants. (should they be unlocked or receive the CodeFire treatment at any time)
Here's where to start: https://github.com/jcadduono/nethunter_kernel_g5/tree/stock-6.0
If you'd like a somewhat updated kernel, the stock-6.0.y branch will be patched from Linux 3.18.y branch at kernel.org, see:
https://github.com/jcadduono/nethunter_kernel_g5/tree/stock-6.0.y
Different from the absolute stock defconfigs, I've made the following changes:
Module signature verification disabled
Unnecessary debugging flags separated into debug_defconfig (use EXTRA_DEFCONFIG=debug_defconfig to enable them)
Flags that were previous set to module (=m) have been set to =y (built-in) in case incompatibilities are unable to load stock modules
Each known variant & target is listed in build.sh comments. The default variant when building with ./build.sh is h850 with debugging disabled.
When using the Makefile, VARIANT_DEFCONFIG=variant_xxx_defconfig adds the additional settings per variant to the target defconfig. (by default stock_defconfig)
build.sh is set up to automatically build a dtb.img after creating the kernel Image.gz based on whichever variant you've built for.
You can use ./menuconfig.sh to modify the stock defconfig, or you can copy the stock_defconfig to another name such as my_defconfig and use TARGET=my ./menuconfig or TARGET=my ./build.sh
It's easier to just set the default target in build.sh/menuconfig.sh - each have their configuration options near the top of the files.
Be sure to edit the config variables in build.sh and menuconfig.sh before using. The VERSION file gets appended to the kernel version shown in `uname` when using build.sh.
The toolchain must be pointed to the correct location before it can build. Be sure to have libncurses5-dev and colordiff packages installed for menuconfig.sh.
For a toolchain, I recommend using the GCC Linaro aarch64 5.3 2016.02 release. You can use basically any aarch64 toolchain though.
Download here: https://releases.linaro.org/compone...o-5.3-2016.02-x86_64_aarch64-linux-gnu.tar.xz
You can start by forking my repository on GitHub and giving it your own name if you like. Extra interesting commits are available in the other branches that you should be able to cherry-pick without issues should you be interested in them.
Looking to test your kernel Image.gz + dtb.img?
Look no further than my LazyFlasher repository!
See here: https://github.com/jcadduono/lazyflasher/tree/kernel-flasher
Simply do:
Code:
git clone -b kernel-flasher https://github.com/jcadduono/lazyflasher.git kernel-flasher
cd kernel-flasher
cp /path/to/Image.gz /path/to/dtb.img ./
make
(simply place your kernel Image.gz (optional) and dtb.img (optional) in the root of the repository and type make!)
And you'll have your own dynamic kernel flashing zip for custom recoveries!
The kernel-flasher repository is capable of great things. You can create scripts in patch.d to do anything you like.
Add files to the ramdisk-patch folder and create a script that copies them into the $ramdisk folder and they will be rebuilt into the ramdisk!
By default, no-verity-opt-encrypt is there as an example.
Using setprop in patch.d scripts allows you to set props in default.prop with ease.
Add functions to patch.d-env to make them globally usable across patch.d scripts.
See other branches for more examples, like how to add f2fs lines to the fstab, or patch for system mode SuperSU.
LazyFlasher is the installer used in the Kali NetHunter project. You can also find more examples in the kali-nethunter GitHub!
Good luck, and happy kernel developing!
Thanks so much for posting this.
Code:
./obligatoryn00bstatement
Sorry for not being too knowledgeable here (yet?) and if this sort of comment doesn't belong.
I am a Computer Science major who really wants to learn some skills to hopefully give back to the community.
Is this an area that I could be of use or should I perhaps spend more time going through material on the XDA-U site?
toefurkey said:
Thanks so much for posting this.
Code:
./obligatoryn00bstatement
Sorry for not being too knowledgeable here (yet?) and if this sort of comment doesn't belong.
I am a Computer Science major who really wants to learn some skills to hopefully give back to the community.
Is this an area that I could be of use or should I perhaps spend more time going through material on the XDA-U site?
Click to expand...
Click to collapse
I'm a little tired and somewhat intoxicated here at 3:45 AM so this is going to be a bit of rambling and so on...
While it's certainly a good idea to study up on what interests you before digging into it, sometimes it really can be easier just to dive in to your hobby.
I'm a high school drop out, never made it through college. Everything I've learned is by taking the great work done by the open source community and reading their code and applying it to other projects. That's the great thing about open source and nonrestrictive licenses. Everything is there for you to figure out, make changes, borrow code, run into problems, and the best part - search for solutions that others have already provided in their struggle to do exactly what you're doing.
Have an idea for a great feature? You can probably find it already implemented in another kernel somewhere.
Find the work someone else has done and modify it to fit your needs, but don't forget to give them credit for their work that you've used!
If you're going to start writing your own code, be certain to keep it tidy and variables/functions with meaningful names and comments so that not only others can understand and learn from it, but that you can return to the same code later on and understand it. Confusing code is how bugs tend to show up and become almost impossible to squash.
What I'm trying to get across here is don't be afraid to not be original. Don't be afraid to use others work to accomplish what you want, so long as they receive some attribution. The quickest way to learn how things work is by understanding what's already there and available to you.
You'll notice that there's projects all over XDA with special features ported from one device to another. Isn't it great having the all the best features people have added to other devices on one really nice device that you have?
PS I've never been on the XDA-U site before, so I can't give an opinion there.
I forgot what I was on about so I'll end this here lol.
?jcadduono you're on fire man thank you for everything you've been doing so far with such little resources.
Sent from my LG-H820 using XDA-Developers mobile app
jcadduono, thanks for the info and wonderful words of wisdom!
I totally agree on what you're saying and my goal is to try diving into this as a hobby. The hardest part for me isn't so much the coding part, but just figuring out a starting point to get grounded and build upon and I feel like what you've provided here is perhaps the starting point I need. Now it's just up to me to push myself in my free time.
Hi, i am new to kernel developing, but i did some roms myself before, so no total linux noob.
I cloned your 6.0.y and want to start from there, but im a little bit lost. Do i need to follow the steps @ github, or is your branch kinda pre setup ?
Toolchain path is also set to the one you gave a link too.
Pinu'u said:
Hi, i am new to kernel developing, but i did some roms myself before, so no total linux noob.
I cloned your 6.0.y and want to start from there, but im a little bit lost. Do i need to follow the steps @ github, or is your branch kinda pre setup ?
Toolchain path is also set to the one you gave a link too.
Click to expand...
Click to collapse
Hopefully once the toolchain path is set you should only need to run ./build.sh to actually build the kernel and dtb.
You may be missing some items for menuconfig.sh, which should just be solved by apt-get install colordiff libncurses5-dev
If building inside a ROM tree, it should be fairly simple for developers to adjust their ROM configs to add more to the kernel make command line, such as VARIANT_DEFCONFIG.
No matter what i do, kernel builds, but no dtb.img will be created. Any ideas where to look / what to test ?
I have stock-6.0.y, and did the h850 one.
Hi, is the stock-6.0.y branch removed?
I didnt find it. and need the right defconfig
greetz
mericon

XDA-Developers and the GPL

Dear Developers
I'm sure you already heard about the GPL around the forums. In case you did not, the GPL ("GNU General Public License") is the most common license that affects many projects, like the Linux Kernel (the Linux Kernel is licensed under the GPLv2). This affects us, XDA and its members, as we are often working with the Linux Kernel (every Android platform runs on top of the Linux Kernel).
You may ask yourself now "Well, that's nice, but how does this affect me and what does the GPL do?" The answer is pretty simple actually: The GPL guarantees users to examine, modify and share their and others code by enforcing open-sourceness. This means you are free to use any GPL'ed sourcecode for your project, but you must make your used code publically available again.
Now, as many advantages this has, it also means quite some work for us developers. All used sources must be completely public by the time the compiled binary (like a Kernel) goes online. Another requirement is, that the OP must include all information to compile the exact same binary as uploaded by the developer. This means you need to specify:
The used toolchain including its version (linking to your toolchain source is always a good idea)
The used defconfig
The link to your sourcecode (including the used branch, tags,...)
If used, also upload your scripts used for the compilation
If you upload a kernel, publish the source, but the source is not compilable, it means you are breaking the GPL as you did not release the used source. Breaking the GPL actually means breaking the law, which means the sanctions on XDA could possibly be the least of your problems...
Example:
GPL:
- Used sources (cm-10.1 branch)
- Used defconfig
- Used toolchain
- Used scripts
Click to expand...
Click to collapse
@ROM devs, using a precompiled kernel
As you are not compiling the kernel yourself, you do not have to give the above information. However, you have to link to the source of your kernel binary (for example: link to the OP of the used kernel). If you use the stock kernel, you must state this. Linking to the stock sources is not a requirement, but it is not the worst idea.
Keep in mind; if the kernel used is not GPL compliant, your ROM is not GPL compliant either. This may cause your thread to be closed and/or further action on your account may be taken.
Example:
GPL:
The kernel included in this ROM is located HERE. I have not altered anything.
Click to expand...
Click to collapse
If you need/want further information, you might want to take a look at THIS news article written by our Developer Admin pulser_g2

X compact stock kernel compilation

Hi all,
I like to try tweaking and hacking my phone. I've tried some ROMs on my kugo for some time, but I figured I wanted to make my own personalized build. Right now, I'd like to use the 'Night Light' app from F-Droid, which requires KCAL support. In order to enable KCAL I'd need to edit the stock kernel (I know this can be done, it was the case for Genesis Kernel on Nougat).
Hence I'd want to learn to compile a kernel, but I can't get to the end of Sony's tutorial. I've downloaded the kernel source but I am totally lost with defconfig files. How should I configure the kernel ? There is no obvious choice for a defconfig, and I can't get past point #6 in the tutorial..
Given that I've just discovered kernel compilation today, would someone be kind and take some time to maybe point me to useful doc, give me a clue as to what my next step could be, or teach me how they compile kernels for their device ?
Many thanks for any help,
Cheers
TLDR. How to compile a kernel? I have Sony's source for kugo, but don't understand how to configure the kernel compilation.

Categories

Resources