Nethunter on Redmi 6A:- Can't Find defconfig in Kernel Source!! - Xiaomi Redmi 6A Questions & Answers

Hello, I am trying to compile Nethunter for Redmi 6A, I am using this tutorial on Youtube:-
"Can't send the url (cause i'm a new user)
Redmi 6A's Kernel Sources are available too, I need defconfig for Redmi 6A to compile Nethunter for Redmi 6A but I can't find defconfig of Redmi 6A! arch/arm64/configs contains multiple defconfigs, I can't find Redmi 6A's defconfig! Please Help!!

cactus-o-oss/arch/arm/configs/cactus_defconfig

Liquidfox48 said:
Hello, I am trying to compile Nethunter for Redmi 6A, I am using this tutorial on Youtube:-
"Can't send the url (cause i'm a new user)
Redmi 6A's Kernel Sources are available too, I need defconfig for Redmi 6A to compile Nethunter for Redmi 6A but I can't find defconfig of Redmi 6A! arch/arm64/configs contains multiple defconfigs, I can't find Redmi 6A's defconfig! Please Help!!
Click to expand...
Click to collapse
Need to look in arm not arm64.
arch/arm/configs
Also see is you have def config on the device. Look in /proc for config.gz

mrmazak said:
Need to look in arm not arm64.
arch/arm/configs
Also see is you have def config on the device. Look in /proc for config.gz
Click to expand...
Click to collapse
arch/arm/configs?? It contains a lot of files. Which one is for Redmi 6A??
/proc? config.gz?? I do know that we can extract kernel config from android devices, but i tried it on my Samsung On7 prime and it didn't work. I haven't tried it on Redmi 6A, maybe I don't know the exact procedure to do it correctly please let me know how to do it!

Liquidfox48 said:
arch/arm/configs?? It contains a lot of files. Which one is for Redmi 6A??
/proc? config.gz?? I do know that we can extract kernel config from android devices, but i tried it on my Samsung On7 prime and it didn't work. I haven't tried it on Redmi 6A, maybe I don't know the exact procedure to do it correctly please let me know how to do it!
Click to expand...
Click to collapse
To see which config in the source should be for your device. Look at the /system/build.prop.
Here is from my device.
ro.build.description=full_k62v1_64_bsp-user 8.1.0 O11019 1537518103 release-keys
So my defconfig is "k62v1_64_bsp"
Not always, but often the kernel config used to build kernel on device is saved on the device as well.
In my current phone. (Blu Vivo XL4 - mtk Helio p22). The config file was stored at "/proc/config gz"
From adb you can pull it. . Might need to be in rooted shell in order to get access, do not remember.
Try this adb cmd in your terminal to see
Code:
adb shell ls /proc | find "config"
That will show the contents of the /proc folder, and filter it to show only files with "config" in the name.

mrmazak said:
To see which config in the source should be for your device. Look at the /system/build.prop.
Here is from my device.
ro.build.description=full_k62v1_64_bsp-user 8.1.0 O11019 1537518103 release-keys
So my defconfig is "k62v1_64_bsp"
Not always, but often the kernel config used to build kernel on device is saved on the device as well.
In my current phone. (Blu Vivo XL4 - mtk Helio p22). The config file was stored at "/proc/config gz"
From adb you can pull it. . Might need to be in rooted shell in order to get access, do not remember.
Try this adb cmd in your terminal to see
Code:
adb shell ls /proc | find "config"
That will show the contents of the /proc folder, and filter it to show only files with "config" in the name.
Click to expand...
Click to collapse
"To see which config in the source should be for your device. Look at the /system/build.prop."
How to do it??

​
Liquidfox48 said:
"To see which config in the source should be for your device. Look at the /system/build.prop."
How to do it??
Click to expand...
Click to collapse
Several ways are possible.
1. Adb pull /system/build.prop
2. With root explorer type app. Browse to /system and open build.prop
3. File manager from TWRP
4. Open stock rom system image look for build.prop.

Liquidfox48 said:
"To see which config in the source should be for your device. Look at the /system/build.prop."
How to do it??
Click to expand...
Click to collapse
Here I looked on the GitHub shared kernel source, and the "cactus" defconfig is right there in the config folder.
https://github.com/MiCode/Xiaomi_Ke...actus-o-oss/arch/arm/configs/cactus_defconfig

mrmazak said:
Here I looked on the GitHub shared kernel source, and the "cactus" defconfig is right there in the config folder.
https://github.com/MiCode/Xiaomi_Ke...actus-o-oss/arch/arm/configs/cactus_defconfig
Click to expand...
Click to collapse
thanks, I also extracted config.gz from /proc/config.gz from TWRP
there are major difference between the Github's config and extracted config
which one to use?? the one extracted via TWRP from proc/config.gz or Github's config???
Note: I uncompressed the config.gz using archive manager in Ubuntu.

Liquidfox48 said:
thanks, I also extracted config.gz from /proc/config.gz from TWRP
there are major difference between the Github's config and extracted config
which one to use?? the one extracted via TWRP from proc/config.gz or Github's config???
Note: I uncompressed the config.gz using archive manager in Ubuntu.
Click to expand...
Click to collapse
Hopefully what you may find if you compare the two closely, is that the file from /proc/ will just have extra lines that are all "option not set".
The git hub source might build both configs, But not certain.
All I can suggest is to try both

mrmazak said:
Hopefully what you may find if you compare the two closely, is that the file from /proc/ will just have extra lines that are all "option not set".
The git hub source might build both configs, But not certain.
All I can suggest is to try both
Click to expand...
Click to collapse
Okay, so far I am using these tutorials to compile kernel of Redmi 6A for Nethunter:
https://github.com/offensive-security/kali-nethunter/wiki#70-porting-nethunter-to-new-devices
http://en.miui.com/thread-293285-1-1.html
https://youtu.be/6-oKLou69WM
Please have a look and help me understand what I am doing and how to do it properly.
If you have time please post a guide to compile kernel for Nethunter.
GitHub link to Nethunter:
https://github.com/offensive-security/kali-nethunter

Liquidfox48 said:
Okay, so far I am using these tutorials to compile kernel of Redmi 6A for Nethunter:
https://github.com/offensive-security/kali-nethunter/wiki#70-porting-nethunter-to-new-devices
http://en.miui.com/thread-293285-1-1.html
https://youtu.be/6-oKLou69WM
Please have a look and help me understand what I am doing and how to do it properly.
If you have time please post a guide to compile kernel for Nethunter.
GitHub link to Nethunter:
https://github.com/offensive-security/kali-nethunter
Click to expand...
Click to collapse
No, I am not making a how to guide.
Mainly because I am no expert , by any meaning of it.
But try and look at this GitHub. It is kernel builder who is making kernel for your device.
https://github.com/Dhoine/android_kernel_cereus

Hey anyone plz tell me how to Install Kali nethunter in redmi 6A

Related

[Q] how to compile tun.ko?

can anybody tell me how to compile tun.ko for any rom? what would i need to download/install etc? any help would be appreciated. thanks!
get the kernel soruce and check config file for tun
in .config file search for "TUN" keyword, change Y to M, run make menuconfig, save, compile.
slow down guys absolute noob here. how/where do i run makeconfig? what software would i need? sorry if stupid questions :c
Sent from my GT540 using XDA App
daggerxXxsin said:
slow down guys absolute noob here. how/where do i run makeconfig? what software would i need? sorry if stupid questions :c
Sent from my GT540 using XDA App
Click to expand...
Click to collapse
First, you need the kernel source code for your device. The Linux GPL requires that OEMs provide the kernel source so you should be able to find it.
You'll need a linux machine with a development environment. You'll also need the Android NDK for the ARM toolchain.
Once you've got all that lined out, you'll need a kernel config. You can usually get this from your device's proc directory as /proc/config.gz.
Now gunzip the config.gz in your kernel source directory, rename it to ".config" and run "make oldconfig". If it is from an identical source tree, then it should run without prompting.
Now run make menuconfig and drill down to the tun options and enable it as a module. Now you can "make" your kernel and "make modules" for the modules.
okay so first thing is to setup a build environment. gotcha. will work on that.
Sent from my GT540 using XDA App
Gene Poole said:
First, you need the kernel source code for your device. The Linux GPL requires that OEMs provide the kernel source so you should be able to find it.
You'll need a linux machine with a development environment. You'll also need the Android NDK for the ARM toolchain.
Once you've got all that lined out, you'll need a kernel config. You can usually get this from your device's proc directory as /proc/config.gz.
Now gunzip the config.gz in your kernel source directory, rename it to ".config" and run "make oldconfig". If it is from an identical source tree, then it should run without prompting.
Now run make menuconfig and drill down to the tun options and enable it as a module. Now you can "make" your kernel and "make modules" for the modules.
Click to expand...
Click to collapse
Hi Gene, i want to ask, if we cannot find the config.gz file from the device, is it imposibble to get the tun.ko working?
Or if it possible, can you tell me how to gain some configuration, that used by the tun.ko, so we can set the config from menuconfig correctly?
I`ve tried to compile tun.ko for a device, the insmod working fine, but when the vpn try to use the tun, it is crash, it raise segmentation fault.

Open CM10.1 Source in Eclipse

Hello peeps,
I can't build CM10.1 (maguro) in Eclipse, I got an error from packages/apps/apollo/src/com.andew.utils/RefreshableFragment.java. It's about Fragment class.
Here is the error :
The type android.view.View$OnCreateContextMenuListener cannot be resolved. It is indirectly referenced from required .class files.
And naturally project can't be built :
The project was not built since its build path is incomplete. Cannot find the class file for android.view.View$OnCreateContextMenuListener. Fix the build path then try building this project
However, I can build in command line via brunch, mm, mmm, etc.
I have to fix these issues, because anytime I add something in a string.xml file, R.java is not updated as the project can't be built.
u will have to add all the missing .jar files... else you have an option to just build an app after you compiled the whole rom with
Code:
mmm "project"
command
frapeti said:
u will have to add all the missing .jar files... else you have an option to just build an app after you compiled the whole rom with
Code:
mmm "project"
command
Click to expand...
Click to collapse
Thanks for your answer. Well yes I currently use mm or mmm commands to rebuild the package I am working on.
I wanted to know if there was a more comfortable option. Adding all the jar files is the way to go as you said.
I'll see if I can deal with that, otherwise I'll stay with mm and mmm command lines.

Looking to create your own custom kernel? Start here!

INTRODUCTION
I create this guide in the hope to jump start development on our lovely Exynos devices.
I expect that before you start, you have a Linux installation in either a virtual machine or on a physical PC.
Debian Jessie, Kali Linux, Mint, or Ubuntu are excellent choices and what I'm familiar with, so if you get stuck it'll be easier for me to help you if you use these.
PREREQUISITES
WARNING: Custom kernels on the Note 7, S7, and S7 edge currently require encryption to be disabled in order to boot. They also have to disable some secure MobiCore firmware. You will have to format your entire data partition when going from stock kernel to a custom kernel! Once you're on a custom kernel with non-encrypted data, you shouldn't have to wipe it going to another custom kernel.
Be careful not to disable developer options or OEM unlock, otherwise all your data will be destroyed! Back up your data partition whenever you flash stock. (for upgrades, etc.)
First off, you'll want to download some tools necessary for building and downloading kernel sources:
git-core - you'll want git for downloading and maintaining your sources
build-essential - native gcc & tools for building (needed for build commands)
libncurses5-dev - needed to build menuconfig
diff - used to compare config changes
colordiff - used by diff to provide colorful human readable diff output
Code:
apt-get install git-core build-essential libncurses5-dev diff colordiff
PREPARING YOUR ENVIRONMENT
Once you've got that out of the way, you should create an organized environment for working. I like to use ~/build.
Code:
mkdir -p ~/build/toolchain ~/build/kernel
DOWNLOADING & INSTALLING A TOOLCHAIN
You'll want to download a toolchain for kernel building. I recommend using Linaro's optimized ARM toolchains.
The Exynos 8890 benefits from the Cortex-A53 code compiling optimizations.
GCC 4.9: https://releases.linaro.org/components/toolchain/binaries/4.9-2016.02/aarch64-linux-gnu/
GCC 5.X: https://releases.linaro.org/components/toolchain/binaries/latest-5/aarch64-linux-gnu/
The actual file that you want ends in -x86_64_aarch64-linux-gnu.tar.xz (assuming you have a 64-bit Linux install, seriously, 32-bit needs to go! )
We'll use the GCC 5.3.1 2016.5 toolchain in this example.
Let's download and extract it now:
Code:
cd ~/build/toolchain
wget "https://releases.linaro.org/components/toolchain/binaries/latest-5/aarch64-linux-gnu/gcc-linaro-5.3.1-2016.05-x86_64_aarch64-linux-gnu.tar.xz"
tar xf ./*linux-gnu.tar.xz
rm ./*linux-gnu.tar.xz
That's it for installing the toolchain, easy right?
DOWNLOADING THE KERNEL
Rather than download your kernel sources directly from Samsung full of wacky issues when you change a single configuration option, you can grab it from my GitHub!
Using this method, you have an already working stock kernel prepared to be modified and built at your leisure.
You're also able to grab updates and fixes from me should you want them. I'll be committing new kernel source updates from Samsung to the opensource branch.
The stock-6.0 branch will be rebased on top of opensource when that happens, then stock-6.0.y (stock, with Linux updates) will be rebased on top of that.
Cool concept, right?
First, you'll want to create a GitHub account if you don't have one already.
This will allow you to upload your changes and share your kernel with other interested users and developers.
Once you've got your account, and you're logged in, browse to:
https://github.com/jcadduono/android_kernel_samsung_universal8890
You want to fork the sources to your own account, to do this simply click the [Fork | ] button near the top right of the page:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Now you've got your own copy of the Note 7 / S7 / S7 edge kernel sources on your GitHub!
The next step is to use git to download it to your PC.
Replace "your_username" with your actual GitHub username. Using [email protected] you can avoid being asked for your username each time you push new changes.
Code:
cd ~/build/kernel
git clone https://[email protected]/your_username/android_kernel_samsung_universal8890 samsung_universal8890
cd samsung_universal8890
The default branch is stock-6.0. This is what most users will want. If you wish to start on a kernel that is updated to the latest Linux minor version, then simply:
Code:
git checkout stock-6.0.y
There's a twrp-6.0 branch that's used for building the kernel inside the official TWRP for Note 7 / S7 / S7 edge.
There's also a nethunter-6.0 branch used to build the kernel used by Kali NetHunter on those devices.
You can use git log <branch> to view commits, and git cherry-pick <commit id> to copy commits from those branches into yours if you like.
CONFIGURING GIT
Before you start working on your kernel, you will need to set up your git profile.
The user values show up in commit messages to tell people who authored them.
Code:
git config --global user.name "Your Name"
git config --global user.email "[email protected]"
git config --global push.default simple
YOUR FIRST COMMIT
We'll want to check out a new branch, and give it your own cool name. I suggest adding a -6.0 suffix to it because you'll probably want to start a new branch when Android 7.0 comes out.
We're going to use "coolname" as our example, so be sure to replace that with what you really want it to be called in the next steps.
Code:
git checkout -B coolname-6.0
Next we'll need to modify the build scripts to fit our setup.
Open build.sh, menuconfig.sh, and dtbgen.sh.
You'll want to set the TOOLCHAIN= path in all 3 scripts. If you're following this guide, then it's already correct!
In menuconfig.sh and build.sh, you'll want to set your default target config name.
See the line:
Code:
[ "$TARGET" ] || TARGET=samsung
You'll want it to look like this:
Code:
[ "$TARGET" ] || TARGET=coolname
Now you want to copy the default samsung kernel configuration so you have your own to work with:
Code:
cp arch/arm64/configs/samsung_defconfig arch/arm64/configs/coolname_defconfig
Now you'll have prepared your kernel source for starting work on your own custom kernel!
Let's turn that into a commit, but first look at the changes you've made using:
Code:
git diff
Does that look good? If not, fix what's broken before proceeding.
Next you'll want to add files that will be part of your commit.
For simplicity's sake, let's just add all of the changed files into the commit.
Code:
git add .
Now to make your commit:
Code:
git commit -m "My first commit, setting up my coolname kernel!"
You've done it!
CONFIGURING YOUR KERNEL
We'll use the menuconfig.sh script to launch the kernel menuconfig.
Code:
./menuconfig.sh
Change whatever options you're interested in, but don't change a lot all at once, otherwise when or if you run into issues, you won't know which option caused it.
Once you're done playing in the menuconfig, exit and save.
You'll be shown a colorful difference between your old configuration and your new one.
It will ask you if you want to save it, and you just have to type "y" and press enter for it to be saved.
At this point it's a good idea to make another commit to save your configuration changes.
If you need to edit the commit, you can easily use git commit --amend to fix it up.
BUILDING YOUR NEW KERNEL
Let's take your new config for a test drive.
To build your kernel, simply run:
Code:
./build.sh gracelte xx
gracelte = Note 7
herolte = S7
hero2lte = S7 edge
xx = International N930F & N930FD
kor = Korean N930K, N930L, & N930S
Yes, you can compile your kernel to all 3 of those devices using just your single config!
The power of device specific config additions.
Once your kernel is finished building, the resulting files will be located at:
Code:
build/arch/arm64/boot/Image
build/arch/arm64/boot/dtb.img
build/modules/*.ko (if modules are enabled)
INSTALLING YOUR NEW KERNEL
The LazyFlasher project comes to the rescue here. It's the swiss army knife of kernel flashing in TWRP.
There's a specific branch for the Note 7 called kernel-flasher-gracelte. (use kernel-flasher-herolte instead if building for S7/S7 edge!)
To download it (feel free to fork it so you can have a copy on your GitHub to modify instead!):
Code:
cd ~/build
git clone -b kernel-flasher-gracelte https://github.com/jcadduono/lazyflasher.git
cd lazyflasher
To use LazyFlasher, you'll probably want to take a look at the Makefile, config.sh, and META-INF/com/google/android/update-binary (a shell script).
There's a few things you can change there to personalize it to your needs.
You should also enter the patch.d folder and delete 060-f2fs-fstab if you don't have f2fs enabled in your kernel, and edit the io_scheduler in 070-kernel-settings if you don't have fiops enabled either.
(make another git commit to save your setup!)
Once the installer is set up to your liking, all you have to do to build it is copy the Image and dtb.img from your build output into the lazyflasher folder.
If you have any modules (.ko files) to install, place them in the modules folder.
Now simply run:
Code:
make
A TWRP flashable zip and sha1sum is created!
At this point, you will need to use the [Format Data] button in TWRP if your device is encrypted! There is no known way around this.
This will wipe all data from your phone, including your internal storage, essentially making it like new.
Transfer it to TWRP and flash away, you've just lost your custom kernel development virginity.
Go have a few beers to celebrate, or to drown your sorrows in the case of a boot loop.
You should consider taking a look at the patch.d scripts sometime so you know what it's actually doing.
PROBLEMS?
Post a reply here and I'll try to find a solution and add it to this post.
RESOURCES
Need a text editor for coding? I use gedit. It's pretty, light, and you can get some decent plugins for it.
It's a minimal editor, so don't expect anything really fancy. Configure it and enable plugins before you decide to trash it.
Code:
apt-get install gedit gedit-plugins
Here's an awesome git starter guide: http://rogerdudler.github.io/git-guide/
THANKS
If not for @Tkkg1994 finding out what changes are needed to get custom kernels up and running, we wouldn't have this lovely guide here!
Thanks for the amazing guide, i got it compiled successfully but the problem comes after the device boots up, it asks for my Pattern and when i enter it, it keeps saying incorrect and wont let me in, any help?
Ather said:
Thanks for the amazing guide, i got it compiled successfully but the problem comes after the device boots up, it asks for my Pattern and when i enter it, it keeps saying incorrect and wont let me in, any help?
Click to expand...
Click to collapse
Sorry, I forgot to add to the guide that custom kernels don't support encryption. You should flash your stock kernel & supersu, install something like titanium backup, and back up all your things to an external SDcard.
I've added a warning in the thread and included it in the instructions now.
that's weird, I disabled lockscreen security and reinstalled the kernel, booted up fine with selinux enforcing http://i.imgur.com/IVSTfV1.png
Ather said:
that's weird, I disabled lockscreen security and reinstalled the kernel, booted up fine with selinux enforcing http://i.imgur.com/IVSTfV1.png
Click to expand...
Click to collapse
Are you still encrypted?
Maybe it's just one of the secure mobicore firmware that were removed that your lock screen depended on. You might be able to set up the lock screen again now, and this time it won't require that specific piece of firmware.
no i had already wiped data when i installed hydra kernel so after flashing my custom kernel i tried to setup the fingerprint and it gave an error that the fingerprint sensor isn't available try later, do you have any idea how to make a decrypted kernel like hydra?
Ather said:
no i had already wiped data when i installed hydra kernel so after flashing my custom kernel i tried to setup the fingerprint and it gave an error that the fingerprint sensor isn't available try later, do you have any idea how to make a decrypted kernel like hydra?
Click to expand...
Click to collapse
Oh, I'm not sure why that happened then. There shouldn't have been anything extra removed on top of what HydraKernel removes.
My device is working with both Iris and Fingerprint unlock right now.
Can you post the output of:
Code:
ls /system/app/mcRegistry
can you test out my kernel? i see hydra zip has some files that it replaces, and the lazyflasher has similar files, could that be the problem?
Ather said:
can you test out my kernel? i see hydra zip has some files that it replaces, and the lazyflasher has similar files, could that be the problem?
Click to expand...
Click to collapse
try backing up your system/data to !!external sdcard!! in twrp, saving your internal storage to pc, then formatting data.
restore your stock kernel and system before flashing your custom kernel.
then see if it works from scratch.
if it's all fine, try restoring your data backup.
Ather said:
no i had already wiped data when i installed hydra kernel so after flashing my custom kernel i tried to setup the fingerprint and it gave an error that the fingerprint sensor isn't available try later, do you have any idea how to make a decrypted kernel like hydra?
Click to expand...
Click to collapse
This sounds exactly like you did not patch /system/app/mcRegistry files
Sent from my SM-N930F using XDA Labs
Tkkg1994 said:
This sounds exactly like you did not patch /system/app/mcRegistry files
Sent from my SM-N930F using XDA Labs
Click to expand...
Click to collapse
They shouldn't be patched though, the installer simply removes the secure ones that the device is unhappy with.
It works fine for me, so I know the offending ones are being removed, but maybe somehow it deleted all of his tlbins?
Be nice if he provided the contents of his mcRegistry :/
jcadduono said:
They shouldn't be patched though, the installer simply removes the secure ones that the device is unhappy with.
It works fine for me, so I know the offending ones are being removed, but maybe somehow it deleted all of his tlbins?
Be nice if he provided the contents of his mcRegistry :/
Click to expand...
Click to collapse
Hello @jcadduono,
I am one of your "orphan" users of Idlekernel. It is the very best kernel for the Note 3.
Would you produce a blind update of it, please, please.
I would be more than happy to test it before you upload to general public.
Sorry guys for the OT.
Need help for finalisation kernel
Hello and thank you OP for the tutorial, I have done everything and no worries except when I want to flash the kernel does not boot, then I would like to know how to get a boot.img with the dtb.img files and the image create after Compilation, if someone can help I will be grateful
Thank you
Help on Kernel modules and patches
{MY QUESTIONS ARE ABOUT BOLD ITEMS BELOW}
Once your kernel is finished building, the resulting files will be located at:
Code:
build/arch/arm64/boot/Image
build/arch/arm64/boot/dtb.img
[B]build/modules/*.ko (if modules are enabled)[/B]
INSTALLING YOUR NEW KERNEL
The LazyFlasher project comes to the rescue here. It's the swiss army knife of kernel flashing in TWRP.
There's a specific branch for the Note 7 called kernel-flasher-gracelte. (use kernel-flasher-herolte instead if building for S7/S7 edge!)
To download it (feel free to fork it so you can have a copy on your GitHub to modify instead!):
Code:
cd ~/build
git clone -b kernel-flasher-gracelte https://github.com/jcadduono/lazyflasher.git
cd lazyflasher
To use LazyFlasher, you'll probably want to take a look at the Makefile, config.sh, and META-INF/com/google/android/update-binary (a shell script).
There's a few things you can change there to personalize it to your needs.
You should also enter the patch.d folder and delete 060-f2fs-fstab if you don't have f2fs enabled in your kernel, and edit the io_scheduler in 070-kernel-settings if you don't have fiops enabled either.
(make another git commit to save your setup!)
Once the installer is set up to your liking, all you have to do to build it is copy the Image and dtb.img from your build output into the lazyflasher folder.
If you have any modules (.ko files) to install, place them in the modules folder.
Now simply run:
Code:
make
Got a few question for anyone that is familiar with the exynos8890-gracelte BUILD. This in regards to files output after compilation of kernel code; specifically with editing patches and providing module support.
Where are the *.ko files located if default output is used(using your ./build.sh gracelte xx)? By the way...Your tutorial is awesome, first and foremost...but I want to be sure that I am pulling the files from the correct location (being a newbie at this android kernel building stuff). I found my modules under "~/build/kernel/samsung_universal8890/build/lib/modules/3.18.14-dee-gracelte-xx-0.1" which is the parent folder to other folders/files that seem to be of interest. After digging deeper there are even folders within the previously mentioned (named) one that have items of question as to whether they are needed in my "flasher" module folder. Such as pictured https://drive.google.com/open?id=0B-3GHX6_T7lYRkRUUVVORE1OM1k
I just want to have a functioning kernel with module support/modules in there proper place. Another item is patches. Would it be possible to just change "070-kernel-settings" patch to "io_scheduler=noop" if I changed default setting to such? If so, what other, if any, items in this file would need editing? Where else can I find patch files located on the web or is this something home-brewed? Thanks for all your hard work.
I also assume that by changing to the proper package manager commands, this procedure will work for pretty much most Linux distros.
Windows 10 Support Number

[Guide][Noob-Friendly]Building Kernel For Lenovo A6000/+

Building A Kernel For A6k​
Hello Folks, Looks like A6000 Forums Are On Fire So Now I AM HErE TO POuR Oil In The FIRE
Lets Get Straight To The POint
This Guide Will Help you build a kernel for our little Precious One
Requirements:
Ubuntu[DOnt Ask How]
Required Libs like libncurses, and stuff [If you face any such error realted to libs, just google Once]
Good Internet
AT least 2GB RAM and a good processor
A bit of your time
Patience and brain
Steps:
1) Create A folder anywhere with any name you want and open it
2) Open terminal in that folder and Run This COmmand Which will install all required Libs
Code:
sudo apt-get install -y build-essential kernel-package libncurses5-dev bzip2
3)After It gets done now we need a toolchain so now type " mkdir kernel" and "cd kernel" without quotes
4) Now we will dload toolchain so first install GIT and GCC libs for ex
"sudo apt get-install git"
Now Run This to clone the toolchain
Code:
git clone https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/arm/arm-eabi-4.8
5)After toolchain gets downloaded now we need kernel sources, to simplify it clone the sources from my GIT using this command in terminal
Code:
git clone https://github.com/varunhardgamer/kernel_lenovo_a6000.git
6)After Dloading kernel sources open the kernel sources folder which may have name Semar Kernel or something like that and open BuildingKernel.txt and understand the way you need to edit Build.sh
Its not hard you just need to type the address to your kernel folder which you made
7)Now type
Code:
make ARCH=arm
and press enter
8)Then RUn
Code:
make wt86518_defconfig
9)THen Run
Code:
make menuconfig
and a popup will appear showing you all the tweaks that can be included in the kernel, select accordingly and save it
10)After you Finish tweaking it, open build.sh and edit it acordingly and then run the script by " .build.sh " in the terminal and wait till you get the zimage which is the kernel
8)Now download semar kernel r5zip and push your zimage inside it and flash your first Kernel
COmment here if you face any Errrors
Kernel Source _ https://github.com/varunhardgamer/kernel_lenovo_a6000
Credits to-
Me
Mr.AW
@3lambda
Orata
@mshoaib7
@dev_harsh1998
and XDA Forums
Reserved
Link To the original Thread
https://forum.xda-developers.com/android/software/guide-easy-kernel-building-tutorial-t3581057
Thanks To @3lambda
[Really THanks Man]
Just In Case
DualBoot Coming Soon By The WAy
The MErc With A MouTh is Back
The source you have mentioned isnt the proper source for Kernel and is Limpy when it comes to New stuff support better you link them to this repo :- https://github.com/dev-harsh1998/android_kernel_lenovo_msm8916
and GCC-4.7 is old and has regression bugs Better use gcc-4.8
Regards,
dev_harsh1998
dev_harsh1998 said:
The source you have mentioned isnt the proper source for Kernel and is Limpy when it comes to New stuff support better you link them to this repo :- https://github.com/dev-harsh1998/android_kernel_lenovo_msm8916
and GCC-4.7 is old and has regression bugs Better use gcc-4.8
Regards,
dev_harsh1998
Click to expand...
Click to collapse
Ok but the build.sh that i have mentioned will have to be edited again
Oh man
OK wait
Some Modifications To the guide will be done by tomorrow
No worries you doing good work
dev_harsh1998 said:
No worries you doing good work
Click to expand...
Click to collapse
Thanks Limit DOne
WIll thanks Tomorrow
You need to edit build.sh
Change -j64 to -j4 or it'll mess up for everyone.
---------- Post added at 05:02 PM ---------- Previous post was at 05:02 PM ----------
dev_harsh1998 said:
The source you have mentioned isnt the proper source for Kernel and is Limpy when it comes to New stuff support better you link them to this repo :- https://github.com/dev-harsh1998/android_kernel_lenovo_msm8916
and GCC-4.7 is old and has regression bugs Better use gcc-4.8
Regards,
dev_harsh1998
Click to expand...
Click to collapse
+1
Use this kernel it's updated nd better.
Has.007 said:
You need to edit build.sh
Change -j64 to -j4 or it'll mess up for everyone.
---------- Post added at 05:02 PM ---------- Previous post was at 05:02 PM ----------
+1
Use this kernel it's updated nd better.
Click to expand...
Click to collapse
Oh Thanks for pointing that 64 out:good:
Thanks
The Hard Gamer said:
Oh Thanks for pointing that 64 out:good:
Thanks
Click to expand...
Click to collapse
Welcome. Keep up the good work. :good:
Lol, just rechecked your git.
The kernel will not compile. You need to define the toolchain.
Has.007 said:
Lol, just rechecked your git.
The kernel will not compile. You need to define the toolchain.
Click to expand...
Click to collapse
I myself used this method and compiled a kernel
And for toolchain
I already mentioned
export cross_compile in .sh
The Hard Gamer said:
I myself used this method and compiled a kernel
And for toolchain
I already mentioned
export cross_compile in .sh
Click to expand...
Click to collapse
bad command practise..
is it work for any version of Android? currently I'm using RR 5.8.2
hayatnas18 said:
is it work for any version of Android? currently I'm using RR 5.8.2
Click to expand...
Click to collapse
Wait till i update the guide again

Compiled LOS 16.0 but need help to share

hi friends,
I have compiled pure LOS 16.0 for Kenzo with the latest code from repo and with the latest available security patch.
However I don't know how to download it or basically share it with you guys.
Can someone please help me on this?
I am looking forward to compile a monthly release but am stuck as of now .. Please help.
Thank you.
https://forum.xda-developers.com/showthread.php?t=2751407
At last, after makefiles optimize all the processes and build the device specific parts including binaries and libs and apps necessary for it to get booted, the 'system' folder and the 'boot.img' folder are prepared in the out/target/product/device. The META-INF folder is prepared at instance and the system and boot.img are packed into a zip file(whose name is also processed by the makefiles ) and md5 sum prepared. The flashable zip gets prepared only if you run the "brunch" command or "lunch + mka" command.
Click to expand...
Click to collapse

Categories

Resources