[Android Software Development] Stayn:
This software will ask for sudo permissions in your machine to download and install all required tools for this program to run correctly, also, it'll execute chmod and chown to this program files and ~/.megarc (if exists) for the correct functioning of all the code, I'm not responsable if this program breaks your Machine (which it shouldn't be able by no ways). When you run for the first time this program, it will proceed to his first run configuration after the user authorization.

Welcome, I've been developing this program a long time ago with my free time after college, this is my first project made in Bash, the main purpose of all this software is to make a lot easier the process of building a Kernel, no matter which device you're building to (excluding MTK and those without source). This program will automatically download all required tools for Kernel building (~1.5GB), including the CrossCompiler (GCC arm/arm64) and other misc tools. You don't need a lot of knowledge to build your kernel with this software and it has all the tools for automatically build everything in just one command! :o

Requeriments:

A machine with Linux

Git

This program

Once you've downloaded the program to your Machine, you have to cd with Terminal to where you downloaded all the files and execute "core.sh" (bash core.sh or . core.sh) (Like this Example), this is indispensable every time you want to run the program, because it sets the program paths (Otherwise it'll not work)

Now, How it works?

Once you run the program, if it's for the first time then it'll automatically download all required tools and install them, after this it's time to setup your environment. You'll see a folder named "source", you have to put there the folder with the Kernel source contents like this and another folder named "templates" where you can set your AnyKernel (only AnyKernel for now) templates for different devices (Or just use the local one).

That's all, this program only needs you to set the Kernel source, now you've to run again core.sh and it'll prompt to you all the data needed for that session, like the name of the kernel, target android, version, kernel source folder, etc... When you've to select the architecture of your device, arm or arm64 and it'll download the correspondent CrossCompiler (GCC 4.9), after this, it'll promt to you how to set Kernel Installer template, the first option is to extract the local AnyKernel source into "./out/ak_template/" (Thanks to @osm0sis), second option is for select a user template from "./templates/" folder and the third option requires you to set manually the installer template inside "./out/ak_template/" similar or like this (Remember to configure it).

When it promt to you the variant, you've to put preferably the codename of your device (For example: Oneplus One codename is "bacon") and then select a defconfig for that device (For example: For Oneplus One it would be "lineageos_bacon_defconfig"), now that the program knows for which device It's going to compile, (You can add more variants) then, you can enable the KernelDebug option to enable the creation of the Device tree image (Applies for arm devices only) and allow the kernel source cleaning on every compiling process...

Now, let's get into the commands:

Command: "essentials <flag>": Here is where you start once you finish setting all the configs, 'essentials' is the main command of this program, but it only works with flags, otherwise it'll display the flags information that I'm gonna show right now:

Flags:

--kernel (Start the process of compiling your kernel)

--dtb (Generates the device tree image, applies to arm devices only)

--anykernel (Builds a installer for your kernel based on Anykernel by @osm0sis)

--upload (Uploads your Kernel installer to the root of your MEGA storage)

--all (This flag does all processes mentioned above)

You can combine all the flags except for "--all", because this one already does everything, also, no matter in which order, all the functions are going to be done in order to prevent an error (For example: 'essentials --anykernel --kernel' will build the kernel and then build the installer).

Also, after the first run, theres a file named: "defaultsettings.sh", it has a variable inside named "DSENABLED", if you set it to 1, the program instead of prompt you for information when you run "core.sh", it'll take all the config directly from that file, just make sure you've configured it first. :good:

Command: "auto <device> <flag>": This command allows you to make pre-configured files for a specified device, it requires that you have executed the program core.sh for the first time because it stores some config in your ~/.bashrc file, then, you can turn on or restart your machine and this command will still be available for it's use.

When you run 'auto' and next to it you specify the device (for example: auto oneplus), if the device (oneplus) doesn't exist in the device database (./resources/devices/) then, it'll promt to you all the data required for kernel, dtb (if applies), anykernel and upload process.

Once you have configured your device it'll be stored and when you run again the command 'auto' followed by the device name you configured before, (for example: auto oneplus) it'll load that device config file and build everything automatically (Kernel, dtb if applies, anykernel and upload if its enabled).

The Flags for this commands are:

--edit (Opens you the <device> config file for editing with nano)

--remove (Simply removes the <device> config file)

For more information I highly recommend to read the README.md in this program source on Github (It contains a more datailed and complete information). :D

This program has been tested and used on the following Linux distributions:

Ubuntu

Debian

I will really appreciate any feedback about how it performs on other Linux distributions :o

You can contact me with a PM (private message) here or in my Telegram group! (I'm @ArtxDev)

Me, @Stayn (Artx)

@osm0sis for his AnyKernel

This project on Github is open to pull requests, I will not hesitate to dedicate you a space here if you contribute for this project :good:

I'll be updating this program fixing bugs and bringing new features :good:

If you like it and want to do a small donation it for sure is gonna help me a lot and keep me motivated! :laugh:

Thank you and enjoy it!

XDA:DevDB Information

Kernel Building - Essentials, Tool/Utility for all devices (see above for details)

Contributors

Stayn

Source Code: https://github.com/KB-E

Version Information

Status: Stable

Current Stable Version: 1.0

Stable Release Date: 2018-07-30

Created 2018-07-09

Last Updated 2018-07-30