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 me 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.
Standard kexec call unfortunatelly does not work on Nexus 4. It freezes somewhere, and it is very difficult to find out where - probably some of the drivers are not shut down/re-initialized properly, it is a commong thing among Android devices, which is why kexec-hardboot was made.
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 I 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/Tasssadar/6766757, 4.3 AOSP kernel repo, cm 10.2 kernel repo
This is the kernel patch. Only the host kernel needs to be patched.
Related CONFIG options:
CONFIG_KEXEC=y
CONFIG_KEXEC_HARDBOOT=y
CONFIG_ATAGS_PROC=y
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=0x85000000 --command-line="$(cat /proc/cmdline)"
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 - I used patch from TF201 and modified it a bit (basically just changed few SoC specific constants). People at #ubuntu-arm helped me out with that, thanks.
For flo, I've improved the patch a bit - only the host needs to be patched now and I also fixed a bug with /proc/atags not reading all tags.
Thanks, added.
Actual kexec testing would have to go to kexec users after kernel passes normal use testing.
Also merged, thanks Tassadar!
I will be merging.... Thank you
Sweet..time.
Sent from my Nexus 4 using xda app-developers app
hope my previous port over to mako helped you
@ramgear
Sent from my Nexus 4 using Tapatalk 4
Added to my cm10.2 caf kernel.
thanks a lot
what would be the benefit for end user? Or is it just for devs to try kernels faster?
Sent from teh void
asim0 said:
what would be the benefit for end user? Or is it just for devs to try kernels faster?
Sent from teh void
Click to expand...
Click to collapse
The primary benefit is so that users can run Multi-ROM and have different kernel based ROMs.
Is it possible to find a nice German guy who can request on http://www.android-hilfe.de/custom-...ss15j-jwr66v-hells-core-b38-19-09-2013-a.html to add this patch to hellscore ?
Thanks
-=-=-
hellsgod Pm-ed , let`s hope
Sent from my Nexus 4 using Tapatalk 2
xanthrax said:
Is it possible to find a nice German guy who can request on http://www.android-hilfe.de/custom-...ss15j-jwr66v-hells-core-b38-19-09-2013-a.html to add this patch to hellscore ?
Thanks
Sent from my Nexus 4 using Tapatalk 2
Click to expand...
Click to collapse
+1 on that mate
I already asked the dev to implement this Patch. He wants to implement this patch in some later builds, to be sure the patch works correctly.
Hellsgood said that the patch will be implemented on v40 ! :good:
Merged - Thank you Tasssadar
hells
any1 found 4.2.2 kernel that has kexec?
aqsede said:
any1 found 4.2.2 kernel that has kexec?
Click to expand...
Click to collapse
Check multirom thread. Tasssadar posted one there.
http://forum.xda-developers.com/showthread.php?p=46596551
Sent from my Nexus 4 using Tapatalk
@Tasssadar
I don't know if you're around this thread much anymore, but would it be possible to implement this patch alone in another model of phone's kernels?
I have an Optimus G which is almost identical to the N4 and am trying to read as much as I can on this patch but am not finding if it is device specific, and if it is, how much needs to be changed to be used on a different device (even if it is almost the same phone).
I know there are kernels that have this patch enabled but I don't know where it came from if it's not yours. I have been told it is not possible with a stock based kernel for the O.G. but I see you have some stock kernels for the N4.
I know almost is not exact, but I think so much of them are the same that it doesn't normally take much. Thank you for your time and work put into this.
dopy25 said:
@Tasssadar
I don't know if you're around this thread much anymore, but would it be possible to implement this patch alone in another model of phone's kernels?
I have an Optimus G which is almost identical to the N4 and am trying to read as much as I can on this patch but am not finding if it is device specific, and if it is, how much needs to be changed to be used on a different device (even if it is almost the same phone).
I know there are kernels that have this patch enabled but I don't know where it came from if it's not yours. I have been told it is not possible with a stock based kernel for the O.G. but I see you have some stock kernels for the N4.
I know almost is not exact, but I think so much of them are the same that it doesn't normally take much. Thank you for your time and work put into this.
Click to expand...
Click to collapse
the kernel part itself you probably wont need to modify the patch, however you probably will need to change the offssets in multirom itself. if i recall, there is a guide on how to port multirom for other devices
opssemnik said:
the kernel part itself you probably wont need to modify the patch, however you probably will need to change the offssets in multirom itself. if i recall, there is a guide on how to port multirom for other devices
Click to expand...
Click to collapse
Thank you but I am already using multirom on my phone (Lg Optimus G on Sprint). It works like a champ, but I am trying to see if it can be applied to a stock rom. I am having issues with stock roms not using already patched kernels and would like to know if it is possible to use the patch mentioned here on another phone. The N4 and Optimus G are basically the same phone so I thought it might work.
Related
Google has recently released the 3.10 linux kernel for Android. and CodeAurora has also got it. I was wondering if it's realistic to port in this phase. I tried to but I failed hard lol. Main reason to port the 3.10 series is that it should have a great battery life. I'm not sure whether it will run on KitKat since it's supposed to be for Android 5.0.
Links:
Google Kernel: https://android.googlesource.com/kernel/common.git/+/experimental/android-3.10
CodeAurora Kernel: https://www.codeaurora.org/cgit/quic/la/kernel/msm-3.10
Anyone else attempted? If anyone could give me some more info about this I would be very happy!
Thread cleaned
How many times do we have to say it?
Keep this damn soap opera drama OFF XDA and stick to your Google +
How rude to bring all this crap in here to the OP's discussion
Next talk of secret kernels or banned members will be...trouble.
If you have no respect for XDA, then leave XDA...please!
Thank you for your cooperation
Friendly Neighborhood Senior Moderator
From my experience i know that binary compatibility between linux kernel versions (even between minor versions) is the latest thing developers care about. Even if you make this kernel work on i9505 i doubt u will be able to use binaries (those /system/lib/*.so files) from any existing ROM and thus u won't be able to make ROM with this kernel.
Need to wait when Samsung will move to this kernel version, but i'm affraid it won't happen on any existing phone. Usually, Samsung stick on the kernel version phone launched.
sorg said:
From my experience i know that binary compatibility between linux kernel versions (even between minor versions) is the latest thing developers care about. Even if you make this kernel work on i9505 i doubt u will be able to use binaries (those /system/lib/*.so files) from any existing ROM and thus u won't be able to make ROM with this kernel.
Need to wait when Samsung will move to this kernel version, but i'm affraid it won't happen on any existing phone. Usually, Samsung stick on the kernel version phone launched.
Click to expand...
Click to collapse
It's possible that CAF updated their repos or AOSP for the 3.10 kernel. There's references to 3.12 at master in bionic.
broodplank1337, what happens if you build a recovery and fastboot boot that?
xboxfanj said:
It's possible that CAF updated their repos or AOSP for the 3.10 kernel. There's references to 3.12 at master in bionic.
Click to expand...
Click to collapse
Doesn't AOSP use any libraries from stock ROM?
I didn't try AOSP, but CM usually required many libraries from stock ROM last time i've tried (couple years ago).
sorg said:
Doesn't AOSP use any libraries from stock ROM?
I didn't try AOSP, but CM usually required many libraries from stock ROM last time i've tried (couple years ago).
Click to expand...
Click to collapse
Yeah, there's a bunch of proprietary files specific to the SOC.
It's not as simple as the code existing on CAF, the device branch for your specific SoC needs it as well.
Of course, one could do this manually, but the effort and skills required is not trivial.
LLStarks said:
It's not as simple as the code existing on CAF, the device branch for your specific SoC needs it as well.
Of course, one could do this manually, but the effort and skills required is not trivial.
Click to expand...
Click to collapse
True. Caf does have some 3.10 device branches but none for 8960/8064, since those are not supported. Not sure why since they do support weaker chips such as 8226 and 8610. They do have some ramdisk changes for 3.10, but even with all that, I have no adb and no ramconsole on the optimus g (nexus 4).
Sent from my Optimus G using xda app-developers app
The only things I'd really want out of a >3.4 kernel is dma_buf support, the msm drm, and Freedreno
Maybe it would be easier to backport these features since by themselves they go a long way to making desktop Linux on our phones easier
LLStarks said:
The only things I'd really want out of a >3.4 kernel is dma_buf support, the msm drm, and Freedreno
Maybe it would be easier to backport these features since by themselves they go a long way to making desktop Linux on our phones easier
Click to expand...
Click to collapse
my s3 3.4-drm kernels supports it - patches came from here ==>
(s4 kernel is a WIP)
https://github.com/freedreno/kernel-msm/
That stuff's outdated
Real magic is here: http://cgit.freedesktop.org/~robclark/linux/refs/heads
Additionally, I wonder if anyone has attempted to boot Linux off the Hexagon DSP which is a pretty much like a 2nd CPU in your phone that's waiting to be used
LLStarks said:
That stuff's outdated
Real magic is here: http://cgit.freedesktop.org/~robclark/linux/refs/heads
Additionally, I wonder if anyone has attempted to boot Linux off the Hexagon DSP which is a pretty much like a 2nd CPU in your phone that's waiting to be used
Click to expand...
Click to collapse
We have offloaded all audio processing and mp3 decoding to the DSP. Thus allowing all 4 primary cores to sleep while playing audio. Media player app itself may use CPU cycles for UI updates when the screen is on. Working on WMA decoding...
Sent from my GT-I9505G using XDA Premium 4 mobile app
please make this kernel work with miui rom!
Hello,
This is a stock SeLinux permissive kernel and init.d activated for Samsung Galaxy Note Edge (N915F) for Lollipop 5.0.1.
There are inputs that is working also on N915FY.
The kernel was compiled from Samsung source LL_CIS kernel using Google toolcahin v4.8.
If you want to test it, please flash in cwm the attached file and report back. Please make a backup of your actual kernel (boot.img) befor flashing this one.
Special thanks to @Micky387 who advised me to update the source kernel (MH driverI), @Wuby986 for his support and guidance and @daxgirl for his advices.
My kernel source for N915F (N915FOXE1BOC6) is here.
Happy flashing.
PS. Kernel updated. Same functionality but some different info in "About".
Well you got further than I did .. Kept getting some driver file referenced so it would not complied.. Thanks for effort I hope you work it out soon.. Unfortunately I don't have time at the moment ..
starbucks2010 said:
Hello,
Since few days I struggle to build a SeLinux permissive kernel for Samsung Galaxy Note Edge with Lollipop 5.0.1 but without success. Or with partial success.
I followed several guides from xda and other sites but it seems that everyone has his different way of doing it.
What I have done so far:
- I installed Ubuntu 14.04 with all updates and apt-get xxx
- I installed the Google toolchain arm-eabi-4.8
- I Installed Samsung kernel source for N915F_CIS from here
- I changed the path to the toolchain in Makefile and build_kernel.sh
- I run from kernel source folder: ./build_kernel.sh
- After 10-15 min of compilation I get a zImage file in //output/arch/arm/boot of ~ 9.8 Mb
- Using Android Image Kitchen v2.2 I integrated the zImage into a boot.img to be flashed with cwm
I flashed this new boot.img but the phone is rebooting every minute and in about I have "unknown"as baseband.
Anyone have an idea how to fix this?
Thank you in advance.
Click to expand...
Click to collapse
hi man. How are you ?
So many thing are change in lollipop . the modem and firmware modem dont call same as KK ROM.
So be sure you are this commit https://github.com/CyanogenMod/andr...mmit/784aa9a84b77090fa591bff77045341c3e3c6293
and add MHI module into tblte_defconfig
https://github.com/CyanogenMod/andr...mmit/1dd44659ee26c2d8b313c1346192e2bfa2ac7bb9
dont delete 18 and 19 line if you build for TW rom .
Try and report
micky387 said:
hi man. How are you ?
So many thing are change in lollipop . the modem and firmware modem dont call same as KK ROM.
So be sure you are this commit https://github.com/CyanogenMod/andr...mmit/784aa9a84b77090fa591bff77045341c3e3c6293
and add MHI module into tblte_defconfig
https://github.com/CyanogenMod/andr...mmit/1dd44659ee26c2d8b313c1346192e2bfa2ac7bb9
dont delete 18 and 19 line if you build for TW rom .
Try and report
Click to expand...
Click to collapse
Bonjour Mickey,
Thank you for your advice. I'll try it and let you know how it goes. Do you know if I have to flash also the modules together with the new kernel or only the boot.img alone ?
Merci.
starbucks2010 said:
Bonjour Mickey,
Thank you for your advice. I'll try it and let you know how it goes. Do you know if I have to flash also the modules together with the new kernel or only the boot.img alone ?
Merci.
Click to expand...
Click to collapse
No need to flash module. The MHI module will be in the kernel so you have boot.img with all inside.
starbucks2010 said:
Hello,
Since few days I struggle to build a SeLinux permissive kernel for Samsung Galaxy Note Edge with Lollipop 5.0.1 but without success. Or with partial success.
I followed several guides from xda and other sites but it seems that everyone has his different way of doing it.
What I have done so far:
- I installed Ubuntu 14.04 with all updates and apt-get xxx
- I installed the Google toolchain arm-eabi-4.8
- I Installed Samsung kernel source for N915F_CIS from here
- I changed the path to the toolchain in Makefile and build_kernel.sh
- I run from kernel source folder: ./build_kernel.sh
- After 10-15 min of compilation I get a zImage file in //output/arch/arm/boot of ~ 9.8 Mb
- Using Android Image Kitchen v2.2 I integrated the zImage into a boot.img to be flashed with cwm
I flashed this new boot.img but the phone is rebooting every minute and in about I have "unknown"as baseband.
Anyone have an idea how to fix this?
Thank you in advance.
Click to expand...
Click to collapse
Wait one more day..
Or maybe earlier
Finally done.
Make backup of your actual kernel, flash the attached zip from post 1in cwm and please report back.I didn't check the init.d support but it should work.
Good, I'll try.
Dev.
Just a small request please.
If you could please make sure a link to YOUR kernel sources in OP.
Any Linux kernel publicly released must have source to compile the exact binary (zImage) as repacked into your distributed boot.img. This must be current at time of every released version.
This is not just a XDA rule, but a legal GPL requirement, applying to all, even if modification is only minor. This is open-source
I would suggest the use of a github repo that helps keep track of your changes (commits), promotes open transparency, sharing and colaboration
If you have any questions on how to go about this, i would be happy to help via pm (but currently away with work), but would suggest to contact our friendly forum Mod.
Best of luck with your project. :thumbup:
Cheers.
UITA
Any chance that you would be willing to make this kernel compatible with the Sprint variety? Man.... I need my viper4android bro. Please. Lol
UpInTheAir said:
Dev.
Just a small request please.
If you could please make sure a link to YOUR kernel sources in OP.
Any Linux kernel publicly released must have source to compile the exact binary (zImage) as repacked into your distributed boot.img. This must be current at time of every released version.
This is not just a XDA rule, but a legal GPL requirement, applying to all, even if modification is only minor. This is open-source
I would suggest the use of a github repo that helps keep track of your changes (commits), promotes open transparency, sharing and colaboration
If you have any questions on how to go about this, i would be happy to help via pm (but currently away with work), but would suggest to contact our friendly forum Mod.
Best of luck with your project. :thumbup:
Cheers.
UITA
Click to expand...
Click to collapse
Thank you for your advices.The link to Samsung kernel source was already there . Anyway, I added it one more time just to be sure that is more visible.
For the github repo, I have to create an account and then I'll upload the files.
Best regards.
Well done mate ..... Yea
---------- Post added at 08:32 AM ---------- Previous post was at 07:36 AM ----------
Boot and works fine , nice one
Can this be used on N915FY as well?
I don't have any reports from N915FY users. You can try and tell us
Don't forget to make a backup first.
starbucks2010 said:
Thank you for your advices.The link to Samsung kernel source was already there . Anyway, I added it one more time just to be sure that is more visible.
For the github repo, I have to create an account and then I'll upload the files.
Best regards.
Click to expand...
Click to collapse
Hey, no problem.
Just to clarify....
If you've made any (even minor) change to "Samsung" source, then you have to upload "your" complete source and link "your" source, not "Samsung" So if you've made the kernel permissive or even use a different toolchain or path, technically you have modified from original and is now "your" source If you use a custom defconfig, don't forget it too
github is well worth the pain I Google for answers all the time (how to do this and that), but still screw things up (sometimes majorly) now and then.
dubart said:
Can this be used on N915FY as well?
Click to expand...
Click to collapse
Using this kernel with a N915FY. Great job btw I can finally use viper audio which I've missed so much. Major props dude!
I'm gonna flash this on sprint variant either that or throw this device out my window
dinaps86 said:
I'm gonna flash this on sprint variant either that or throw this device out my window
Click to expand...
Click to collapse
Lol it booted just no data. Yaaayyy!!!
I see that there are other people who are interested in Selinux permissive kernels.
So, if you want, I can add selinux permissive to any samsung kernel as long as you provide me 2 files: your original kernel (boot.img) from the ROM you want to flash and the Kernel.tar.gz - source kernel from Samsung site. In order to get Kernel.tar.gz file you'll need to download the kernel source file (~ 1Gb) from Samsung site, open the archive and upload ONLY the Kernel.tar.gz (~ 100-150 Mb) and the readme file from the archive to some sharing site. Then, I'll try to compile that kernel for you.
There are also downsides. I cannot stay up to date will all new commits done to the kernel source so I'll compile your kernels only with info that I have at that date. If you fork the github and find kernel source updates, I can add them.
PS. I only set up a working PC with Ubuntu and Google toolchain v4.8. If you find any information that this setup is not suitable for compiling your kernel, then there is no point of providing me the above files.
Best regards.
OP updated with some Antutu screen shots.
In the interest of keeping this topic easy to follow, lets keep the posts developer/development related. Off topic posts and questions will likely be reported. Warning From A Moderator: http://forum.xda-developers.com/showthread.php?p=64117749
Hello everyone,
This thread is for discussing, and furthering the development of aosp/cm for our devices. I and most others believe it is in the best interest of getting the port done if we all collaborate on it. I will try to update this op and post relevant information as it becomes available.
Cheers!
CM13 Working Repo
https://github.com/7420dev
Current Goals: Listed In Order Of Priority
1.) Fixing The Various Drivers(camera,etc.)
2.) Misc. Bug Fixing
Current Status:
Open Source Gralloc in testing. Appears to be working properly.(Screen Works)
List Of Working Drivers:
-WiFi
-GPS
-AP Hotspot
-Basic 2D Graphics
-GPS
-LED
-MTP
-Sound
-BT
-Texting(SMS/MMS)
-Mobile Data
-Telephony
Here's a video from @arter97 booting cm using @tdcfpp gralloc:
https://youtu.be/fv0I45HtgtQ
Donating:
If you wish to donate, please donate to the people putting the most effort into this project! To make it easier these are the top two currently.
@tdcfpp and @sktjdgns1189 and you can donate to him here: https://t.co/sf7R69JYqx tdcfpp is working extremely hard on porting gralloc, and making excellent progress. Sktjdgns1189 is working on hard on fixing various driver issues. So far he's fixed telephony, sound and WiFi to name a few. I will try to update this as more people contribute!
Do not ask for etas or test builds!
It will happen eventually, but it will be laggy, and buggy. There is no point, if people wanted AOSP or CM, they shouldn't get a Samsung/Exynos device.
Is posible to port meizu pro 5 rom wich have same soc aas galaxy s6.
Rekan_ said:
It will happen eventually, but it will be laggy, and buggy. There is no point, if people wanted AOSP or CM, they shouldn't get a Samsung/Exynos device.
Click to expand...
Click to collapse
I would be surprised if it was laggy. Buggy, most likely, but laggy I don't think so. I've used aosp on other Samsung devices and it was always faster than TW. I didn't buy my s6 with the expectation of aosp, but if it is possible, I would definitely like to try it. The exynos 7420 is an absolute beast, and if the 810 can run the nexus like butter, imagine what the 7420 could do.
kiko3 said:
Is posible to port meizu pro 5 rom wich have same soc aas galaxy s6.
Click to expand...
Click to collapse
It could be possible. It will be interesting to see when the source comes out.
Sent from my SM-G925K using XDA Free mobile app
Xileforce said:
I would be surprised if it was laggy. Buggy, most likely, but laggy I don't think so. I've used aosp on other Samsung devices and it was always faster than TW. I didn't buy my s6 with the expectation of aosp, but if it is possible, I would definitely like to try it. The exynos 7420 is an absolute beast, and if the 810 can run the nexus like butter, imagine what the 7420 could do.
Click to expand...
Click to collapse
Probably the older Samsung devices had their sources released and this phones sources haven't been.
And yeah, I had a smooth experience with my S4 and S3 with AOSP
Pure Android 6.0 on galaxy tab S is not laggy at all! it's so smooth compared to touchwizz. On S6 it will literally flying
I don't know anything about how to achieve this.
But I found the Meizu MX Pro 5 firmware (Which have the same chip as s6)
download.meizu.com/Firmware/Flyme/PRO_5/4.5.4.1/cn/20151022054017/9e3d5077/update.zip
Hope it helps
I know the end goal is to be able to compile Android for the Galaxy S6 from scratch, but I was wondering if it would be technically possible to create some sort of hybrid version. Although a complete AOSP version would be amazing, I believe a lot of users would be happy if someone could take the current kernel based on Samsung sources, so everything around boot and driver/hardware initialization should work, and put some version of the AOSP interface on top of that. Similar to how the Google Play Editions used to work. Is that in any way feasible?
woeds said:
I know the end goal is to be able to compile Android for the Galaxy S6 from scratch, but I was wondering if it would be technically possible to create some sort of hybrid version. Although a complete AOSP version would be amazing, I believe a lot of users would be happy if someone could take the current kernel based on Samsung sources, so everything around boot and driver/hardware initialization should work, and put some version of the AOSP interface on top of that. Similar to how the Google Play Editions used to work. Is that in any way feasible?
Click to expand...
Click to collapse
One of the things I have done is to take a hal library and substitute it on stock with an open source one. That have worked on the i9300 with gralloc.
---------- Post added at 08:29 AM ---------- Previous post was at 08:27 AM ----------
One thing I would need from our kernel devs is a dual boot kernel. Would it be possible @arter97?
tdcfpp said:
One of the things I have done is to take a hal library and substitute it on stock with an open source one. That have worked on the i9300 with gralloc.
---------- Post added at 08:29 AM ---------- Previous post was at 08:27 AM ----------
One thing I would need from our kernel devs is a dual boot kernel. Would it be possible @arter97?
Click to expand...
Click to collapse
Haha
I've been dualbooting my S6 since my kernel's debut.
This is a bit hacky, but it's working since S3 days.
This will give you a bit of an idea how it works :
https://bitbucket.org/arter97/andro...unt.sh?at=g920fi&fileviewer=file-view-default
First time I spun a CM build from bmc08gt sources, I dualbooted it with Touchwiz intact.
Obviously, ramdisk is not compatible. So to boot different ROMs, different boot.img would be needed but it's not a big deal (at least for me).
Even using the recovery as the handy multiboot solution is quite nice since I'd say the actual recovery won't be much needed during development.
BOOT = Touchwiz, RECOVERY = CM.
arter97 said:
Haha
I've been dualbooting my S6 since my kernel's debut.
This is a bit hacky, but it's working since S3 days.
This will give you a bit of an idea how it works :
https://bitbucket.org/arter97/andro...unt.sh?at=g920fi&fileviewer=file-view-default
First time I spun a CM build from bmc08gt sources, I dualbooted it with Touchwiz intact.
Obviously, ramdisk is not compatible. So to boot different ROMs, different boot.img would be needed but it's not a big deal (at least for me).
Even using the recovery as the handy multiboot solution is quite nice since I'd say the actual recovery won't be much needed during development.
BOOT = Touchwiz, RECOVERY = CM.
Click to expand...
Click to collapse
Well, I don't want to re-invent the wheel. Is it possible to dual boot with your s6 kernel?
tdcfpp said:
Well, I don't want to re-invent the wheel. Is it possible to dual boot with your s6 kernel?
Click to expand...
Click to collapse
By flashing the kernel each time, yes.
(Or using RECOVERY as a second kernel)
arter97 said:
Haha
I've been dualbooting my S6 since my kernel's debut.
This is a bit hacky, but it's working since S3 days.
This will give you a bit of an idea how it works :
https://bitbucket.org/arter97/andro...unt.sh?at=g920fi&fileviewer=file-view-default
First time I spun a CM build from bmc08gt sources, I dualbooted it with Touchwiz intact.
Obviously, ramdisk is not compatible. So to boot different ROMs, different boot.img would be needed but it's not a big deal (at least for me).
Even using the recovery as the handy multiboot solution is quite nice since I'd say the actual recovery won't be much needed during development.
BOOT = Touchwiz, RECOVERY = CM.
Click to expand...
Click to collapse
Couldn't we use an implementation of anykernel to allow ramdisk compatibility with cm and tw at the same time?
Xileforce said:
Couldn't we use an implementation of anykernel to allow ramdisk compatibility with cm and tw at the same time?
Click to expand...
Click to collapse
Multibooting with a single kernel requires multiple ramdisk to be in a single boot.img
Anykernel method is not suitable with this.
arter97 said:
Multibooting with a single kernel requires multiple ramdisk to be in a single boot.img
Anykernel method is not suitable with this.
Click to expand...
Click to collapse
Oh okay I see what you are referring to. I meant in terms of not multibooting. As in if we wanted to develop a kernel that would work on both tw and cm, probably the only way to do that would be anykernel correct?
Xileforce said:
Oh okay I see what you are referring to. I meant in terms of not multibooting. As in if we wanted to develop a kernel that would work on both tw and cm, probably the only way to do that would be anykernel correct?
Click to expand...
Click to collapse
Yes and it still requires some source changes to accommodate both CM and Touchwiz(MTP, etc) but still I don't like Anykernel method.
I will release 2 separate kernels if CM happens.
arter97 said:
Yes and it still requires some source changes to accommodate both CM and Touchwiz(MTP, etc) but still I don't like Anykernel method.
I will release 2 separate kernels if CM happens.
Click to expand...
Click to collapse
You got time ahead then.
arter97 said:
Yes and it still requires some source changes to accommodate both CM and Touchwiz(MTP, etc) but still I don't like Anykernel method.
I will release 2 separate kernels if CM happens.
Click to expand...
Click to collapse
Got it. I feared there may be some source changes. I've never been a fan of anykernel either.
Found out that this app is compatible with the s6. I'm wondering if the tool would be able to patch your kernel @arter97
http://forum.xda-developers.com/showthread.php?t=2447534
The good stuff: https://github.com/jcadduono/android_kernel_lge_msm8996/commits/android-7.0
Fork it!
Update: CAF branch has some problems at the moment, use this one instead for now.
So this is currently the v10d release. It's compatible with V20 Nougat v10d and G5 v20a.
Place toolchain (pick one up from here) in ~/build/toolchain & tar xf.
git clone https://[email protected]/yourname/android_kernel_lge_msm8996.git
If you want to change any config options:
./menuconfig.sh (optional target, ex. twrp or lge)
Ready?
./build.sh h850/h830/h918/us996/any model you want
Models are applied onto the target base defconfig, so your V20 kernels will build for all V20 variants and for all variants of the G5 as well.
Create your own by copying arch/arm64/configs/lge_defconfig to arch/arm64/configs/your-awesome_defconfig!
Grab:
build/arch/arm64/boot/Image.lz4-dtb [or] build/arch/arm64/boot/Image.gz-dtb
build/lib/modules
Place in:
https://github.com/jcadduono/lazyflasher/tree/kernel-flasher
make
You got yourself a magical all-powerful custom kernel installer, complete with your own custom kernel!
Notice that there's a few branches:
opensource is where I merge LG changes, when it's updated, android-7.0 is rebased on it
android-7.0 is a starting off point closest to absolute stock, base off here
android-7.0-security adds security and bug fixes from CAF on top of android-7.0 branch
twrp-7.0 is for Team Win Recovery Project (yes, it's ready, come with an unlocked device and I'll give it to you)
nethunter-7.0 is for the Kali NetHunter project (if you dare, some fun there)
Another issue was their weird build system, I dropped that. Replaced tuxera's exFAT prebuilt downloader with Samsung's GPL'd exFAT drivers instead. Unsure how well it works replacing it like that, we'll have to see.
I also added Qualcomm's Core Control which they just released the sources to somewhat recently. I believe it's already included on the G5 and probably V20 as a kernel module. Their released version doesn't have module support yet but it's fairly easy to add I guess with the leaked proprietary module version out there to pick pieces from.
Have fun!
Great Man !
thanks for this..
I've been following the root process since the beginning and I'm amazed at the relatively short amount of time it took. Huge kudos to @jcadduono! I will purchase this phone. Now, since the kernel needed to have it's encryption support modifed, are the patches added to a branch on your Github fork? I would like to compile a custom kernel, along with patching it with SultanXDA's SafetyNet boot bypass. Which branch will be appropiate to fork to flash on the TWRP/Rooted V20?
Thanks much @jcadduono! I'm going to start poking around in here and see if I can find anything particularly interesting.
zabracks said:
Thanks much @jcadduono! I'm going to start poking around in here and see if I can find anything particularly interesting.
Click to expand...
Click to collapse
Hey guys so I did get a kernel booting but not yet one built from CAF sources so it'll take a bit of work to figure out why.
There seems to be a couple occurrences of null pointer dereferences in early boot stage in both stock release and this CAF. Currently investigating (or trying to anyway, it's hard to find people that can flash my test builds and report back with logs - I do not own this phone)
jcadduono said:
Hey guys so I did get a kernel booting but not yet one built from CAF sources so it'll take a bit of work to figure out why.
There seems to be a couple occurrences of null pointer dereferences in early boot stage in both stock release and this CAF. Currently investigating (or trying to anyway, it's hard to find people that can flash my test builds and report back with logs - I do not own this phone)
Click to expand...
Click to collapse
I've got an H918, if you need somebody to test a kernel.
jcadduono said:
Hey guys so I did get a kernel booting but not yet one built from CAF sources so it'll take a bit of work to figure out why.
There seems to be a couple occurrences of null pointer dereferences in early boot stage in both stock release and this CAF. Currently investigating (or trying to anyway, it's hard to find people that can flash my test builds and report back with logs - I do not own this phone)
Click to expand...
Click to collapse
two things. Did you figure out how to compile boot.img or are you flashing the zimage? also hit me up on hangouts I've been wanting to dive into this device just looking for someone else to colaberate with.
EDIT: sent email in PM
albinoman887 said:
two things. Did you figure out how to compile boot.img or are you flashing the zimage? also hit me up on hangouts I've been wanting to dive into this device just looking for someone else to colaberate with.
EDIT: sent email in PM
Click to expand...
Click to collapse
I can compile it and flash it. There seems to be an issue with the sources LG has provided regarding display drivers. It seems any attempts at a stock kernel build results in a messed up screen once you hit the lock screen. I assume this has something to do with 2D graphics firmware and kernel framebuffer driver badly interacting. These sources are for v10b firmware, while the device appears to ship with v10d. I don't know if LG made any changes since then that could have caused this issue.
FYI the sources up right now are not my CAF merge, I had to move it to (same url but with -caf on the end) - I still have some issues to work out with the CAF merged sources (they aren't booting for whatever reason - not even TWRP).
It could take me a while to work on this as I still don't and likely never will own this device due to my lack of trust when it comes to LG.
jcadduono said:
I can compile it and flash it. There seems to be an issue with the sources LG has provided regarding display drivers. It seems any attempts at a stock kernel build results in a messed up screen once you hit the lock screen. I assume this has something to do with 2D graphics firmware and kernel framebuffer driver badly interacting. These sources are for v10b firmware, while the device appears to ship with v10d. I don't know if LG made any changes since then that could have caused this issue.
FYI the sources up right now are not my CAF merge, I had to move it to (same url but with -caf on the end) - I still have some issues to work out with the CAF merged sources (they aren't booting for whatever reason - not even TWRP).
It could take me a while to work on this as I still don't and likely never will own this device due to my lack of trust when it comes to LG.
Click to expand...
Click to collapse
sounds like the kgsl drivers. If you want we can work together on this. I want to get CM going too i just need some help. Im and experienced dev but havent jumped in the LG pool before. id look at the google pixel kernel source and grab the kgsl/adreno crap and update that.
i'll clone the source and check it out since i'm finally getting the stock rom downloaded (thanks for the wget tip)
jcadduono said:
I can compile it and flash it. There seems to be an issue with the sources LG has provided regarding display drivers. It seems any attempts at a stock kernel build results in a messed up screen once you hit the lock screen. I assume this has something to do with 2D graphics firmware and kernel framebuffer driver badly interacting. These sources are for v10b firmware, while the device appears to ship with v10d. I don't know if LG made any changes since then that could have caused this issue.
FYI the sources up right now are not my CAF merge, I had to move it to (same url but with -caf on the end) - I still have some issues to work out with the CAF merged sources (they aren't booting for whatever reason - not even TWRP).
It could take me a while to work on this as I still don't and likely never will own this device due to my lack of trust when it comes to LG.
Click to expand...
Click to collapse
which branch/repo is the one that boots but messed up display?
albinoman887 said:
sounds like the kgsl drivers. If you want we can work together on this. I want to get CM going too i just need some help. Im and experienced dev but havent jumped in the LG pool before. id look at the google pixel kernel source and grab the kgsl/adreno crap and update that.
i'll clone the source and check it out since i'm finally getting the stock rom downloaded (thanks for the wget tip)
Click to expand...
Click to collapse
Would absolutely LOVE to see CM on our phones! Not that it'll make things move faster, but I'll throw 100 bucks your way if it's done before Christmas
lightninbug said:
Would absolutely LOVE to see CM on our phones! Not that it'll make things move faster, but I'll throw 100 bucks your way if it's done before Christmas
Click to expand...
Click to collapse
I want Nethunter too
I'll be around to test any of the stuff, usually at night.
The v20 kernel is available on the lg open-source site, at least the h990 one is.
Sent from my LG-H990 using Tapatalk
---------- Post added at 03:36 PM ---------- Previous post was at 03:25 PM ----------
Artcrime said:
The v20 kernel is available on the lg open-source site, at least the h990 one is.
Sent from my LG-H990 using Tapatalk
Click to expand...
Click to collapse
There is v10d version for 918. opensource.lge.com forgive me if this is old news. a|c
albinoman887 said:
sounds like the kgsl drivers. If you want we can work together on this. I want to get CM going too i just need some help. Im and experienced dev but havent jumped in the LG pool before. id look at the google pixel kernel source and grab the kgsl/adreno crap and update that.
i'll clone the source and check it out since i'm finally getting the stock rom downloaded (thanks for the wget tip)
Click to expand...
Click to collapse
slayerh4x said:
I want Nethunter too
I'll be around to test any of the stuff, usually at night.
Click to expand...
Click to collapse
albinoman887 said:
two things. Did you figure out how to compile boot.img or are you flashing the zimage? also hit me up on hangouts I've been wanting to dive into this device just looking for someone else to colaberate with.
EDIT: sent email in PM
Click to expand...
Click to collapse
Sent from my LG-H990 using Tapatalk
I updated all the branches earlier today...should work fine now, so apparently was a source code issue that needed v10d update, not sure though no one's volunteered for testing (I don't do requests/testing over the forum, only on IRC)
Is a kernel the main thing stopping us from a CM rom?
what toolchain should we be using? got a link to a compiled one? i'm getting build errors I know are related to the toolchain but i've been out of the game for awhile. last i knew we needed gcc-4.9?
jcadduono said:
I updated all the branches earlier today...should work fine now, so apparently was a source code issue that needed v10d update, not sure though no one's volunteered for testing (I don't do requests/testing over the forum, only on IRC)
Click to expand...
Click to collapse
I'm there.
albinoman887 said:
what toolchain should we be using? got a link to a compiled one? i'm getting build errors I know are related to the toolchain but i've been out of the game for awhile. last i knew we needed gcc-4.9?
Click to expand...
Click to collapse
gcc-linaro-5.3.1-2016.05-x86_64_aarch64-linux-gnu.tar.xz .Be sure to change the PATH in menuconfig.sh
@jcadduono , thank you. You are truly an inspiration
Wondering if anyone can help me learn how to do this right...
So I was able to compile the kernel, but I didn't get an Image.gz (which im sure is fine). I did get an Image.lz4, Image.lz4-dtb, and Image (no extension). I figure only the .lz4* files are needed. I added all 3 to the lazyflasher, and ran make. The resulting zip flashed, but sent me straight to Bootloader. I then tried to fix by flashing the stock kernel, but this still did not boot. ReFlashed my ROM and it's booting now.
I used this toolchain gcc-linaro-5.3.1-2016.05-x86_64_aarch64-linux-gnu
Any guidance? My guess is it's flashing at the wrong point?
Here is the ZIP. DO NOT FLASH. This is only for someone who knows what they are looking at to tell me what is wrong with it. No modifications were done. Source was forked from OP, and compiled with default menuconfig, then build.sh h918
PS: The anime character "Haruhi Suzumiya" is copyright of its owner
PS: arise fix
Open up a file manager and go to the root folder. You need to have SuperSU installed for this
You'll see a folder called su, go to /su/su.d
In this folder create a text file, label it as "permissive.sh" and put the following code in
Code:
supolicy --live "permissive *"
Then save the file and go to recovery and flash arise and Dolby Atmos addons again and then reboot
It should now work
Stop reading my bs! Here's the download link
https://srv1.botstack.host:8000/oneplus/op2/custom-kernel-for-haruhios-v3.8-STABLE.zip
Or
http://srv1.botstack.host:9000/oneplus/op2/custom-kernel-for-haruhios-v3.8-STABLE.zip
This is a project that started as a kernel for my ROM and that is what it's going to be
It can be flashed on other ROMs too and I will gladly provide support however I can't guarantee results
Do note that this is a "secure" kernel. It has many of the security patches merged from CAF and selinux enforcing is forced with no way to go to permissive
What about v4a?
Get SuperSU and input these lines in a terminal
Code:
supolicy --live "allow mediaserver mediaserver_tmpfs:file { read write execute };
allow audioserver audioserver_tmpfs:file { read write execute };"
Wait for a few seconds, swipe away v4a from the recent apps list and launch it again. It should now work
Why isn't a thermal throttling tweak included inside this kernel?
Well in my usage the kernel is so fast that thermal throttling modifications are not needed. You can apply if you want
Currently known bugs?
Nothing
OMG you're copying boeffla!
Relax. I used boeffla's anykernel base as I was in a hurry and didn't have time to make my own zip. Also, boeffla's anykernel zip is one of the best around trust me
What are the features?
Too lazy to write, check back here in a few days but there are quite a lot of features you're gonna like
I'm a nerd, I support the GPL, I'm gonna take you down because you didn't release the source code and neither did you tell me whose toolchain you used!
Bro you need to take it easy
Toolchain: https://bitbucket.org/mdalexca/aarch64-linux-android-6.x
Kernel source: https://github.com/anupritaisno1/android_kernel_oneplus_msm8994_custom
I'll try it when there is ROM with new security patch. Looking forward to it!
NeoVsk said:
I'll try it when there is ROM with new security patch. Looking forward to it!
Click to expand...
Click to collapse
I don't care about other ROMs but I'm actively adding security patches into my kernel's source so relax
uuu, every time i see new thread, and especialy new kernel i'm goign crazy excited thanks and good luck!
btw, so this kernel is same that comes with halogenos?
chxei said:
uuu, every time i see new thread, and especialy new kernel i'm goign crazy excited thanks and good luck!
btw, so this kernel is same that comes with halogenos?
Click to expand...
Click to collapse
Not at all
Anyone else having slow charging speeds with this kernel? Usually I get around 1.9A, here I only get around 0.5A
NeoVsk said:
Anyone else having slow charging speeds with this kernel? Usually I get around 1.9A, here I only get around 0.5A
Click to expand...
Click to collapse
Known issue
anupritaisno1 said:
Known issue
Click to expand...
Click to collapse
Could you include fast charge in following builds?
NeoVsk said:
Could you include fast charge in following builds?
Click to expand...
Click to collapse
That was my mistake. I forked fast charging from halogenos without realizing that it never worked
This is something I sadly can't fix. You'll have to wait for halogenos devs to update this
Fast charge coming in next build like....
Camera bug fixed!
I don't usually gamble but when I do I buy note7
May we have two versions? A reverted version for the camera and the current one...? Some ROMs are behind and are not working properly with the new commits about camera. Sorry if I am saying something wrong. I am a noob on these
xarisCY said:
May we have two versions? A reverted version for the camera and the current one...? Some ROMs are behind and are not working properly with the new commits about camera. Sorry if I am saying something wrong. I am a noob on these
Click to expand...
Click to collapse
If you start the camera, my kernel fails to turn it off so the camera will be unavailable for use after the first time you use it and you'll have to reboot
I'm working on fixing this bug. Why are you interested in this bug?
Sorry, my mistake. I though was something different.. Sorry
Where can i download naruhi ROM?
Kernel has been updated
All known bugs squashed!
Seems cool but an enforcing only kernel has its downside for me. I'm not sure if arise works with an enforcing kernel, would love to see a permissive version as well.
anupritaisno1 said:
Kernel has been updated
All known bugs squashed!
Click to expand...
Click to collapse
Great job! But I'm still getting only about 700mA when charging
Although the Kernel make the ROM very smooth but it's not battery friendly.
playkish said:
Although the Kernel make the ROM very smooth but it's not battery friendly.
Click to expand...
Click to collapse
On my phone I can't find a difference between my kernel and stock
Also this is a cm kernel. Expect some general battery drain
That being said, I've really worked hard on wakelocks and doze
Hi got your quote on bens kernel page @anupritaisno1, could you explain me more about this kernel. I guess it will break the focus of my camera due to some new commits, etc as bens kernel v5 had done the same to me. Also, as im using bens RR Rom, will this have any bugs or side affects with that rom (i had flashed boeffla kernel and had to face a lot of problems on his rom such as the xposed modules becoming inactive or not performing after some time, etc.) and last main thing, idle battery drain