N915F kernel with SeLinux Permissive - done - Note Edge Android Development

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.

Related

build cm10.1 kernel

anyone know if it's feasible to build the cm10.1 kernel without syncing the entire source?
I've tried googling it numerous times but nothing came up pertaining to it. i did however find how to build the cm9 kernel without syncing the entire source, bit couldn't get it to build...
thanks if anyone can help me five my way
ztotherad said:
anyone know if it's feasible to build the cm10.1 kernel without syncing the entire source?
I've tried googling it numerous times but nothing came up pertaining to it. i did however find how to build the cm9 kernel without syncing the entire source, bit couldn't get it to build...
thanks if anyone can help me five my way
Click to expand...
Click to collapse
See the Aries kernel tree on my github. Its a slightly modified version of the cyanogenmod tree, and includes a build script and initramfs so syncing the entire source tree isn't necessary to build from it.
jt1134 said:
See the Aries kernel tree on my github. Its a slightly modified version of the cyanogenmod tree, and includes a build script and initramfs so syncing the entire source tree isn't necessary to build from it.
Click to expand...
Click to collapse
thanks. i was honestly waiting for you to come in here and tell me it won't work without syncing it all, lol. I'll check it out though. thanks again! you effin' rock!
ztotherad said:
thanks. i was honestly waiting for you to come in here and tell me it won't work without syncing it all, lol. I'll check it out though. thanks again! you effin' rock!
Click to expand...
Click to collapse
NP. Iirc, I originally added the scripts after you asked me about it a few months back
All you should have to do is clone the repo, and then run the build.sh script that's included. It will download the right toolchain for you, build the initramfs archives and then compile the kernel.
I also set it up to create a flashable zip with the new kernel and modules, so the build script should handle all the essential steps automatically.
jt1134 said:
NP. Iirc, I originally added the scripts after you asked me about it a few months back
All you should have to do is clone the repo, and then run the build.sh script that's included. It will download the right toolchain for you, build the initramfs archives and then compile the kernel.
I also set it up to create a flashable zip with the new kernel and modules, so the build script should handle all the essential steps automatically.
Click to expand...
Click to collapse
haha yeah, cause a few months back you said i had to sync the whole source.
it sounds like you've been working your ass off. lol
but that's definitely awesome. it makes it easier on us all.

[Kernel][4.4.2][P605] Permissive Stock Kernel (OB1)

So guys ive experimented a bit and found out how to compile a kernel from source. Some guys here are waiting for permissive kernel to install linux deploys etc. Here it is. Not perfect yet, but seems to work. Has nothing special features. Uses my ramdisk from my xKat Rom with init.d support. So please dont ask for more features!! Its mostly pure stock. When i try to build a custom kernel, i will make a new thread for it.
Download
Stock_KK_Permissive_Kernel_NG1-p605
Stock_KK_Permissive_Kernel_NJ1-p605
Stock_KK_Permissive_Kernel_OB1-p605
How to install
Download the file and place the Zip on your intern or extern memory.
boot into Recovery
go on install into TWRP
look for where you placed the Zip
click on the zip an slide to the right
after that go to reboot
How to set permissive?
Permissive is not activ on boot. So use the App "Terminal Emulator"
open it
type su
type setenforce 0
to check it type
getenforce
and you will see its permissive now. But only for this session. If you rebot your device it will enforcing again.
Better choice is the App "SElinux Mode Changer".
Install it from Play Store
and set on permissive
It works with any boot now.:good:
Troubleshooting
if you have trouble with WLAN, delete your connection onetime
reconnect to your accesspoint and WLAN will work again.
Picture
View attachment 2886592​
Please hit "thanks" and rate this thread if you like my work or buy me a beer
​
Good, thanks a lot. Did you face problem like me - when compiled zImage, updated boot.img using abootimg -u -k ../../arch/arm/boot/zImage ...
I was flashed it and get into download mode. Tablet sayed - cannot boot os or something similar. Sorry for bad english.
Great job. Works fine. Thx
@Tautvaldas
Didnt tried it yet. Ive made it on windows cause my ramdisk of the NG1 kernel was there.
i made mine too, i did all the stuff like uv and zzmove gov added in,, but got problem during flash, sad
will test your thanks
Can someone build kernel with framebuffer console support - http://blackfin.uclinux.org/doku.php?id=linux-kernel:drivers:fbcon
@hanspampel
A noob question - but it's better to be sure before start doing something
Moreover - you are the only who made a custom kernel for this device :highfive:
So: is it true I should only replace boot.img with original one (from original tar.md5 package) and change "misc" file with "ro.securestorage.support=true" to obtain zip recovery for flashing original kernel back?
Hi
Yepp it should work this way.
So added to this kernel the latest NJ1 ramdisk. Download in OP.
hanspampel said:
So added to this kernel the latest NJ1 ramdisk. Download in OP.
Click to expand...
Click to collapse
Isn't NK1 the latest one? Or no difference as for kernel part?
Yepp your right. NK1 is the latest, but my rom uses the dbt where is NJ1 the latest. But the NG1 works on NJ1 FW too. So i think there is no real modification on samsung side. Beside there is no another update from sources for p605 available. So that means, is there a modification from samsungs side, then only in ramdisk. This is why i changed it to NJ1 one. Maybe there is one who knows.
hanspampel said:
Yepp your right. NK1 is the latest, but my rom uses the dbt where is NJ1 the latest. But the NG1 works on NJ1 FW too. So i think there is no real modification on samsung side. Beside there is no another update from sources for p605 available. So that means, is there a modification from samsungs side, then only in ramdisk. This is why i changed it to NJ1 one. Maybe there is one who knows.
Click to expand...
Click to collapse
OK, and what about latest P605XXUDOB1?
Hi, sorry for late reply. So there is no newer update of kernel sources available. Only changing of ramdisk of newer fws is possible. But nobody knows if there are changes between the fws.
So added to this kernel the latest OB1 ramdisk. Download in OP.
hanspampel said:
So added to this kernel the latest OB1 ramdisk. Download in OP.
Click to expand...
Click to collapse
Thank you very much for not forgetting this project!
Just installed it - works well!
Hi hanspampel....can you help me,to make usb otg and charge make possible on the p605. I have the lavalink adapter tl-002,but wont work. Must be a kernel thing......would be phantastic.....
Gesendet von meinem SM-N9005 mit Tapatalk
hanspampel,
are you going to continue your work for 5.1.1?
Official sources for the kernel are already published here.
Yes i know. But atm i have not a building system runnig. So maybe if i found some time to setup all the stuff, we can get a new kernel. maybe. Not now, not tomorrow.

[Kernel Source / Tutorial] Custom Kernel 101

This thread is NOT for general Q & A about using the kernel or configuring a specific version.
This thread IS for sharing source code or attempting to apply debugging to code changes.
In English: This is what a development thread really looks like. No downloads, No user manual.
Note to Mods: OT is welcome, so long as it is relevant to the kernel developer experience
Building the kernel 101:
A clean branch with only the build tools, ramdisks, and MacOS updates is at:
https://github.com/StarKissed/starkissed-kernel-trlte/tree/master
The stockish branch adds Linux patches, mainline updates, and SELinux mods
The deported branch is the customized version described in the OP feature list
You are going to need a few things, especially if building this kernel for MacOS.
GCC 4.7 (This is the version Samsung's documentation listed)
An updated mkbootimg (Must have DTS support)
A dtbtool (Included in the source, but only for Linux)
Insomnia (Not a requirement, but it will help you in the long run)
For MacOS, the tools are available from the following repositories:
https://github.com/StarKissed/android-toolchain-eabi-4.7
https://github.com/StarKissed/starkissed-build-tools
Let's jump ahead a moment for those of you who have built kernels and notice your boot.img is only around 11 MB while the versions you see listed here are all roughly 14 MB. This is where the new mkbootimg and dtbtool are necessary.
Attempting to retrieve the commandline arguments from the boot.img will not tell you one important piece:
Code:
./dtbtool -o dt.img -s 4096 -p ../scripts/dtc/ ../arch/arm/boot/dts/
chmod a+r dt.img
mkbootfs (ramdisk creation)
mkbootimg (mkbootimg params) --dt dt.img
This takes the DTSI that was built into a dtb as one of the first steps in the compile process and turns it into an image that is appended to the end of the boot.img. The dt.img just happens to be about 3 MB. (11 MB + 3 MB = 14 MB)
If you grabbed the original Samsung kernel source, you may notice that their default compile script directs the build to an "out" folder in the root of the kernel directory.
The obvious advantage to this is that their clean command runs into some errors, so the clean process is simply deleting the "out" folder and making a new one.
This doesn't work for a lot of the custom components you may want to add to your kernel, though. Some modifications, such as intelli-thermal, rely on a subdirectory that is referenced in the Makefile.
Building to this out folder will result in an error because it cannot find the output of that component, but building in the tree, or actual source, will also result in an error. The lesser of two evils is to fix in-tree builds.
Code:
Instructions for TRACE_INCLUDE_FILE in include/trace/define_trace.h say
"the path is relative to define_trace.h, not the file including it".
Fix in-tree compilation by making the path relative to define_trace.h.
What this means is that when you have a line that refers to the TRACE_INCLUDE_PATH or an include reference to a file that uses a relative location instead of a global, these need to be updated
The only two files that currently require updates in the stock source code are
Code:
drivers/scsi/ufs/ufs_test.c
#include -> #include "../sd.h"
and
Code:
drivers/video/msm/mdss/mdss_mdp_trace.h
#define TRACE_INCLUDE_PATH . -> #define TRACE_INCLUDE_PATH ../../drivers/video/msm/mdss/
If you want to be able to debug your kernel, you will need to enable last_kmsg.
Open up the arch/arm/configs/apq8084_sec_defconfig and add
Code:
CONFIG_SEC_DEBUG_NOCACHE_LOG_IN_LEVEL_LOW=y
CONFIG_PRINTK_PROCESS=y
CONFIG_SEC_DEBUG_LOW_LOG=y
More to come soon...
This is a great idea!
Looking fwd to seeing this thread take off...it will be very interesting for sure.
Sent from my SM-N910W8 using Tapatalk 2
@ktoonsez im back ready to play my man 
 @twistedumbrella my man i hope i dont become a ball buster on this thread but i have the 1st 2 questions on this thread:
1. How do you patch your kernels? (i use the p1 command.. is there another way?)
2. How did you manage to make the OC values show?
Disclaimer: I may have a lot of follow up questions
friedrich420 said:
@ktoonsez im back ready to play my man
@twistedumbrella my man i hope i dont become a ball buster on this thread but i have the 1st 2 questions on this thread:
1. How do you patch your kernels? (i use the p1 command.. is there another way?)
2. How did you manage to make the OC values show?
Disclaimer: I may have a lot of follow up questions
Click to expand...
Click to collapse
I use git am -3 so that any issue defaults to a merge then git mergetool to resolve it.
Switching the index in the dtsi that was modified was the only change to show it that I remember needing.
https://github.com/StarKissed/stark...mmit/695abe187620acf513b33237042925d60a99f0c1
friedrich420 said:
@ktoonsez im back ready to play my man
@twistedumbrella my man i hope i dont become a ball buster on this thread but i have the 1st 2 questions on this thread:
1. How do you patch your kernels? (i use the p1 command.. is there another way?)
2. How did you manage to make the OC values show?
Disclaimer: I may have a lot of follow up questions
Click to expand...
Click to collapse
Im back too.
ktoonsez said:
Im back too.
Click to expand...
Click to collapse
right on
any thoughts my man?
friedrich420 said:
right on
any thoughts my man?
Click to expand...
Click to collapse
Im in the process of just starting over from the "F" source and looking for testers on INTL thread. I wish I didnt have to start over but looks like Im going to have to
ktoonsez said:
Im in the process of just starting over from the "F" source and looking for testers on INTL thread. I wish I didnt have to start over but looks like Im going to have to
Click to expand...
Click to collapse
we know for sure that your source without bfq works fine... now its a matter of figuring out what of all the additions from yesterday's source to today's source caused the bootloop..
friedrich420 said:
we know for sure that your source without bfq works fine... now its a matter of figuring out what of all the additions from yesterday's source to today's source caused the bootloop..
Click to expand...
Click to collapse
I wonder if its any of the top 4 commits from here:
https://github.com/ktoonsez/KTNOTE4/commits/tw4.4?page=2
ktoonsez said:
I wonder if its any of the top 4 commits from here:
https://github.com/ktoonsez/KTNOTE4/commits/tw4.4?page=2
Click to expand...
Click to collapse
give me a little bit of time and ill revert it manually and compile again the one i compiled in the afternoon (your morning)
I got lost in Freedom Wars for a bit. I need to figure out an issue with thermal then I'll be back
friedrich420 said:
give me a little bit of time and ill revert it manually and compile again the one i compiled in the afternoon (your morning)
Click to expand...
Click to collapse
Here is a test one starting all over again, just has OC and Voltage control:
http://ktoonsez.jonathanjsimon.com/note4/TW/KT-NOTE4-KK4.4-TW-N910-11.13.2014D.zip
ktoonsez said:
Here is a test one starting all over again, just has OC and Voltage control:
http://ktoonsez.jonathanjsimon.com/note4/TW/KT-NOTE4-KK4.4-TW-N910-11.13.2014D.zip
Click to expand...
Click to collapse
Unfortunately same bahavior my man..
friedrich420 said:
Unfortunately same bahavior my man..
Click to expand...
Click to collapse
LOL, really? I just had 3 people boot up successfully, finally. You have the "F" or the "G"?
EDIT:
The guy I am testing with has the "G".
ktoonsez said:
LOL, really? I just had 3 people boot up successfully, finally. You have the "F" or the "G"?
Click to expand...
Click to collapse
the F...
friedrich420 said:
the F...
Click to expand...
Click to collapse
Just edited my post above, the guy that is answering me quick has the "G". Now Im really getting PISSED!!!!!!!!!! WTH!!
ktoonsez said:
Just edited my post above, the guy that is answering me quick has the "G". Now Im really getting PISSED!!!!!!!!!! WTH!!
Click to expand...
Click to collapse
Did anyone diff the ramdisk? If not, I can throw the two in git and see if anything lights up. I have the visual editor for Mac for exactly that.
ktoonsez said:
Just edited my post above, the guy that is answering me quick has the "G". Now Im really getting PISSED!!!!!!!!!! WTH!!
Click to expand...
Click to collapse
this may or may not confuse you more...
i made a test git repository : https://github.com/friedrich420/Note4-AEL-Kernel2
all i did was cherry pick your oc and voltage control commits..
It booted im running it @2.99ghz right now and its fine...
Could it be that you need the F source my man?
twistedumbrella said:
Did anyone diff the ramdisk? If not, I can throw the two in git and see if anything lights up. I have the visual editor for Mac for exactly that.
Click to expand...
Click to collapse
I started with stock N910F ramdisk in version "C", version "D" went back to my original universal ramdisk you can try the "C" and see if anything changes:
http://ktoonsez.jonathanjsimon.com/note4/TW/KT-NOTE4-KK4.4-TW-N910-11.13.2014C.zip
friedrich420 said:
this may or may not confuse you more...
i made a test git repository : https://github.com/friedrich420/Note4-AEL-Kernel2
all i did was cherry pick your oc and voltage control commits..
It booted im running it @2.99ghz right now and its fine...
Could it be that you need the F source my man?
Click to expand...
Click to collapse
That is exactly what I just merged in so the "D" that wont boot for you is pretty much the same thing, lol. See what happens on the "C" version which is stock N910F ramdisk.

[Q] Exynos 5433 dtbTool binary

I will shortly be the owner of a Samsung Galaxy Note Edge SM-N915S (Korean Exynos 5433) device and have downloaded the kernel sources and successfully compiled the zImage.
The problem is:
After compile the zImage, I think I will need a Exynos 5433 dtbTool binary to create a master dt.img for boot.img re-pack. (There is a dt.img inside the stock boot.img). I have tried the qualcomm dtbTool but it shows 0 images. Although I'm just a "hack" and don't profess to be a Dev, my build environment is setup correctly as I've built many Exynos and also Qualcomm kernels (with dt.img) in the past.,
One thing I do notice though is that 5433 is not found in SM-N915-SkyHigh-Kernel/arch/arm/boot/dts/Makefile , all Exynos are commented out. Maybe they need to be added in as well so any working dtbTool will make the dt.img ?
In my defconfig (not committed to github), I try also with
Code:
CONFIG_BUILD_ARM_APPENDED_DTB_IMAGE=y
CONFIG_BUILD_ARM_APPENDED_DTB_IMAGE_NAMES=""
If anyone [ @AndreiLux - @ketut.kumajaya - @xiaolu ] could please share a suitabe Exynos 5433 dtbTool binary or further guidance would be much appreciated.
Why would you even do this. The kernel image is a normal image as has always been AFAIK.
Not a real solution for you but some great information: https://github.com/kumajaya/android_kernel_samsung_universal5422/blob/master/README.md, https://github.com/kumajaya/android...mmit/26a6298340a2ff09fd00fad8ca53c32118a1527a, and https://github.com/kumajaya/mkdtbhbootimg
Upload the original boot.img also a good idea, I'll analysis it in my spare time.
AndreiLux said:
Why would you even do this. The kernel image is a normal image as has always been AFAIK.
Click to expand...
Click to collapse
My SM-T705 5420 kernel doesn't have a dt.img
within the stock boot.img, the SM-N915S does. As i said, Qualcomm Note 3 N9005 was similar having the dt.img and requiring it made after compiling zImage. It needed to be included with boot.img for OC functions etc to work. I was thinking the same thing for the 5433, but doesn't look like it.
ketut.kumajaya said:
Not a real solution for you but some great information: https://github.com/kumajaya/android_kernel_samsung_universal5422/blob/master/README.md, https://github.com/kumajaya/android...mmit/26a6298340a2ff09fd00fad8ca53c32118a1527a, and https://github.com/kumajaya/mkdtbhbootimg
Upload the original boot.img also a good idea, I'll analysis it in my spare time.
Click to expand...
Click to collapse
Thanks, I'll take a read tomorrow and upload the stock boot.img if needed.
I've just managed to compile a basic kernel and re-pack into stock ramdisk + dt.img using the mkbootimg_dtb binary and flashed successfully. Haven't tried yet whether it'll flash without the dt.img though.
Just wonder what's the use of it when nothing is made in kernel source?
Thanks for sparing your time guys, , appreciated.
Cheers.
UITA
deleted .......... just woke up
@AndreiLux
New something was missing............. Thanks for committing it and sharing the rest of your work.
I see some of your commits for the 5433 Makefile and more. Cheers mate !
UpInTheAir said:
@AndreiLux
New something was missing............. Thanks for committing it and sharing the rest of your work.
I see some of your commits for the 5433 Makefile and more. Cheers mate !
Click to expand...
Click to collapse
Did you test it out? I didn't actually use that DTB yet.
AndreiLux said:
Did you test it out? I didn't actually use that DTB yet.
Click to expand...
Click to collapse
Just added as you did, but adjusted for my device: exynos5433-trlte_eur_open_12.dtb. zImage compiled OK and have only briefly tested kernel repack and boot. Haven't had much more time at hand than that afraid. Can't use my source as Sammy needs to update it for newer firmware base (no wifi/data connectivity, baseband or recognise SIM etc)..............
An old dtbtool binary still didn't see it, I assume it's in-built via the Makefile (didn't check terminal log) ? But suppose to re-pack it with the boot.img though.......
UpInTheAir said:
Just added as you did, but adjusted for my device: exynos5433-trlte_eur_open_12.dtb. zImage compiled OK and have only briefly tested kernel repack and boot. Haven't had much more time at hand than that afraid. Can't use my source as Sammy needs to update it for newer firmware base (no wifi/data connectivity, baseband or recognise SIM etc)..............
An old dtbtool binary still didn't see it, I assume it's in-built via the Makefile (didn't check terminal log) ? But suppose to re-pack it with the boot.img though.......
Click to expand...
Click to collapse
https://github.com/kumajaya/mkdtbhbootimg/issues/1
I'll still have to make something to automate the extracting and packing of that process.
AndreiLux said:
https://github.com/kumajaya/mkdtbhbootimg/issues/1
I'll still have to make something to automate the extracting and packing of that process.
Click to expand...
Click to collapse
Fingers and toes crossed here. Far beyond my comprehension, but of course keen to know of more development.

For devs: Looking to play with the kernel sources?

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

Categories

Resources