Compile and flash stock rom? - Xiaomi Redmi Note 7 Questions & Answers

Hi,
I have a kernel module that I compiled using the kernel source provided by Xiaomi, unfortunately I can't load the modules since it's not signed with Xiaomi's key so I want to compile my own kernel with module signature disabled so i can load my module.
I've tried to compile the kernel source provided by Xiaomi and after fixing some errors in the source I got my zImage file and flashed it using Anykernel3, but the device keeps bootlooping to the fastboot mode.
Is there some guide or tips to compile stock kernel ?
Regards

where you get xiaomi's kernel source?

gamecss said:
where you get xiaomi's kernel source?
Click to expand...
Click to collapse
Look around GitHub
Use predator kernel source.
Search self

Have a nice day
GitHub - stormbreaker-project/kernel_xiaomi_lavender
Contribute to stormbreaker-project/kernel_xiaomi_lavender development by creating an account on GitHub.
github.com

i think this does not to be the internal kernel of Xiaomi

you should get xiaomi kernel there:
GitHub - MiCode/Xiaomi_Kernel_OpenSource at lavender-p-oss
Xiaomi Mobile Phone Kernel OpenSource. Contribute to MiCode/Xiaomi_Kernel_OpenSource development by creating an account on GitHub.
github.com
(android9)
GitHub - MiCode/Xiaomi_Kernel_OpenSource at lavender-q-oss
Xiaomi Mobile Phone Kernel OpenSource. Contribute to MiCode/Xiaomi_Kernel_OpenSource development by creating an account on GitHub.
github.com
(android10)

Related

Kernel Sourcecode for Advent Vega [new github link]

Hi!
Seems like paulobrien over at modaco's github is down.
And with that the original git source for the Advent Vega Kernel Source.
I've been looking around on github and it seems like the user martinbrook has mirrored it.
Here's the link for all those who need the source code:
https://github.com/martinbrook/android_kernel_advent_vega.git
git://github.com/martinbrook/android_kernel_advent_vega.git
I really hope this stuff will come in handy
All creds go to paulobrien @ modaco for making the source available
and martinbrook @ github for uploading it
And all the other guys who contributed to it
MrGuyFawkes said:
Hi!
Seems like paulobrien over at modaco's github is down.
And with that the original git source for the Advent Vega Kernel Source.
I've been looking around on github and it seems like the user martinbrook has mirrored it.
Here's the link for all those who need the source code:
https://github.com/martinbrook/android_kernel_advent_vega.git
git://github.com/martinbrook/android_kernel_advent_vega.git
I really hope this stuff will come in handy
All creds go to paulobrien @ modaco for making the source available
and martinbrook @ github for uploading it
And all the other guys who contributed to it
Click to expand...
Click to collapse
And if you are looking for the kernel sources of the kernel used in vegacream/vegabean (3.1.10) then look @ https://github.com/scanno/rel-15r7
Moving to General.

[Q] Kernel Panic s3cfb on SMDK4412

I am porting OmniROM to UrBetter s702 devices (Hyundai T7s/T7) using the Mixtile Garage board (mixtile.com) as a reference design. The CPU is Exynos4412.
The Mixtile Garage board comes with Linux kernel 3.0.15 and I am trying to update to 3.0.64 using the smdk4412 kernel source tree from Omni.
After creating the necessary mach-mixtile4x12.c file on arch/arm/mach-exynos (using mach-smdk4x12.c as a reference and adapting it, it compiles but on boot is panicking on s3cfb_clk_on: http://paste.omnirom.org/view/0d0fd2ec
The modified kernel tree is here: https://github.com/Frontier314/kernel_smdk4x12
The kernel source is compiled with GCC arm-eabi-4.7; gcc-arm-eabi-4.4.3 has the same problem so it should be something in the source tree.
Any ideas on how to fix this?
Many thanks in advance.

Building LineageOs Sources etc.

Hi I'm just forwarding it from zukfans.eu
Trying to find interested people who want to participate in the project
Device
https://emmaus.pro:3000/emmaus/android_device_zuk_z2pro
Kernel
https://emmaus.pro:3000/emmaus/android_kernel_zuk_msm8996
Vendor
https://emmaus.pro:3000/emmaus/android_vendor_zuk_z2pro
Use cm-14.1 branch to build.
These sources don't work. The cm14.1 branch is exactly the same as cm13.0. I've already tried telling Emmaus about the issue
Edit: sources are fixed now
Hello.
I'd like to help out but I'm new to ROM building. I have a Zuk Z2 (not pro, but afaik they're pretty much the same).
I'm an experienced web developer and a novice Android app developer.
Currently trying my first "repo sync" (using the cm-14.1 branch: repo init -u https://github.com/LineageOS/android.git -b cm-14.1).
I'll then try to set up the manifest that user harsha.pic (on zukfans) gave me today and use that one.
Any advice would be helpful.
MacLaughlin said:
Hi I'm just forwarding it from zukfans.eu
Trying to find interested people who want to participate in the project
Device
https://emmaus.pro:3000/emmaus/android_device_zuk_z2pro
Kernel
https://emmaus.pro:3000/emmaus/android_kernel_zuk_msm8996
Vendor
https://emmaus.pro:3000/emmaus/android_vendor_zuk_z2pro
Use cm-14.1 branch to build.
Click to expand...
Click to collapse
If you are intrested in it you can find something here! We're already working on it but it has a lot of bugs.
https://forum.xda-developers.com/zuk-z2-pro/development/lineageos-unofficial-emmaus-t3534678

Kernel Source available (1.62.401.1)

Any Kernel Dev here? The Source is finally available.
https://www.htcdev.com/devcenter/downloads/P15

[Solved][help] from custom kernel developers

Regarding this thread https://forum.xda-developers.com/moto-g4-plus/development/kalilinux-nethunter-t3639411
The OP tywinlannister did not patch the kernel source code with Android USB HID PATCH To use the Android device as keyboard or mouse..This should be applied for nethunter ROM, But he didn't..
And I asked resurrection remix ROM maintainer Jleeblanch for Athene to look at this issue he did it , after applying the patch it didn't successfully compile ,there were errors..By seeing the error he said that the official kernel is partially patched already,so it is causing those errors..
If anybody looks into the problem it would be appreciated just in your free time only ...
The link to kernel source of Jleeblanch is the "Kali branch" https://github.com/Jleeblanch/android_kernel_motorola_msm8952
Any problem or suggestions regarding to this can be discussed here itself , that others can address the issue..
I too have been waiting for a working kernel so I am going to attempt to compile a working kernel with hid with my limited kernel development knowledge. I think it probably won't work as two far better devs than me have yet been unable however I will try anyway
Any help from fellow devs would be greatly appreciated
Dougleplex said:
I too have been waiting for a working kernel so I am going to attempt to compile a working kernel with hid with my limited kernel development knowledge. I think it probably won't work as two far better devs than me have yet been unable however I will try anyway
Any help from fellow devs would be greatly appreciated
Click to expand...
Click to collapse
I am also a newbie to kernel development but I manually patched the hid sources to kernel source..
But when we complied it all those errors.
First I think we should delete all those hid patches all applied to the stock kernel source. Then compile it and then apply the patch by pelya...
My ROM s kernel developer say MM kernel will be easy but it is also partially patch
You may give it a try
Dhanush-raj said:
I am also a newbie to kernel development but I manually patched the hid sources to kernel source..
But when we complied it all those errors.
First I think we should delete all those hid patches all applied to the stock kernel source. Then compile it and then apply the patch by pelya...
Click to expand...
Click to collapse
I'm going to attempt to patch jleeblanch's rr kernel and then work backwards depending on the errors as last time I did something like this (s7 edge nethunter kernel) the error was a corrupted source and could easily have been fixed by finding a different repository rather than starting from scratch (what we did). I'm unsure as to what will happen after that however your idea is just as valid and I will try straight after (if you haven't already)
Test this kernel
Note that this is the Invicta kernel. You need a revert before the actual patch. Both commits are available on my gitlab.
Merged both into a single commit. Note that Invicta kernel is still 3.10.84. Upstream kernels may need additional changes. Test and let me know.
If you want to apply the patch to your kernel, you can use the attached patch file or use the commands below. ( using lineage kernel as example )
Code:
git clone https://github.com/LineageOS/android_kernel_motorola_msm8952.git
cd android_kernel_motorola_msm8952
git checkout cm-14.1
git remote add invicta https://gitlab.com/sileshn/android_kernel_motorola_athene.git
git fetch invicta
git cherry-pick 04aa0b10521b76e57226b2d1633e2b91cfa40263
If you don't get errors, you are good to go. If it errors, it needs more changes.
Silesh.Nair said:
Note that this is the Invicta kernel. You need a revert before the actual patch. Both commits are available on my gitlab.
Merged both into a single commit. Note that Invicta kernel is still 3.10.84. Upstream kernels may need additional changes. Test and let me know.
If you want to apply the patch to your kernel, you can use the attached patch file or use the commands below. ( using lineage kernel as example )
Code:
git clone https://github.com/LineageOS/android_kernel_motorola_msm8952.git
cd android_kernel_motorola_msm8952
git checkout cm-14.1
git remote add invicta https://gitlab.com/sileshn/android_kernel_motorola_athene.git
git fetch invicta
git cherry-pick 04aa0b10521b76e57226b2d1633e2b91cfa40263
If you don't get errors, you are good to go. If it errors, it needs more changes.
Click to expand...
Click to collapse
Kernel version 3.10.105 was initially the kernel I tried patching. I was easily able to merge the patch, but compiling it was a different story. According the errors I got, a lot of thing we're duplicated. I told the guy above that the MM based kernel (3.10.84 - which is the same version for MM thru Nougat on stock) would probably be the best bet. Looks like you had little trouble at all with merging into your Invicta Kernel (which is also kernel version 3.10.84).
Good job and thank you [emoji41]
Silesh.Nair said:
Note that this is the Invicta kernel. You need a revert before the actual patch. Both commits are available on my gitlab.
Merged both into a single commit. Note that Invicta kernel is still 3.10.84. Upstream kernels may need additional changes. Test and let me know.
If you want to apply the patch to your kernel, you can use the attached patch file or use the commands below. ( using lineage kernel as example )
If you don't get errors, you are good to go. If it errors, it needs more changes.
Click to expand...
Click to collapse
Thanks @Silesh.Nair I have been waiting long time for this patch. Once again thank you sir...
The patch is working perfectly in 3.10.105 i.e jleeblanch kernel source..
Linux version 3.10.107-lineageOS ([email protected]) (gcc version 6.3.1 20170404 (Linaro GCC 6.3-2017.05) ) #1 SMP PREEMPT Sat Aug 5 04:20:04 PDT 2017
And thank you @Jleeblanch Also
boot tool
Silesh.Nair said:
Note that this is the Invicta kernel. You need a revert before the actual patch. Both commits are available on my gitlab.
Merged both into a single commit. Note that Invicta kernel is still 3.10.84. Upstream kernels may need additional changes. Test and let me know.
If you want to apply the patch to your kernel, you can use the attached patch file or use the commands below. ( using lineage kernel as example )
Code:
git clone https://github.com/LineageOS/android_kernel_motorola_msm8952.git
cd android_kernel_motorola_msm8952
git checkout cm-14.1
git remote add invicta https://gitlab.com/sileshn/android_kernel_motorola_athene.git
git fetch invicta
git cherry-pick 04aa0b10521b76e57226b2d1633e2b91cfa40263
If you don't get errors, you are good to go. If it errors, it needs more changes.
Click to expand...
Click to collapse
Hey which tool did you used to make boot.img.
Marella ram_youtubr said:
Note that this is the Invicta kernel. You need a revert before the actual patch. Both commits are available on my gitlab.
Merged both into a single commit. Note that Invicta kernel is still 3.10.84. Upstream kernels may need additional changes. Test and let me know.
If you want to apply the patch to your kernel, you can use the attached patch file or use the commands below. ( using lineage kernel as example )
Hey which tool did you used to make boot.img.
Click to expand...
Click to collapse
I am using lazyflasher
https://github.com/jcadduono/lazyflasher
Just clone this repo and place the zimage in there and type make, you will get a zip file. Just flash it through twrp recovery. Because only the kernel is changed , so i am just replacing the zimage. No need of unpacking and repacking of boot image.:good:
i have compiled a zimage from kali_defconfig from above source.but when i flased it to phone the phone is not booting.
I NEED A FIX FOR THIS
Marella ram_youtubr said:
i have compiled a zimage from kali_defconfig from above source.but when i flased it to phone the phone is not booting.
I NEED A FIX FOR THIS
Click to expand...
Click to collapse
Which toolchian did you use, and what kernel source and rom you are using .
Give me as detailed information as possible!
Dhanush-raj said:
Which toolchian did you use, and what kernel source and rom you are using .
Give me as detailed information as possible!
Click to expand...
Click to collapse
Kernel Source:-https://github.com/Jleeblanch/android_kernel_motorola_msm8952/tree/kali-nougat
toolchain:- https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/arm/arm-eabi-4.8 nougat-release
rom:- lineage 14.1 official
Marella ram_youtubr said:
Kernel Source:-https://github.com/Jleeblanch/android_kernel_motorola_msm8952/tree/kali-nougat
toolchain:- https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/arm/arm-eabi-4.8 nougat-release
rom:- lineage 14.1 official
Click to expand...
Click to collapse
Don't use that source it isn't patched correctly, although i said mr. Jleeblanch to try , so he created it. The hid patch is merged into his resurrected kernel, but for mac injection i dont remember. So you better start from the first.
Use lineage kernel source and apply the patch from this thread #6th post, and see what toolchain is used to build lineage 14 kernel and use it. And additionally you have to make some changes in the defconfig, which is explained in the kali-nethunter github page.
Dhanush-raj said:
Don't use that source it isn't patched correctly, although i said mr. Jleeblanch to try , so he created it. The hid patch is merged into his resurrected kernel, but for mac injection i dont remember. So you better start from the first.
Use lineage kernel source and apply the patch from this thread #6th post, and see what toolchain is used to build lineage 14 kernel and use it. And additionally you have to make some changes in the defconfig, which is explained in the kali-nethunter github page.
Click to expand...
Click to collapse
thanks buddy
Dhanush-raj said:
Don't use that source it isn't patched correctly, although i said mr. Jleeblanch to try , so he created it. The hid patch is merged into his resurrected kernel, but for mac injection i dont remember. So you better start from the first.
Use lineage kernel source and apply the patch from this thread #6th post, and see what toolchain is used to build lineage 14 kernel and use it. And additionally you have to make some changes in the defconfig, which is explained in the kali-nethunter github page.
Click to expand...
Click to collapse
sileshn has removed his source
Marella ram_youtubr said:
sileshn has removed his source
Click to expand...
Click to collapse
https://forum.xda-developers.com/mo...ustom-kernel-developers-t3641363/post73257121
Dhanush-raj said:
https://forum.xda-developers.com/mo...ustom-kernel-developers-t3641363/post73257121
Click to expand...
Click to collapse
He had deleted his repo from gitlab
Marella ram_youtubr said:
He had deleted his repo from gitlab
Click to expand...
Click to collapse
use this bro...
Dhanush-raj said:
use this bro...
Click to expand...
Click to collapse
Actually my orginal phone is honor 6x.I love portable hacking.Like with nethunter.I tried to build nethunter kernel for honor 6x.But i failed at HID.So i took by brothers old phone That is moto g4 plus.later i found that moto g4 plus at android 7 is 32 bit.As there is no nethunter for 32 bit i have decided that atleast i should use linux deploy.But later i suck at wifi drivers.When i enable wifi drivers in kernel then phone doenst boot.
The final thing is can anyone help me in fixing this so that i can build a complete usable kernel with Net Hunter support

Categories

Resources