[PATCH] Kexec-hardboot patch - G2 Original Android Development

In this post, I would like to explain what kexec-hardboot patch is.
@kernel developers: I would like to ask you to merge this patch to your kernels, because it is essential part of MultiROM - it allows to boot any kernel without changing the boot partition. I realize that it is no small request, but the patch is not big, touches relatively stable parts of kernel and should not cause any problems. Thank you.
What is kexec?
It is syscall of Linux kernel, which allows you to boot another Linux kernel without restarting the device - "Linux boots itself". The functionality is equivalent to fastboot -c *cmdline* boot zImage initrd.img, but without PC and fastboot. It is fairly known thing, so more info at wikipedia and man kexec.
What is the difference between normal and hardboot exec?
Kexec-hardboot patch adds a real device restart to that process, so that all the drivers can be properly reinitialized. It stores new kernel to RAM, reboots the device as usual, and kernel from boot partition immediately jumps to the one which was stored to RAM before reboot.
Unlike grouper's kexec-hardboot patch, this one only requires the host kernel to be patched. This is one of the improvements Tasssadar made, and I think it is pretty significant.
To sumarize the process:
kexec --load-hardboot.... is called and kernel it loaded into RAM.
kexec -e is called. Special info is written to memory (to area which is not overwritten on reboot) and the device is rebooted.
After reboot, very early in the boot process, kernel checks if that special info is present in RAM and if so, it loads new kernel from RAM and jumps to it.
Kexecd' kernel starts and boots.
For more info, read the original thread.
Patches:
Kernel patch: https://gist.github.com/PatrikKT/50faf32e8931d51c0c9a,
This is the kernel patch. Only the host kernel needs to be patched.
Related CONFIG options:
CONFIG_KEXEC=y
CONFIG_KEXEC_HARDBOOT=y
CONFIG_PROC_DEVICETREE=y
CONFIG_ATAGS_PROC=n # This one is turned on automatically, but it is not needed, so you can disable it.
All these options must be enabled.​
Userspace kexec binary: https://github.com/Tasssadar/kexec-tools
I had to change some things in kexec userspace binary because of some kernel bugs, complete description is in that repository. You can get statically built binary at https://github.com/Tasssadar/multirom/blob/master/install_zip/prebuilt-installer/multirom/kexec​
Usage:
Once you have the kernel patches and kexec userspace binary in place, just run following command to boot into new kernel:
Code:
kexec --load-hardboot zImage --initrd=initrd.img --mem-min=0x20000000 --command-line="$(cat /proc/cmdline)" --dtb
kexec -e
Note the command line parameter - cmdline from bootloader is not added automatically, you have to put it there by yourself.
Authors:
This patch was made by Mike Kasick for Samsung Epic 4G. Since that, it was ported to several devices, one of them is Asus Transformer TF201 - he used patch from TF201 and modified it a bit (basically just changed few SoC specific constants). People at #ubuntu-arm helped him out with that, thanks.
For hammerhead, he has improved the patch a bit - only the host needs to be patched now and he has added support for DTB.
This thread was used as a template Credits to @Tasssadar for his Nexus 5 patch

Awesome people helping with our G2's development. Thank YOU!

patrik.KT said:
I would like to ask you to merge this patch to your kernels, because it is essential part of MultiROM - it allows to boot any kernel without changing the boot partition.
Click to expand...
Click to collapse
What benefit would there be to non-MultiROM users? (Just curious.)

blastagator said:
What benefit would there be to non-MultiROM users? (Just curious.)
Click to expand...
Click to collapse
Any. Just any.

Actually I can't think of anything. It's only to bring the device to a full reboot to load a new kernel.
Odoslané z môjho HTC Desire 601

blastagator said:
What benefit would there be to non-MultiROM users? (Just curious.)
Click to expand...
Click to collapse
Not for common user, in epic4g kexec used by kernel devs to test a new kernel build without replace the existing kernel.
They just load a temporary kernel to test. Then that kernel will gone after a reboot.

Hope to see new kernels that support MultiRom! Great work man!

Would this allow a multiboot with AOSP and Stock roms?

AbdulrahmanAmir said:
it doesnt work while i have stock and the secondary is aosp (dU-dirty.unicorn) when i boot the secondary it works sound only but no display just black screen plzz help
Click to expand...
Click to collapse
The patch is not necessary at the moment, because of the locked bootloader. It's just for devs to be prepared with their kernel when we can unlock the bootloader, so that multirom will work as it should.
Odoslané z môjho HTC Desire 601

Thanks for your great thread. But there is no instruction about how we can add that patch to kernel source. Could you write more details about implanting this patch?

No response??

mohamaadhosein said:
No response??
Click to expand...
Click to collapse
Download the patch file from first post and place it in the kernel root directory. Then you should use this command to check if there are any conflicts: git apply --check <path_to>.patch
If there are no errors, use this to apply: git apply <path_to>.patch
Sorry for the late response but I checked xda when I wasn't home and I forgot to reply when I got home
Odoslané z môjho HTC Desire 601

Hey, some changes need to be made to the patch.
On line 353, change the number from 22 to 21. Also, it has some errors when modifying head.S, which I had to fix manually..
But guys, my kernel is building with the latest multirom. This **** is going to maybe work soon!
I'll keep you all posted.

Thank you man

Guys, I think I've done it. Kexec hardboot patched kernel for 5.1.1 and thus multirom compliant, which I am preparing to build with twrp. this is very exciting.

When will it be ready?

Are you kidding me? No ETAs. I literally haven't even announce it yet and somebody asks for an ETA.... It will be ready once I test everything to boot well on my device.

patrik.KT said:
Download the patch file from first post and place it in the kernel root directory. Then you should use this command to check if there are any conflicts: git apply --check <path_to>.patch
If there are no errors, use this to apply: git apply <path_to>.patch
Sorry for the late response but I checked xda when I wasn't home and I forgot to reply when I got home
Odoslané z môjho HTC Desire 601
Click to expand...
Click to collapse
It says the patch is corrupted on the line 375

Related

[Patch] Incremental patch for updating from 2.6.35.7 to .14

As the title says this patch is for updating the Samsung sources from version 2.6.35.7 to 2.6.35.14. Might be useful for some kernel developers. I was stuck at bootloop after updating the initramfs.cpio with the updated modules, but this has nothing to do with the patch itself. If wanted I can also upload the original incremental patches.
I hope this gets integrated in some kernels soon (I heard others expermented with this as well), as it will fix the Android OS bug.
Regards,
Diewi
Diewi said:
As the title says this patch is for updating the Samsung sources from version 2.6.35.7 to 2.6.35.14. Might be useful for some kernel developers. I was stuck at bootloop after updating the initramfs.cpio with the updated modules, but this has nothing to do with the patch itself. If wanted I can also upload the original incremental patches.
I hope this gets integrated in some kernels soon (I heard others expermented with this as well), as it will fix the Android OS bug.
Regards,
Diewi
Click to expand...
Click to collapse
Hey man,
Thanks, I need this
You can teach me howto make patches for kernels?
How to patch up the kernel for example? You are just legend
Netchip
Hey netchip,
of course I can
First you need to run this command for every incremental patch:
BZIP compressed:
Code:
bzip2 -dc patch-2.6.35.X-Y.bz2 | patch -p1
uncompressed:
Code:
patch -p1 < patch-2.6.35.X-Y.patch
The X stands for the minor version you already have, Y for the one you want to patch to - usually Y = X + 1 for "official" patches.
After every application of a incremental patch you need to check weather a "hunk" failed. Normally, this happens if you get a warning about parts of the patch already being applied. You will recognize the failed parts by their ending: .rej. You'll need to check those files against the to-be-patched source file and maybe do some changes to it.
After you gone through all patches, unpack the unmodified kernel again and compare both directories with the following command:
Code:
diff -uNrB GT-N7000_Kernel_orig GT-N7000_Kernel > SGN_2.6.35.X-Z.patch
Then you'll get a patch that includes all the single ones.
BTW, I'm assuming you're in a UNIX environment.
(@all)
In order to apply the patch you can simply take the commands listed in the beginning of the post. The patch uploaded in the OP (.7-.14) is uncompressed.
I'll just attach the incremental patchset for completeness (bzip compressed patches)
Diewi said:
Hey netchip,
of course I can
First you need to run this command for every incremental patch:
BZIP compressed:
Code:
bzip2 -dc patch-2.6.35.X-Y.bz2 | patch -p1
uncompressed:
Code:
patch -p1 < patch-2.6.35.X-Y.patch
The X stands for the minor version you already have, Y for the one you want to patch to - usually Y = X + 1 for "official" patches.
After every application of a incremental patch you need to check weather a "hunk" failed. Normally, this happens if you get a warning about parts of the patch already being applied. You will recognize the failed parts by their ending: .rej. You'll need to check those files against the to-be-patched source file and maybe do some changes to it.
After you gone through all patches, unpack the unmodified kernel again and compare both directories with the following command:
Code:
diff -uNrB GT-N7000_Kernel_orig GT-N7000_Kernel > SGN_2.6.35.X-Z.patch
Then you'll get a patch that includes all the single ones.
BTW, I'm assuming you're in a UNIX environment.
(@all)
In order to apply the patch you can simply take the commands listed in the beginning of the post. The patch uploaded in the OP (.7-.14) in uncompressed.
I'll just attach the incremental patchset for completeness (bzip compressed patches)
Click to expand...
Click to collapse
Thanks for your answer
Where can I get normally the incremental patches?
Kernel.org?
Also, if you are interested in building a kernel with me, send me a PM, and I will answer
Sent from my GT-I9100
Yes, usually at kernel.org. But lately they are only hosting the latest incremental patch for the longterm support kernels (2.6.32 and 2.6.33). Also the latest incremental patches (up to 4 minor versions in the past) for the latest kernel.
These particular patches I found using google that directed to some outdated mirrors. I just needed to adapt the version numbers of the patch and search for this string.
While waiting for my Note, I just have downloaded kernel sources and my linux box is cross compiling the sources with the recommended toolchain (4.4.0) as I write this post
I just noticed that the process reports quite a few warnings...
When I have my Note, I will try a few things like undervolt (already located the bit of relevant code for this) and will add "interactive" CPU governor which is far better than the default "on demand" for interactivity.
If everything goes well, I will add this upgrade too
Edit:
right. Done. Waiting for the phone to test this first almost stock kernel
Code:
LD arch/arm/boot/compressed/vmlinux
OBJCOPY arch/arm/boot/zImage
Kernel: arch/arm/boot/zImage is ready
Diewi said:
As the title says this patch is for updating the Samsung sources from version 2.6.35.7 to 2.6.35.14.
Click to expand...
Click to collapse
Have you tested the Patch? Which toolchain did you use for compiling the Note Kernel?
I have tried it the other way around: Take vanilla 2.6.35.14 sources and include the Samsung patches from 2.6.35.7. I found out, that Samsung uses a lot of Backports in his code. Also I had some problems with wrong applied fuzzy patches.
Meanwhile it works. Android OS is much lower with a 2.6.35.14 Kernel. But the battery lifetime is not much longer than before.
I had also some problems with the Runtime Powermanagement of USB Devices. I'm note sure if it was a problem of the patches or my compiler options. I have to test a little bit in the next days.
RiverSource said:
Have you tested the Patch? Which toolchain did you use for compiling the Note Kernel?
I have tried it the other way around: Take vanilla 2.6.35.14 sources and include the Samsung patches from 2.6.35.7. I found out, that Samsung uses a lot of Backports in his code. Also I had some problems with wrong applied fuzzy patches.
Meanwhile it works. Android OS is much lower with a 2.6.35.14 Kernel. But the battery lifetime is not much longer than before.
I had also some problems with the Runtime Powermanagement of USB Devices. I'm note sure if it was a problem of the patches or my compiler options. I have to test a little bit in the next days.
Click to expand...
Click to collapse
Dunno if it's making a huge difference, but your GCC is 4.5.4 whereas the recommended is 4.4.0
Code:
> cat Readme_Kernel.txt
################################################################################
1. How to Build
- get Toolchain
From android git server , codesourcery and etc ..
- arm-eabi-4.4.0
No, the Toolchain makes no big difference. I hoped the newer Linaro one optimzes better, but at least with CF Bench there was no big difference between 4.4.0, 4.4.3 or 4.5.4 (the results where slightly better than with stock kernel, 13300 points in stead of 13000 with stock).
RiverSource said:
Have you tested the Patch? Which toolchain did you use for compiling the Note Kernel?
I have tried it the other way around: Take vanilla 2.6.35.14 sources and include the Samsung patches from 2.6.35.7. I found out, that Samsung uses a lot of Backports in his code. Also I had some problems with wrong applied fuzzy patches.
Meanwhile it works. Android OS is much lower with a 2.6.35.14 Kernel. But the battery lifetime is not much longer than before.
I had also some problems with the Runtime Powermanagement of USB Devices. I'm note sure if it was a problem of the patches or my compiler options. I have to test a little bit in the next days.
Click to expand...
Click to collapse
How did you have included samsung drivers in a vanilla kernel?
I know now how to patch up, but how works your way?
No, I didn't test the patch very well. I just compiled the kernel with the patches and added CF's initramfs.cpio (packed) to the zImage file. It did boot up, but wlan didn't work, as the modules in the initramfs were not compiled for this build. The "about" page showed the minor version ".14".
I used codesurgery version 2010.09.51 for this test.
@netchip:
I found a good guide how to extract the samsung specific patches in this thread (bottom of OP):
http://forum.xda-developers.com/showthread.php?t=784270
Maybe we see a 3.1 kernel soon
Diewi said:
No, I didn't test the patch very well. I just compiled the kernel with the patches and added CF's initramfs.cpio (packed) to the zImage file. It did boot up, but wlan didn't work, as the modules in the initramfs were not compiled for this build. The "about" page showed the minor version ".14".
I used codesurgery version 2010.09.51 for this test.
@netchip:
I found a good guide how to extract the samsung specific patches in this thread (bottom of OP):
http://forum.xda-developers.com/showthread.php?t=784270
Maybe we see a 3.1 kernel soon
Click to expand...
Click to collapse
You have a dump of vanilla 2.6.35.7?
Compare these, and you have the drivers, hmm I go try.
Or you could use the patched Samsung kernel (2.6.35.14) and compare this to the vanilla kernel. I'm absolutely not sure if this would bring any benefits, but I think that way the patches backported by Samsung would get filtered out.
Sent from my GT-N7000 using XDA App
Diewi said:
Or you could use the patched Samsung kernel (2.6.35.14) and compare this to the vanilla kernel. I'm absolutely not sure if this would bring any benefits, but I think that way the patches backported by Samsung would get filtered out.
Sent from my GT-N7000 using XDA App
Click to expand...
Click to collapse
That's also a good idea!
Thanks.
The patched vanilla kernel (.14) can be found here:
http://ftp.ua.postgresql.org/pub/linux/kernel/v2.6/longterm/v2.6.35/
The 2.6.35.7 vanilla kernel can be found directly on the ftp server of kernel.org
Diewi said:
Hey netchip,
of course I can
First you need to run this command for every incremental patch:
BZIP compressed:
Code:
bzip2 -dc patch-2.6.35.X-Y.bz2 | patch -p1
uncompressed:
Code:
patch -p1 < patch-2.6.35.X-Y.patch
The X stands for the minor version you already have, Y for the one you want to patch to - usually Y = X + 1 for "official" patches.
After every application of a incremental patch you need to check weather a "hunk" failed. Normally, this happens if you get a warning about parts of the patch already being applied. You will recognize the failed parts by their ending: .rej. You'll need to check those files against the to-be-patched source file and maybe do some changes to it.
After you gone through all patches, unpack the unmodified kernel again and compare both directories with the following command:
Code:
diff -uNrB GT-N7000_Kernel_orig GT-N7000_Kernel > SGN_2.6.35.X-Z.patch
Then you'll get a patch that includes all the single ones.
BTW, I'm assuming you're in a UNIX environment.
(@all)
In order to apply the patch you can simply take the commands listed in the beginning of the post. The patch uploaded in the OP (.7-.14) is uncompressed.
I'll just attach the incremental patchset for completeness (bzip compressed patches)
Click to expand...
Click to collapse
thanks!!
i'm build galaxy s2 kernel
i hope patch 2.6.35.7 to 2.6.35.14
no problem at use Incr_PatchSet_2.6.35.7-14.zip file?
and SGN_2.6.35.7-14.patch.zip better than Incr_PatchSet_2.6.35.7-14.zip?
(sorry my bad english)
As you are trying to apply the patch to a s2-kernel, I would advise you to use the original incremental patchset. You only need to go through the *.rej files and check weather the source needs a modification (see http://linuxhaven.de/dlhp/HOWTO/DE-Kernel-HOWTO-5.html). The all-in-one patch is made by a diff of the original and the patched Galaxy Note kernel, so you might miss something.
Diewi said:
As you are trying to apply the patch to a s2-kernel, I would advise you to use the original incremental patchset. You only need to go through the *.rej files and check weather the source needs a modification (see http://linuxhaven.de/dlhp/HOWTO/DE-Kernel-HOWTO-5.html). The all-in-one patch is made by a diff of the original and the patched Galaxy Note kernel, so you might miss something.
Click to expand...
Click to collapse
successful upgrade to 2.6.35.14
thanks
Dude... Will this work on Galaxy y ?? or this is device specific ????
Nachiket.Namjoshi said:
Dude... Will this work on Galaxy y ?? or this is device specific ????
Click to expand...
Click to collapse
No.
Sent from my GT-N7000 using Tapatalk 2

[KERNEL] [KEXEC] Kernel EXECution for locked devices [N900V] [WIP]

THIS THREAD IS WIP & FOR DEVELOPERS ONLY !
Technical information with sources & binaries is in post #2. It includes kernel building, kexec-module, kexec-tools, hijack script, required patches & current problems with logs.
Click to expand...
Click to collapse
What is kexec?​--------------------------------------------------------------------------------------------------------​
kexec or kernel execution is a module/mechanism of the kernel that allows live/hot booting of a new/custom kernel "over" the currently running kernel. For more info, read the useful threads/links bellow.
kexec could be used to load a custom kernel into memory & yes, we'll then be able to install AOSP ROMs or in general run a custom kernel compatible with our device.
Click to expand...
Click to collapse
Click to expand...
Click to collapse
Updates:​--------------------------------------------------------------------------------------------------------​
[09/01/2014]:​
kexec module has been successfully patched & loaded/inserted into both NC2 & NC4 stock kernels. Now, I'm working on compiling/loading a guest kernel & fixing possible problems/bugs.
Click to expand...
Click to collapse
[08/31/2014]:​
Two versions of HLTEVZW KK kernel have been compiled from source: one uses the default configurations & the 2nd adds custom capabilities & kexec boot options. Moreover, kexec-tools & module have been cross-compiled. Now, I'm working on patches for kexec module & guest kernel (the hardest part).
Click to expand...
Click to collapse
[08/01/2014]:​
I've successfully flashed a custom kernel on my device. This trips knox flag & isn't 100% related to kexec, but it has the same objective (loading custom kernel on the locked-bootloader devices). However, the bootloader makes security check & blocks the installed kernel with the "unauthorized software by VZW" warning. Then, I tried to patch the bootloader to remove this security check, but my device was HARD BRICKED. Now, I've created a General thread for how to recover from a HARD BRICK. This is promising info for testing bootloader exploits.
Click to expand...
Click to collapse
Click to expand...
Click to collapse
​​
Status
--------------------------------------------------------------------------------------------------------​
Supported NC2 & NC4 kernels
Working kexec-tools
Loaded kexec module
WIP kexec/guest kernel​
Click to expand...
Click to collapse
Thanks to / Credits:
--------------------------------------------------------------------------------------------------------​
@sextape - for the leaked NC2 firmware
@Hashcode - for his great work on kernel/recovery
...
Please PM me if I forgot to add proper credits for your work!​
Click to expand...
Click to collapse
​
XDA:DevDB Information
KEXEC, Kernel for the Verizon Samsung Galaxy Note 3
Contributors
hsbadr, CalcProgrammer1, ryanbg
Kernel Special Features:
Version Information
Status: Testing
Created 2014-07-11
Last Updated 2015-02-15
Technical Information
This post is reserved for technical information with sources & binaries. This includes kernel building, kexec-module, kexec-tools, hijack script, required patches & current problems.
Kernel Building:
--------------------------------------------------------------------------------------------------------​
The first step for building working kexec-module & tools is to cross-compile the kernel from source with the correct configurations. I won't describe how to build a kernel from source, but you may find this thread very useful.
I've used two different sources for the NC4/NC2 HLTE_VZW KK kernels. The 1st one is a part of SM-N900V_NA_KK_Opensource.zip released by Samsung for N900V NC4 kernel while the 2nd is available on @Hashcode's Github profile with 3 branches: hltevzw-kk-nc2 branch is modified for N900V NC2 kernel + 15 commits for compiling kexec as a module & other kexec patches.
The instructions provided by Samsung to build the NC4 kernel are to update CROSS_COMPILE toolchain environment variable in the Makefile & build with the default configurations as follows:
Code:
export ARCH=arm
make VARIANT_DEFCONFIG=msm8974_sec_hlte_vzw_defconfig msm8974_sec_defconfig SELINUX_DEFCONFIG=selinux_defconfig
make
However, I've patched the sources & used menuconfig interface to customize kernel configurations as follows:
Code:
export ARCH=arm
make VARIANT_DEFCONFIG=msm8974_sec_hlte_vzw_defconfig msm8974_sec_defconfig SELINUX_DEFCONFIG=selinux_defconfig menuconfig
make
(menuconfig is added in the second line)
The default output is the kernel image (arch/arm/boot/zImage) & modules (drivers/*/*.ko). The kexec-module(s) will be built if you patched the sources & configured it as a module.
You may then use dtbTool to generate device tree dt.img & mkbootimg to pack the kernel in boot.img.
Click to expand...
Click to collapse
Click to expand...
Click to collapse
Kexec Module:
--------------------------------------------------------------------------------------------------------​
There're many different flavors of kexec-mod sources. @delewer in this thread uses a standalone kexec-mod source MOD'd for Sony Xperia Z1 to be cross-compiled against the precompiled kernel source while @Hashcode in his sources on Github patches the kernel source to cross-compile kexec-mod with the kernel. Some modules may or may not use/port the hardboot patches. The output for kexec module/drivers have different names (the standalone kexec-mod source generates kexec_load.ko & procfs_rw.ko while the kernel source patched by @Hashcode generates 3 modules: arm_kexec.ko, msm_kexec.ko & kexec.ko).
To test if the cross-compiled modules are loadable & have the correct kernel headers, use insmod in terminal emulator (or a safe point with terminal like Safestrap) to insert the module into the kernel (assuming you've kexec.ko in /system/lib/modules/):
Code:
insmod /system/lib/modules/kexec.ko
Then, use lsmod to list & show the status of loaded modules:
Code:
lsmod
Alternatively, you may check if system call of the kernel includes kexec functions using:
Code:
cat /proc/kallsyms | grep kexec
The kexec-modules I've compiled are loadable & have been successfully inserted into both NC4 & NC2 kernels.
I'm using my own sources for kexec-module based on others & I'll share the sources with binaries & modules after making some required tests.
Click to expand...
Click to collapse
Click to expand...
Click to collapse
Kexec Tools:
--------------------------------------------------------------------------------------------------------​
I'm using the latest version of kexec-tools from here (currently, kexec-tools-2.0.8.tar.gz) cross-compiled for arm with custom configurations. Three binaries are generated including kexec (directly boot into a new kernel) & kdump (display kernel trace data). For more info, check the manpage of each binary & kexec/kexec-tools manuals/guides.
To test your kexec-tools cross-compiled binaries for arm,
Code:
kexec --help
assuming that they're in your PATH (e.g., /system/xbin) with executable permissions (e.g., 755).
Click to expand...
Click to collapse
Click to expand...
Click to collapse
Hijack Script:
--------------------------------------------------------------------------------------------------------
will be updated soon...​
Click to expand...
Click to collapse
Required Patches:
--------------------------------------------------------------------------------------------------------
will be updated soon...​
Click to expand...
Click to collapse
Current Problems/Logs:
--------------------------------------------------------------------------------------------------------
will be updated soon...​
Click to expand...
Click to collapse
Sent from my SM-G900V using Tapatalk
jr_718 said:
Sent from my SM-G900V using Tapatalk
Click to expand...
Click to collapse
My eyes about popped out the side of my head when I saw this! It says your in testing have you had any luck at all? Thank you thank you thank you BTW!
amebiasis said:
My eyes about popped out the side of my head when I saw this! It says your in testing have you had any luck at all? Thank you thank you thank you BTW!
Click to expand...
Click to collapse
I've tested several binaries for the same kernel version, but none works for now. I'll compile from source & see. However, please keep this this thread for devs discussions only until we release working kexec & guest kernel.
Trying to keep the n3 alive before the n4 arrives? Lol seriously though congrats and thank you. Hope you and the devs here the best of luck. We, the re owners, appreciate all you have done already for us.
bmwh0r3 said:
Trying to keep the n3 alive before the n4 arrives? Lol seriously though congrats and thank you. Hope you and the devs here the best of luck. We, the re owners, appreciate all you have done already for us.
Click to expand...
Click to collapse
Note 4 is useless until it gets root & custom ROMs. For me, it'll be better ONLY IF we can break its security & unlock bootloader!
What about surge & ryanbg and e.v.a. I been following them and they both have a good idea on how things work well I think they are good for the job
Just a thought I had when unlocking my spare RAZR hd, but the kernels on the Razr and my note 3 are 3.4.97 and 3.4.0. Is the exploit part of the kernel or is there a reason I'm a user and not a Dev? If it is, motopacalypse.apk is what unlocked my RAZR. I'm just trying to learn so please don't think I'm a moron. I just don't know the coding aspect of android at all.
Have you got an irc or hangout open for discussion?
Thanks for your efforts! !
tpike said:
Have you got an irc or hangout open for discussion?
Thanks for your efforts! !
Click to expand...
Click to collapse
There is #Galaxy-Note-3 on Freenode but it's really quiet in there most of the time.
Many forum lurkers like me have been anxiously waiting for this breakthrough! Don't give up! I also believe in donating to hardworking devs like you guys! Good luck...
I was an owner of a Motorola Defy and the day that it got KEXEC I was so exited.. so good luck for you guys! Nothing is impossible. :victory:
Feche said:
I was an owner of a Motorola Defy and the day that it got KEXEC I was so exited.. so good luck for you guys! Nothing is impossible. :victory:
Click to expand...
Click to collapse
Who was devs on kexec on defy?
ironfisted said:
Who was devs on kexec on defy?
Click to expand...
Click to collapse
Not sure
I've been working on kexec for a little while now with limited success. My biggest problem is the getting the 4 byte CRCs for the kernel symbols used by the kexec module. Same with a few other projects I'm working on. They compiled the NC2 kernel with MOD VERSION and CRC. I've compiled it from source, but there's so much work to be done my head is spinning.
ryanbg said:
I've been working on kexec for a little while now with limited success. My biggest problem is the getting the 4 byte CRCs for the kernel symbols used by the kexec module. Same with a few other projects I'm working on. They compiled the NC2 kernel with MOD VERSION and CRC. I've compiled it from source, but there's so much work to be done my head is spinning.
Click to expand...
Click to collapse
Good luck! Lots of us are waiting for this!
ryanbg said:
I've been working on kexec for a little while now with limited success. My biggest problem is the getting the 4 byte CRCs for the kernel symbols used by the kexec module. Same with a few other projects I'm working on. They compiled the NC2 kernel with MOD VERSION and CRC. I've compiled it from source, but there's so much work to be done my head is spinning.
Click to expand...
Click to collapse
Keep it up man, I understand the hard work involved in doing something like this, but it will definitely pay of in the end!!! Thank you for your hard work and dedication, you got a lot of people counting on you
Sent from my BajaRom "L" Themed Note 3
ryanbg said:
I've been working on kexec for a little while now with limited success. My biggest problem is the getting the 4 byte CRCs for the kernel symbols used by the kexec module. Same with a few other projects I'm working on. They compiled the NC2 kernel with MOD VERSION and CRC. I've compiled it from source, but there's so much work to be done my head is spinning.
Click to expand...
Click to collapse
I see. Let me know if you'd like to contribute to this thread. I'll update it soon with more details about the required patches & the preliminary results of my tests ––after releasing a new version of JasmineROM.
ryanbg said:
I've been working on kexec for a little while now with limited success. My biggest problem is the getting the 4 byte CRCs for the kernel symbols used by the kexec module. Same with a few other projects I'm working on. They compiled the NC2 kernel with MOD VERSION and CRC. I've compiled it from source, but there's so much work to be done my head is spinning.
Click to expand...
Click to collapse
I was told by a defy dev that we would have better luck contacting hp touch pad kernel devs. I guess their kernel is more like ours I guess. Idk. I never tried contacting dev from their yet

[DEVS ONLY][BCM21553] Samsung Galaxy Pocket GT-S5300 (Cori) Development Discussion

General informations:
This thread's aim is only to represent a central meeting and discussion point for BCM21553 developers and, in particular, for the open Kernel/ROM sources development for the Samsung Galaxy Pocket GT-S5300 (codenamed Cori).
Information for common users:
As already described in the previous section, if you are not a developer, please restrict your posts to the general discussion thread so that developers can maintain good communication. Every post that is not strictly respecting these rules will be reported to the forum moderators. Thanks for your understanding.
For any other BCM21553 device related question or information, please, use this thread as a reference point, instead:
[DEVS ONLY][BCM21553 series] CyanogenMod 11 for BCM21553 Development Discussion
As someone already might know, I'm streambinder, from MoltenMotherBoard team.
I have already followed some projects for the GT-S5300, but especially kept in contact
with some of the events related to the porting of ROM and Kernel sources for BCM21553 chipset based devices.
In this precise moment, the sources in my possession allow you to be able to compile
a bugfree CWM 5.0.2.8 (based on CyanogenMod 7 code) with a kernel based on the Samsung stock one.
The only - fundamental - problem was due to the fact that unless I hadn't used the prebuilt INIT binary
token in the Samsung stock firmware boot.img, the phone would not work - or, better, boot up.
This means that until the situation - regarding this issue - doesn't change, our access to the porting of custom ROM
would be barred.
Recently, I decided to give Cori another chance and rework my sources, looking at the wonderful work brought
by the BroadcomCM team on CyanogenMod 9 (in particular, thanks to @bieltv.3 and @Alberto96) and @psyke83 on CyanogenMod 11.
They've not only been able to run these two ROMs in a more or less crude way, but this developer has been able to write
the necessary strings to make the INIT binary of some of these BCM21553 devices opensource.
Strong of this informations, I readjusted some of the sources of BroadcomCM's CyangenMod 9, which includes
all the progress carried out by both the team and psyke83, in order to make them work even on Cori,
and am now next to the first test of the CWM 6.X.X.X, based on IceCreamSandwich code.
At the same time, @akhbh is working on the KitKat code based CWM.
I hope I can give more information about any progress as soon as possible.
The General Discussion thread for non-development issues is here:
*.[DISCUSSION] CyanogenMod 11 For Galaxy Pocket GT-S5300 Discussion Thread
Made a first test of CWM based on CyanogenMod 9 code.
It seems it cannot flash it as it weighs so much compared to its partition configuration value: in fact, the maximum boot partition size is set up to 5.0MB, but the compiled boot.img weighs 5.3MB.
Will have to resize its weight in order to make it fill into the partition.
@akhbh, have you had any complication in these terms, with CyanogenMod 11 sources?
@psyke83, what do you suggest to do? Do you think an increasement of boot partition would be a better idea?
streambinder said:
Made a first test of CWM based on CyanogenMod 9 code.
It seems it cannot flash it as it weighs so much compared to its partition configuration value: in fact, the maximum boot partition size is set up to 5.0MB, but the compiled boot.img weighs 5.3MB.
Will have to resize its weight in order to make it fill into the partition.
@akhbh, have you had any complication in these terms, with CyanogenMod 11 sources?
@psyke83, what do you suggest to do? Do you think an increasement of boot partition would be a better idea?
Click to expand...
Click to collapse
No, I didn't faced those complications. My boot.img weighted around 4.5 MB in lzma compression mode. In gzip, it increased to more than 5 mb.
akhbh said:
No, I didn't faced those complications. My boot.img weighted around 4.5 MB in lzma compression mode. In gzip, it increased to more than 5 mb.
Click to expand...
Click to collapse
Perfect.
Which kernel have you based your build on?
streambinder said:
Perfect.
Which kernel have you based your build on?
Click to expand...
Click to collapse
Well, I took the GeTux kernel for cori, had to change the board name though and then compile it. CWM was booting even before changing the board name but there was no reaction from the phone on trying to boot cm9/cm11
And after changing board name, a black screen on trying to boot
Another info: When tried to merge cori source into the bcm21553 common one, it did compile but gave bootloop of GT-S5300 logo on trying to boot as well as when trying to go in CWM.
Bieltv.3 recommended to use cori source instead of the bcm21553 common one so we used cori sources
akhbh said:
Well, I took the GeTux kernel for cori, had to change the board name though and then compile it. CWM was booting even before changing the board name but there was no reaction from the phone on trying to boot cm9/cm11
And after changing board name, a black screen on trying to boot
Another info: When tried to merge cori source into the bcm21553 common one, it did compile but gave bootloop of GT-S5300 logo on trying to boot as well as when trying to go in CWM.
Bieltv.3 recommended to use cori source instead of the bcm21553 common one so we used cori sources
Click to expand...
Click to collapse
I suggest to use our Kernel sources for now, too: it will automatically bypass few errors/issues/bootloops that we cannot now fight with.
The most important thing is to make INIT working from sources (hope it will be working
on my CM9 sources, too) and check that every our configuration is correctly working and
making Cori boot into recovery.
Once we'll make it perfectly working without any kind of issue, will be the right time to try
to make Cori supported with the BC21553-common kernel.
streambinder said:
I suggest to use our Kernel sources for now, too: it will automatically bypass few errors/issues/bootloops that we cannot now fight with.
The most important thing is to make INIT working from sources (hope it will be working
on my CM9 sources, too) and check that every our configuration is correctly working and
making Cori boot into recovery.
Once we'll make it perfectly working without any kind of issue, will be the right time to try
to make Cori supported with the BC21553-common kernel.
Click to expand...
Click to collapse
Okay, I will use your kernel sources and try if something is changed once I reach home. For now, I neither have this device nor a PC, as I'm in another city.
Will be keenly watching your work. Will start after reaching home around the end of September
akhbh said:
Okay, I will use your kernel sources and try if something is changed once I reach home. For now, I neither have this device nor a PC, as I'm in another city.
Will be keenly watching your work. Will start after reaching home around the end of September
Click to expand...
Click to collapse
No problem, mate.
Here you have every source in my possession:
platform_kernel_samsung_cori
platform_device_samsung_cori
Keep in contact with me, as I will need some informations by you.
Anyway I'm now making another build, keeping some not so much important binaries excluded, so that I can make the compiled boot.img fill into our little Cori's boot partition. I know it's a dirty workaround, but if it works, I'll use it untill @psyke83 will suggest me a better way to do.
streambinder said:
No problem, mate.
Here you have every source in my possession:
platform_kernel_samsung_cori | github.com
platform_device_samsung_cori
Keep in contact with me, as I will need some informations by you.
Anyway I'm now making another build, keeping some not so much important binaries excluded, so that I can make the compiled boot.img fill into our little Cori's boot partition. I know it's a dirty workaround, but if it works, I'll use it untill @psyke83 will suggest me a better way to do.
Click to expand...
Click to collapse
have u tried to build cwm v6 from cm9 source ??
cleverior.ipul said:
have u tried to build cwm v6 from cm9 source ??
Click to expand...
Click to collapse
Of course, mate. I'm working on it, right now.
It doesn't seem to boot, strange if the same INIT binary sources are working for @akhbh.
#UPDATE
In order to troubleshoot, I'll give you some info.
For his build I used these sources:
platform_kernel_samsung_cori
platform_device_samsung_cori
android_device_samsung_bcm21553-common
Applied some lines on our bcm21553-bootimg.mk, too, in order to exclude parted and mke2fs and make the compiled boot.img weigh less.
@cleverior.ipul, can you link me your kernel sources, as akhbh said he used your ones for CM11.
@akhbh, which modifies have you applied in order to compile CWM based on CM11 code? Which device tree?
#UPDATE 2
Attached my compiled boot.img.
If anyone of you would extract it (you can easily use this tool: bootimgtools - read how to use it in the README) and make a diff with the CM11 one (just extract the ramdisk of both boot.imgs and - in the terminal - use this command: diff -urN /path/to/cm9/ramdisk /path/to/cm11/ramdisk > diff.patch), would make to me a huge favour.
Let me know.
streambinder said:
Of course, mate. I'm working on it, right now.
It doesn't seem to boot, strange if the same INIT binary sources are working for @akhbh.
#UPDATE
In order to troubleshoot, I'll give you some info.
For his build I used these sources:
platform_kernel_samsung_cori
platform_device_samsung_cori
android_device_samsung_bcm21553-common
Applied some lines on our bcm21553-bootimg.mk, too, in order to exclude parted and mke2fs and make the compiled boot.img weigh less.
@cleverior.ipul, can you link me your kernel sources, as akhbh said he used your ones for CM11.
@akhbh, which modifies have you applied in order to compile CWM based on CM11 code? Which device tree?
#UPDATE 2
Attached my compiled boot.img.
If anyone of you would extract it (you can easily use this tool: bootimgtools - read how to use it in the README) and make a diff with the CM11 one (just extract the ramdisk of both boot.imgs and - in the terminal - use this command: diff -urN /path/to/cm9/ramdisk /path/to/cm11/ramdisk > diff.patch), would make to me a huge favour.
Let me know.
Click to expand...
Click to collapse
I think we didn't had significant changes. Perhaps the same as totoro. But, that resulted in the internal_sd not mounting error in cwm.
Sadly, as said before, I am away from my home city and can't provide the files to you and can't do the boot.img diffs as well
Try to ask psyke83, he might have a solution for that
akhbh said:
I think we didn't had significant changes. Perhaps the same as totoro. But, that resulted in the internal_sd not mounting error in cwm.
Sadly, as said before, I am away from my home city and can't provide the files to you and can't do the boot.img diffs as well
Try to ask psyke83, he might have a solution for that
Click to expand...
Click to collapse
Then, if you didn't make any massive change upon the sources, then I'll only try using your kernel.
Can you give me your kernel sources, mate, please?
streambinder said:
Then, if you didn't make any massive change upon the sources, then I'll only try using your kernel.
Can you give me your kernel sources, mate, please?
Click to expand...
Click to collapse
Currently, I can provide you the boot.img only. For the sources, @cleverior.ipul can provide the kernel sources coz as said earlier, his kernel is used. Well, we were working together to bring cm11 but weren't successful
akhbh said:
Currently, I can provide you the boot.img only. For the sources, @cleverior.ipul can provide the kernel sources.
Click to expand...
Click to collapse
Ok, please send it to me, will compare it with my package.
streambinder said:
Ok, please send it to me, will compare it with my package.
Click to expand...
Click to collapse
Here it is:
http://www.4shared.com/zip/1nKFbOJ2ba/ccccGetux_CM11.html
streambinder said:
Of course, mate. I'm working on it, right now.
It doesn't seem to boot, strange if the same INIT binary sources are working for @akhbh.
#UPDATE
In order to troubleshoot, I'll give you some info.
For his build I used these sources:
platform_kernel_samsung_cori
platform_device_samsung_cori
android_device_samsung_bcm21553-common
Applied some lines on our bcm21553-bootimg.mk, too, in order to exclude parted and mke2fs and make the compiled boot.img weigh less.
@cleverior.ipul, can you link me your kernel sources, as akhbh said he used your ones for CM11.
@akhbh, which modifies have you applied in order to compile CWM based on CM11 code? Which device tree?
#UPDATE 2
Attached my compiled boot.img.
If anyone of you would extract it (you can easily use this tool: bootimgtools - read how to use it in the README) and make a diff with the CM11 one (just extract the ramdisk of both boot.imgs and - in the terminal - use this command: diff -urN /path/to/cm9/ramdisk /path/to/cm11/ramdisk > diff.patch), would make to me a huge favour.
Let me know.
Click to expand...
Click to collapse
here the link source https://github.com/cleverior/android_kernel_samsung_cori
i've changed the board name. If your device can not boot after using the zImage from this source, then rename init.bcm21553.rc to init.gt-s5300.rc.
@streambinder, what is grom? As bieltv.3 said that init built grom for cori is required to fix adb over cwm recovery. If adb gets working, then possibly the black screen while booting cm11 might get fixed
akhbh said:
@streambinder, what is grom? As bieltv.3 said that init built grom for cori is required to fix adb over cwm recovery. If adb gets working, then possibly the black screen while booting cm11 might get fixed
Click to expand...
Click to collapse
Sincerely don't what are you talking about.
Anyway, have to try to understand where's the problem with the not-booting CWM.
Will try with your sources and let you know.

[ALL][Kernel][8.1][AOSP] Pantheon Kernel [Stale]

What is Pantheon?
A Temple dedicated to all the gods.
That is what this kernel is for: dedication to everyone on the Nash.
Why upstream?
Well, DirtyUnicorns put it best on G+ : https://plus.google.com/+DirtyUnicornsOfficial/posts/2MpHCwKqh5J
This kernel will be updated to the latest Linux-stable within the coming weeks.
Features:
Upstream kernel from source
Edits to avoid Safetynet/CTS (If you have root, it will fail signature check inherently without SUhide or Magisk hide)
Built With the Latest Clang for Android with Linaro as the cross compiler
Over Clock / Under Clock on CPU Frequencies added:
Little CPU: 175 MHz, 230 MHz, 2035 MHz
Big CPU: 175 MHz, 230 MHz, 2476 MHz; 2592 MHz
Slight undervolt (our device is overvolted compared to other msm8998 devices)
UC GPU (added 180 Mhz step for battery savings when web browsing, low GPU usage)
OC GPU (changed 710 MHz to 750 MHz)
Same Adrenoboost tweaks as the Pixel 2 ElementalX kernel.
Wakelock fixes by Boeffla
Bugs/Issues:
hit and miss on MotoMods
Download:
Google Drive
Instructions:
Download ZIP to phone
Boot to TWRP.
Flash and follow prompts in Aroma
Reflash root if you want root.
Version Information
Status: Stale [no longer developed]
Current Stable Version: v2.3
Stale Date: 2018-08-14
Created 2017-11-08
Last Updated 2018-08-13
Source: https://github.com/Uzephi/Nash_AOSP
Git Branch: o8x-caf
Compiler: Clang 7.0.2svn
Cross Compiler: Linaro 4.9
Branch: Android 8.1.y
Kernel Version: 4.4.y
defconfig: nash_defconfig
Credits: @joemossjr - for collaborating and getting this working and debugging w/ me to get the best possible experience for our community. @invisiblek for all the work he's done for our device tree @npjohnson for his work on our device tree. @erfanoabdi for his amazing work getting treble running and his other work on our device.
Thanks and Mentions:
@Lord Boeffla for his wakelock code. @nathanchance for the assistance and amazing guides and keeping msm-8998 up to date with linux-stable @jbats for keeping up to date with linux-stable for me to merge into this kernel.
@flar2 for his work on our chipset, msm8998
All other developers shown in commit history.
(Quoted from Nathan Chance)
A note about donations
Quite a few people have asked to donate to me in the past and I have turned them down. I am not in this for the money, this is my hobby, something I truly enjoy. If you truly want to donate to something (it is not expected in the slightest), I recommend an entity like the Open Source Initiative, the Free Software Foundation, XDA, or any one of the people I have thanked in the OP. Additionally, you are free to copy any and all of my work; the only thing I request is that you not ask for donations as well (though I can't really enforce this lol). Thank you.
Changelog:
Nov 8, 2017
Initial public release
Nov 15, 2017 v1.1
Updated cmdline to get CTS/SafetyNet working without the need of SUhide or Magisk hide.
Upstream to 4.4.76
Nov 22, 2017 v1.2
Put voltages in line with other msm8998
Upstream complete at 4.4.100
Nov 24, 2017 v1.3
Added OC/UC
Added wake lock blocking on redundant wakes.
Built with new toolchain - Linaro 4.9
Upstream to 4.4.102
Dec 17, 2017 v1.4
Added Zen, FIOPS, and SIO i/o schedulers
Replaced current wakelock blocking with Boeffla's cleaner code
Upstream to 4.4.106
March 2, 2018
Initial Alpha release for Oreo Stock
April 2, 2018
Initial Alpha release for AOSP
May 16, 2018
Stable release
June 16, 2018
Added 175 MHz for CPU and added other CPU optimizations.
August 13, 2018
Added Treble Support
Stock kernel for Oreo:
Status: stable.
Source: github.com/uzephi/Nash_Oreo
Download link:Google Drive
....... and so it begins. Oh yeah!
Sent from my Moto Z (2) using Tapatalk
Thank you! A new era starts 2day!
Sent from my Moto Z (2) using Tapatalk
Good job man! Thank you for your hard work. ?
If anyone is like me and just wants the kernel added to stock boot image, let me know and I can provide a boot image that is rooted, you'd do "fastboot boot boot.img" then flash with flashify. This is an awesome temp root method to not modify your stock boot image besides adding the kernel.
If anyone wants twrp with this let me know!
joemossjr said:
If anyone wants twrp with this let me know!
Click to expand...
Click to collapse
Would it be possible to get a TWRP built for the retail/German build posted below in the other thread?
I'd like to try this new kernel, running that stock room with the latest security patch.
Thanks
Amd4life said:
Would it be possible to get a TWRP built for the retail/German build posted below in the other thread?
I'd like to try this new kernel, running that stock room with the latest security patch.
Thanks
Click to expand...
Click to collapse
Its the same kernel it should work.
Sent from my Moto Z (2) using Tapatalk
Amd4life said:
Would it be possible to get a TWRP built for the retail/German build posted below in the other thread?
I'd like to try this new kernel, running that stock room with the latest security patch.
Thanks
Click to expand...
Click to collapse
Just flash the kernel in TWRP and reroot. no need for a new TWRP honestly. The performance and security improvements won't be noticeable in recovery.
Have any CPU governors, I/O schedulers or USB-related stuff been added yet? Our 835 chipset enables native alt displayport support for HDMI output through USB-C port but Lenovo stock kernel disables. Possibly due to conflict with headphone support? Not sure. Screw headphone via USB C, that is too much wear & tear, better to use high quality Bluetooth. Could you re-enable alt displayport output in kernel?
jhofseth said:
Have any CPU governors, I/O schedulers or USB-related stuff been added yet? Our 835 chipset enables native alt displayport support for HDMI output through USB-C port but Lenovo stock kernel disables. Possibly due to conflict with headphone support? Not sure. Screw headphone via USB C, that is too much wear & tear, better to use high quality Bluetooth. Could you re-enable alt displayport output in kernel?
Click to expand...
Click to collapse
OP explains everything. All changes are in OP. Tweaks to performance independent of governor and upstream done. Nothing else yet. Getting the tree to 4.4.97 first as stated in OP.
Android terminal TWRP installer and Pantheon Kernel
Android terminal TWRP installer should work with Pantheon Kernel:
https://forum.xda-developers.com/showpost.php?p=74444025&postcount=156
all credit for TWRP goes to @joemossjr
Uzephi said:
If anyone is like me and just wants the kernel added to stock boot image, let me know and I can provide a boot image that is rooted, you'd do "fastboot boot boot.img" then flash with flashify. This is an awesome temp root method to not modify your stock boot image besides adding the kernel.
Click to expand...
Click to collapse
Are you - or anybody else - able to realize a boot.IMG which, when booted with fastboot boot boot.img, it boots directly on TWRP as they made for Pixels?
It would be *very* useful for tweaking... :silly:
enetec said:
Are you - or anybody else - able to realize a boot.IMG which, when booted with fastboot boot boot.img, it boots directly on TWRP as they made for Pixels?
It would be *very* useful for tweaking... :silly:
Click to expand...
Click to collapse
Yes it will be handy. But is not available for now. And comparing our device every time with pixel is irelevant.the only thing in common are the A/B partitions. Nothing more. And that will come when it will come.
Sent from my Moto Z (2) using Tapatalk
blackwing182 said:
Yes it will be handy. But is not available for now. And comparing our device every time with pixel is irelevant.the only thing in common are the A/B partitions. Nothing more. And that will come when it will come.
Sent from my Moto Z (2) using Tapatalk
Click to expand...
Click to collapse
Ehi boy, they sell chamomile, do ya know?
And A/B partitions in common with Pixels *are* rilevant since the method used to place recovery in boot.img is *exactly the same* (and development on Pixels is waaay ahead respect to our device, so why don't we should learn from what they have already solved?)
enetec said:
Ehi boy, they sell chamomile, do ya know?
And A/B partitions in common with Pixels *are* rilevant since the method used to place recovery in boot.img is *exactly the same* (and development on Pixels is waaay ahead respect to our device, so why don't we should learn from what they have already solved?)
Click to expand...
Click to collapse
[emoji25]?*
Whatever dude.
Sent from my Moto Z (2) using Tapatalk
enetec said:
Ehi boy, they sell chamomile, do ya know?
And A/B partitions in common with Pixels *are* rilevant since the method used to place recovery in boot.img is *exactly the same* (and development on Pixels is waaay ahead respect to our device, so why don't we should learn from what they have already solved?)
Click to expand...
Click to collapse
We are more like the pixel 2. msm8998, TWRP has decryption issues, etc. Just follow pixel 2 and let me know how ahead the pixel 2 is... Hell, I was able to temp boot with a pixel 2 kernel with our defconfig. I wouldn't recommend it, mods didn't work, vibration was off and a few other issues, but that is because it was Google source and not ours.
Uzephi said:
We are more like the pixel 2. msm8998, TWRP has decryption issues, etc. Just follow pixel 2 and let me know how ahead the pixel 2 is... Hell, I was able to temp boot with a pixel 2 kernel with our defconfig. I wouldn't recommend it, mods didn't work, vibration was off and a few other issues, but that is because it was Google source and not ours.
Click to expand...
Click to collapse
It was my impression too.
Have you tried to take a look to their bootable-only twrp?

[KERNEL] kernel-plus for Nokia 6 (PLE)

kernel-plus for Nokia 6
This project is made to enhance user experiences using the Linux kernel on the Nokia 6 phone.
What this kernel have:
Additional CPU governors (alucard, nightmare, darkness, bioshock, blu_active), with "darkness" as the default governor for stability and battery life
SafetyNet compatibility
Enforcing SELinux (can be easily changed by modifying the flashable ZIP)
exFAT and NTFS read/write drivers (userspace programs will be necessary to access those functionalities) << THE FIRST ANDROID KERNEL TO HAVE NTFS KERNEL DRIVER
Latest patches from kernel.org for its respective release version (in this case 3.18.y)
Latest commits from CAF for its respective release version (in this case msm-3.18)
/proc/config.gz support for you kernel builders out there
What this kernel will have in the future:
EAS support with schedutil (currently work-in-progress)
Double tap to wake support (planned)
Overclocking support (planned)
Different kernel release upstream branch (planned)
>Is it safe to use the kernel? Have you done any tests?
Yes. I personally am using it with pirrat25's LineageOS 15.1 custom ROM (Oreo 8.1) on my Nokia 6 and it just works. I don't really know yet about long term usability so let me know in the thread!
>So, it has never been tested on stock ROM?
No, it has been tested to be not working (on Pie). YMMV, though. So go and try it! (Don't forget to give feedback in the thread if you do, thanks!)
>Will you add more features to the kernel? It's so barren!
Yes. That feature roadmap list is definitely not final. I will try and get as many features as I can to the kernel, so please stay tuned! Also, YOU can also contribute and add new features to the kernel. Just fork the source code on GitHub and make a pull request when you think you've got enough work on it.
XDA:DevDB Information
kernel-plus, Kernel for the Nokia 6
Contributors
xaedoplay.modder.xda, Linux Foundation, AOSP, Qualcomm, and HMD/FIH kernel engineers
Source Code: https://github.com/rmnscnce/android_kernel_PLE/tree/plus-3.18.y
Kernel Special Features:
Version Information
Status: Stable
Current Stable Version: 3.18.140-plus_v1.5
Stable Release Date: 2020-10-18
Created 2020-10-18
Last Updated 2020-10-28
Here you can download the prebuilt kernel images
Format: Flashable ZIP Archive
Latest version link: Direct download || Release page
Version archives (direct download links):
3.18.140-plus_v1.5
Changes:
- Merged tag LA.UM.6.5.r1-11500-8x96.0 from CAF
Code:
msm : adsprpc: maintain local copy of rpra offloaded to DSP
Make file credentials available to the seqfile interfaces
ext4: only look at the bg_flags field if it is valid
ext4: don't update checksum of new initialized bitmaps
ext4: verify the depth of extent tree in ext4_find_extent()
ext4: add more inode number paranoia checks
diag: Prevent out-of-bound access while processing userspace data
diag: Prevent out of bound access while getting build mask
diag: Check command size against the minimum before parsing
msm: adsprpc: maintain local copy of rpra offloaded to DSP
msm: ais: Remove dead code from Camera drivers
asoc: Ratelimit error logs to avoid excessive logging
soc: qcom: smem: validate fields of shared structures
msm: sensor: actuator: fix out of bound read for bivcm region params
FROMGIT: binder: create node flag to request sender's security context
ext4: avoid running out of journal credits when appending to an inline file
jbd2: don't mark block as modified if the handle is out of credits
jbd2: speedup jbd2_journal_dirty_metadata()
ext4: add corruption check in ext4_xattr_set_entry()
ext4: always verify the magic number in xattr blocks
- Compiled all drivers directly into the kernel image to prevent cases of incompatible .ko files (Pie not being able to use Wi-Fi)
3.18.140-plus_v1.4
Changes:
- Reverted integration of several drivers (readded /system/vendor/lib/modules files compilation)
- Added exFAT support in the kernel (submodule github:arter97/exfat-linux::branch=old)
- Added NTFS support in the kernel (Paragon NTFS3 GPL R/W driver)
- Fixed mistake in cmdline patcher
3.18.140-plus_v1.3
Changes:
- Streamlined the package by including all (necessary) drivers in the kernel image (eliminated /system/vendor/lib/modules dependency)
- Signed the flashable ZIP
3.18.140-plus_v1.2.1
Changes:
- Switched default CPU governor back to 'darkness'
- Removed 'lionfish' because of reboots when the battery is 35% or lower
3.18.140-plus_v1.2(DO NOT USE)
Changes:
- Removed "bloat" CPU governor 'conservativex' (it never worked)
- Changed default CPU governor to 'lionfish'
- Now using stock ramdisk
3.18.140-plus_v1.1
Changes:
- Applied SELinux compatibility kernel patch
- Modified kernel command line to boot on SELinux enforcing
3.18.140-plus
Changes:
- Initial release
Big thanks for GitHub for hosting my project repo and builds
Installation Guide
How to install the kernel?
Simple answer: "Just flash it using TWRP"
---
Well, it's that easy. Just flash the file you have downloaded using TWRP, and reboot the phone. Nothing fancy, just flash and it's all set.
Additional note: For some (unknown) reason Magisk would not survive the kernel flash procedure. You will need to flash Magisk installer zip after flashing the kernel to use it.
-----
How to change the kernel to boot into permissive SELinux mode?
While for security (and SafetyNet) it is not recommended to set the kernel to boot into permissive SELinux mode, you can easily modify the kernel flash script to do so (you can even disable SELinux altogether, but it is STRICTLY NOT RECOMMENDED)
To modify the kernel flash script, you must edit the "anykernel.sh" file.
From this
Code:
patch_cmdline androidboot.selinux=permissive androidboot.selinux=enforcing
-
To this:
Code:
patch_cmdline androidboot.selinux=permissive androidboot.selinux=permissive
or to this - if you want to disable SELinux altogether:
Code:
patch_cmdline androidboot.selinux=permissive androidboot.selinux=disabled
After it is done, you can repack the ZIP (I don't recommend applying compression to the ZIP) and flash it on TWRP
hello, I tried this but it doesnt work on stockrom base on Pie.
I also made a kernel based on nokia source V6* weeks ago with the kernel ver 3.18.120 from nokia, with pre enabled permissive mode and enabled some on menuconfig and governors and it seems to work everything, did it for personal purpose.
I also tried to upstream it, but I'm stuck got lots of error cuz I directly jump to the last version of kernel which is 3.18.140. did tried adding also EAS to the kernel, but there is alot of file to be added and fixing the error and symlinks manually so I didnt continue there since im doing it on my Celeron laptop.
anyway this one wont flash on TWRP, gets error using anykernel3 zip, something error like " update error:1" I dont remember exactly the whole text.
same thing for fastboot. I replaced the kernel from stockboot.img from this one and get Remote failed: dtb not found. (tried 3x) I know the compiled sources are dtb file but it doest get read,
which is the same procedure when I compiled my kernel which works.
thank you for making a time doing it for the N6 users. hopefully it will work soon.
JinbrianZ said:
hello, I tried this but it doesnt work on stockrom base on Pie.
I also made a kernel based on nokia source V6* weeks ago with the kernel ver 3.18.120 from nokia, with pre enabled permissive mode and enabled some on menuconfig and governors and it seems to work everything, did it for personal purpose.
I also tried to upstream it, but I'm stuck got lots of error cuz I directly jump to the last version of kernel which is 3.18.140. did tried adding also EAS to the kernel, but there is alot of file to be added and fixing the error and symlinks manually so I didnt continue there since im doing it on my Celeron laptop.
anyway this one wont flash on TWRP, gets error using anykernel3 zip, something error like " update error:1" I dont remember exactly the whole text.
same thing for fastboot. I replaced the kernel from stockboot.img from this one and get Remote failed: dtb not found. (tried 3x) I know the compiled sources are dtb file but it doest get read,
which is the same procedure when I compiled my kernel which works.
thank you for making a time doing it for the N6 users. hopefully it will work soon.
Click to expand...
Click to collapse
Thanks for the reply!
>anyway this one wont flash on TWRP, gets error using anykernel3 zip, something error like " update error:1" I dont remember exactly the whole text.
Can you please take note of the error message? It would be impossible for me to fix if you don't give me the details
>I replaced the kernel from stockboot.img from this one and get Remote failed: dtb not found. (tried 3x) I know the compiled sources are dtb file but it doest get read
This looks really strange. Is it possible that dtb layout from Oreo differs to the one on Pie? If it is, then I'll need to patch more and create a specific custom Makefile option to make it possible to compile more than one dtb image per source.
I will update the OP to let people know that this doesn't work (yet) on the stock Pie ROM
Cheers!
xaedoplay.modder.xda said:
Thanks for the reply!
>anyway this one wont flash on TWRP, gets error using anykernel3 zip, something error like " update error:1" I dont remember exactly the whole text.
Can you please take note of the error message? It would be impossible for me to fix if you don't give me the details
>I replaced the kernel from stockboot.img from this one and get Remote failed: dtb not found. (tried 3x) I know the compiled sources are dtb file but it doest get read
This looks really strange. Is it possible that dtb layout from Oreo differs to the one on Pie? If it is, then I'll need to patch more and create a specific custom Makefile option to make it possible to compile more than one dtb image per source.
I will update the OP to let people know that this doesn't work (yet) on the stock Pie ROM
Cheers!
Click to expand...
Click to collapse
> I will check it later.
or maybe because of TWRP, I use the bootable version which 3.2.3-0, but I can flash any zip on it. except for the anykernel zip that gets same error, which is also I did before for my compiled kernel.
and only gets to work when fastbooting the .img
Also when I compiled the kernel sources based on pie V6 from nokia, I got a dtb file size of about 18mb. where the stockboot image is 21mb. the one you compiled is in smaller size which maybe there is something missing files to get to work on pie I think?
JinbrianZ said:
> I will check it later.
or maybe because of TWRP, I use the bootable version which 3.2.3-0, but I can flash any zip on it. except for the anykernel zip that gets same error, which is also I did before for my compiled kernel.
and only gets to work when fastbooting the .img
Also when I compiled the kernel sources based on pie V6 from nokia, I got a dtb file size of about 18mb. where the stockboot image is 21mb. the one you compiled is in smaller size which maybe there is something missing files to get to work on pie I think?
Click to expand...
Click to collapse
Thanks for the reply!
>or maybe because of TWRP, I use the bootable version which 3.2.3-0, but I can flash any zip on it
Maybe try to use the official TWRP? It has full support and stuff, but I couldn't manage to flash the custom ROM there so to each their own
>he one you compiled is in smaller size which maybe there is something missing files to get to work on pie I think?
Yeah, maybe that's the culprit. Is it because I don't integrate all modules inside the kernel image? I will try and compile all the modules inside the kernel. The final ZIP size is 25MB though so it is actually bigger in total compared to the stock boot image.
Like I said, I will fix this issue once I got the real problem, so that all Nokia 6 user can enjoy using custom kernel images :fingers-crossed:
Finally a custom kernel for our phone! looks like i really need to unlock the bootloader now. Thanks for your effort from making this one!
btw sorry if it's OOT but is the LOS 15.1 ROM stable enough for daily driver use?
MYR-12.v2 said:
Finally a custom kernel for our phone! looks like i really need to unlock the bootloader now. Thanks for your effort from making this one!
btw sorry if it's OOT but is the LOS 15.1 ROM stable enough for daily driver use?
Click to expand...
Click to collapse
Thank you for the reply!
>is the LOS 15.1 ROM stable enough for daily driver use?
Yes – only if you wouldn't mind not being able to use the fingerprint scanner (and the button backlights). Other than that it's good! As an added bonus, the built in camera firmware is on par with the GCam port for this phone, without the shutter lag
I installed latest plus kernel on stock pie. it works now on my device. but wifi doesnt work.
if u set CONFIG_PRONTO_WLAN=m into CONFIG_PRONTO_WLAN=y on PLE_defconfig wifi will work. hope this error is due to this, kind of a sign error i hope so. I experienced this same error when i tried to build los.
cbkottege said:
I installed latest plus kernel on stock pie. it flashed well but didn't boot into system,it rebooted into bootloader.
Click to expand...
Click to collapse
Thank you for the reply!
So, it cannot boot on Pie, right? I will work for Pie ROMs on a separate branch, then!
I really thought there weren't going to be any changes in userspace compatibility between Oreo and Pie. Turned out I am wrong
xaedoplay.modder.xda said:
Thank you for the reply!
So, it cannot boot on Pie, right? I will work for Pie ROMs on a separate branch, then!
I really thought there weren't going to be any changes in userspace compatibility between Oreo and Pie. Turned out I am wrong
Click to expand...
Click to collapse
sorry man, can u check my previous reply again. i edited it. now its working.
I wiped cache and flashed magisk again then it worked..
but wifi doesnt work
cbkottege said:
sorry man, can u check my previous reply again. i edited it. now its working.
I wiped cache and flashed magisk again then it worked..
but wifi doesnt work
Click to expand...
Click to collapse
Thank you for your reply!
I checked the previous reply:
cbkottege said:
I installed latest plus kernel on stock pie. it works now on my device. but wifi doesnt work.
if u set CONFIG_PRONTO_WLAN=m into CONFIG_PRONTO_WLAN=y on PLE_defconfig wifi will work. hope this error is due to this, kind of a sign error i hope so. I experienced this same error when i tried to build los.
Click to expand...
Click to collapse
> if u set CONFIG_PRONTO_WLAN=m into CONFIG_PRONTO_WLAN=y on PLE_defconfig wifi will work
Okay, so I guess I had to merge drivers into the kernel again, huh? Will do! (Expect new version later today with even more updates)
>I experienced this same error when i tried to build los
You built LOS? What version? I would like to have it if it's working and is LineageOS 16 or later!
xaedoplay.modder.xda said:
Thank you for your reply!
I checked the previous reply:
> if u set CONFIG_PRONTO_WLAN=m into CONFIG_PRONTO_WLAN=y on PLE_defconfig wifi will work
Okay, so I guess I had to merge drivers into the kernel again, huh? Will do! (Expect new version later today with even more updates)
>I experienced this same error when i tried to build los
You built LOS? What version? I would like to have it if it's working and is LineageOS 16 or later!
Click to expand...
Click to collapse
Thanks for ur efforts on kernel plus! keep this going on. we will hope later updates
I tried to build los 16 but i failed. I built los 15.1 using pirats tree. tried to fix fingerprint,hotspot and backlight bugs . Only i managed to fix hotspot bug also i managed to set Selinux to enforced on los 15.1 userdebug build without any major issue.
cbkottege said:
Thanks for ur efforts on kernel plus! keep this going on. we will hope later updates
I tried to build los 16 but i failed. I built los 15.1 using pirats tree. tried to fix fingerprint,hotspot and backlight bugs . Only i managed to fix hotspot bug also i managed to set Selinux to enforced on los 15.1 userdebug build without any major issue.
Click to expand...
Click to collapse
Thank you for your reply!
>Thanks for ur efforts on kernel plus! keep this going on. we will hope later updates
Stay tuned! I'm ~65% done on the next update!
>I tried to build los 16 but i failed
Aw, that's quite unfortunate :\ Maybe you could try building 17.1 tree made available by someone on GitHub?
>tried to fix fingerprint,hotspot and backlight bugs . Only i managed to fix hotspot bug also i managed to set Selinux to enforced on los 15.1 userdebug build without any major issue
There's a hotspot bug? I don't experience anything strange on it here. Anyways could you please share the fixed build (on the respective pirrat's thread)? Any fixes' a goal!
xaedoplay.modder.xda said:
Thank you for your reply!
>Thanks for ur efforts on kernel plus! keep this going on. we will hope later updates
Stay tuned! I'm ~65% done on the next update!
>I tried to build los 16 but i failed
Aw, that's quite unfortunate :\ Maybe you could try building 17.1 tree made available by someone on GitHub?
>tried to fix fingerprint,hotspot and backlight bugs . Only i managed to fix hotspot bug also i managed to set Selinux to enforced on los 15.1 userdebug build without any major issue
There's a hotspot bug? I don't experience anything strange on it here. Anyways could you please share the fixed build (on the respective pirrat's thread)? Any fixes' a goal!
Click to expand...
Click to collapse
>I did it for my personal use. about hotspot bug when we switch between hotspot and wifi system got restart after a while.
>I tried that los 17 tree posted by samu , it also not working. I'm new for these stuff. i think we have to add some symlinks manually to upstream the tree. But i dont know much about it. :crying:
> I'll post my work on that thread soon. I have to find the working zip file now. There are lots of zips on my pc and are not organised well
I want to know does pirrats los 15.1 having any battery issue quick discharge in idle or any kind of a unusual battery usage???
In my build im having a unusual battery usage cant even find what is the cause for it. i thought it was due to tree . let me know if u have a quick battery drain in idle on urs.
cbkottege said:
>I did it for my personal use. about hotspot bug when we switch between hotspot and wifi system got restart after a while.
>I tried that los 17 tree posted by samu , it also not working. I'm new for these stuff. i think we have to add some symlinks manually to upstream the tree. But i dont know much about it. :crying:
> I'll post my work on that thread soon. I have to find the working zip file now. There are lots of zips on my pc and are not organised well
I want to know does pirrats los 15.1 having any battery issue quick discharge in idle or any kind of a unusual battery usage???
In my build im having a unusual battery usage cant even find what is the cause for it. i thought it was due to tree . let me know if u have a quick battery drain in idle on urs.
Click to expand...
Click to collapse
Thanks for your reply!
>>I tried that los 17 tree posted by samu , it also not working. I'm new for these stuff. i think we have to add some symlinks manually to upstream the tree. But i dont know much about it. :crying:
I really want to help on this but sadly I don't have much storage spaces left on my workstation so kernel it is! Maybe if I finally got my hands on more storage? I hope so!
>I want to know does pirrats los 15.1 having any battery issue quick discharge in idle or any kind of a unusual battery usage???
Maybe? I don't know, I started the kernel development almost immediately after I got my hands on 15.1. For what I know, the battery drains but I think that's because of my battery breaking down (thinking about having ~2500mAh left intact) (this kernel is really good at maintaining idle battery life through HW controlled deep sleep though, thanks to "darkness" governor)
xaedoplay.modder.xda said:
Thanks for your reply!
>>I tried that los 17 tree posted by samu , it also not working. I'm new for these stuff. i think we have to add some symlinks manually to upstream the tree. But i dont know much about it. :crying:
I really want to help on this but sadly I don't have much storage spaces left on my workstation so kernel it is! Maybe if I finally got my hands on more storage? I hope so!
>I want to know does pirrats los 15.1 having any battery issue quick discharge in idle or any kind of a unusual battery usage???
Maybe? I don't know, I started the kernel development almost immediately after I got my hands on 15.1. For what I know, the battery drains but I think that's because of my battery breaking down (thinking about having ~2500mAh left intact) (this kernel is really good at maintaining idle battery life through HW controlled deep sleep though, thanks to "darkness" governor)
Click to expand...
Click to collapse
Can u join me on telegram ""t.me/cbkings"" . :fingers-crossed: maybe we can talk little about development just in case .
Thanks for making a custom kernel, i tried it with Lineage OS 15.1, but everytime when i deploy it with TWRP 3.4.0, it soft-bricks my android installation. (or even TWRP itself also, but i am not sure)
Also im using TA-1033.
Edit: Changed TWRP to 3.3.1 and installed Magisk before applying, now it boots, but GUI is messed up.
cbkottege said:
I installed latest plus kernel on stock pie. it works now on my device. but wifi doesnt work.
if u set CONFIG_PRONTO_WLAN=m into CONFIG_PRONTO_WLAN=y on PLE_defconfig wifi will work. hope this error is due to this, kind of a sign error i hope so. I experienced this same error when i tried to build los.
Click to expand...
Click to collapse
Hey! Just wanted to inform you that the new kernel release (plus_v1.5) got all the drivers built into the kernel image. Hopefully now the Wi-Fi will work on stock Pie ROM.
Please give an update if you're trying it out!
Wapitiii said:
Thanks for making a custom kernel, i tried it with Lineage OS 15.1, but everytime when i deploy it with TWRP 3.4.0, it soft-bricks my android installation. (or even TWRP itself also, but i am not sure)
Also im using TA-1033.
Edit: Changed TWRP to 3.3.1 and installed Magisk before applying, now it boots, but GUI is messed up.
Click to expand...
Click to collapse
Thanks for the reply!
>but GUI is messed up
Have you tampered the GPU drivers? You can try to wipe the GPU cache (also the /cache partition and runtime (dalvik) cache) to fix issues with broken UI elements

Categories

Resources