[KERNEL] Semi-Stock Kernel for Galaxy S8 and S8+ (Snapdragon)

Search This thread

xdauser'17

Senior Member
Jun 27, 2017
149
38
How are you building the kernel? It did for me when I built at least.

Alright, I did more confirmation, still no luck.
My phone is galaxy s8 sm-g9500 china mainland variant, snapdragon. I got the source code from here ( http://opensource.samsung.com/reception/receptionSub.do?method=sub&sub=F&searchValue=sm-g9500). I tried all 3 versions except the HK one.
To compile it, I used these commands:
Code:
export CROSS_COMPILE=/home/liu/android-ndk-r14b/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/bin/aarch64-linux-android-
export ARCH=arm64
mkdir out
export OUTPUT_DIR=out
make -C $(pwd) O=$(pwd)/out KCFLAGS=-mno-android dreamqlte_chn_open_defconfig
make -C $(pwd) O=$(pwd)/out KCFLAGS=-mno-android -j16
Then I got the 'Image', 'Image.gz' and 'Image.gz-dtb' 3 kernel files. Next, use the 'mkbootimg_tools' from github to unpack the stock boot.img, edit the files in ramdisk, and repack the boot.img with one of the image files. I tried both 'Image.gz' and 'Image.gz-dtb'. The first one boot into download mode instantly, the second stuck there, both of them are shown a 'kernel is not seandroid enforcing' message. It doesn't show any hope to get work...
 
Last edited:

Cameron581

Senior Member
Mar 28, 2013
618
705
Alright, I did more confirmation, still no luck.
My phone is galaxy s8 sm-g9500 china mainland variant, snapdragon. I got the source code from here ( http://opensource.samsung.com/reception/receptionSub.do?method=sub&sub=F&searchValue=sm-g9500). I tried all 3 versions except the HK one.
To compile it, I used these commands:

Then I got the 'Image', 'Image.gz' and 'Image.gz-dtb' 3 kernel files. Next, use the 'mkbootimg_tools' from github to unpack the stock boot.img, edit the files in ramdisk, and repack the boot.img with one of the image files. I tried both 'Image.gz' and 'Image.gz-dtb'. The first one boot into download mode instantly, the second stuck there, both of them are shown a 'kernel is not seandroid enforcing' message. It doesn't show any hope to get work...
Ohhh! Did you flash cameron.zip?
 

xdauser'17

Senior Member
Jun 27, 2017
149
38
Ohhh! Did you flash cameron.zip?

Actually not, but I think it's already done by the 'semi-stock kernel' zip, because I checked the sha1 sum of these files:
/system/vendor/lib/libsecure_storage.so
/system/vendor/lib/libsecure_storage_jni.so
/system/vendor/lib64/libsecure_storage.so
/system/vendor/lib64/libsecure_storage_jni.so
And it seems they are the same to the files in the cameron.zip.
Sorry I haven't flashed it yet because I haven't fully backed up the data in my phone, and I want everything are undo-able now... :p
If I'm wrong, please let me know, and I will backup and try it. Thanks again. :)
 

Cameron581

Senior Member
Mar 28, 2013
618
705
Actually not, but I think it's already done by the 'semi-stock kernel' zip, because I checked the sha1 sum of these files:
/system/vendor/lib/libsecure_storage.so
/system/vendor/lib/libsecure_storage_jni.so
/system/vendor/lib64/libsecure_storage.so
/system/vendor/lib64/libsecure_storage_jni.so
And it seems they are the same to the files in the cameron.zip.
Sorry I haven't flashed it yet because I haven't fully backed up the data in my phone, and I want everything are undo-able now... :p
If I'm wrong, please let me know, and I will backup and try it. Thanks again. :)
How are you installing your boot image?
 

Cameron581

Senior Member
Mar 28, 2013
618
705
In twrp, select install - install image - boot.img.
And also tried to use commands in twrp terminal
That's so strange... G9550 didn't have that issue but I was also using jesecs source. I'll compare the two's defconfigs later Monday and probably overlap source with his and see what was all different that he modified
 
  • Like
Reactions: xdauser'17

travis82

Senior Member
Jan 8, 2011
1,524
1,689
38
Marysville, Washington
I was lookin at getting the 128gb model too at a second hand mobile store. You all still having issues with a kernel rom? I would think the only difference is partition sizes that twrp uses. I recall on s7 edge that I had to disable a lot of security stuff in the kernel to get it to function correctly and do a bit of ramdisk edits also. It's not to difficult just tedious.
 

Cameron581

Senior Member
Mar 28, 2013
618
705
I was lookin at getting the 128gb model too at a second hand mobile store. You all still having issues with a kernel rom? I would think the only difference is partition sizes that twrp uses. I recall on s7 edge that I had to disable a lot of security stuff in the kernel to get it to function correctly and do a bit of ramdisk edits also. It's not to difficult just tedious.
So it's not so much a kernel issue as it is I think the source issue since it's a honkong rom with chn kernel so the battery is terrible with system taking up a massive amount but I've been focusing on LOS far more than any kernel stuff ATM.

---------- Post added at 12:23 AM ---------- Previous post was at 12:21 AM ----------

I was lookin at getting the 128gb model too at a second hand mobile store. You all still having issues with a kernel rom? I would think the only difference is partition sizes that twrp uses. I recall on s7 edge that I had to disable a lot of security stuff in the kernel to get it to function correctly and do a bit of ramdisk edits also. It's not to difficult just tedious.
You work with Sean! I knew I saw your name before XD Sean's actually been helping me with the source for this for Los :3 I have vendor up and everything except inits and msm8998.mk and a few other things before building but most of the foundation is done!
 
Last edited:

xdauser'17

Senior Member
Jun 27, 2017
149
38

Attachments

  • Screenshot_20171023-081327.png
    Screenshot_20171023-081327.png
    154.1 KB · Views: 127

travis82

Senior Member
Jan 8, 2011
1,524
1,689
38
Marysville, Washington
So it's not so much a kernel issue as it is I think the source issue since it's a honkong rom with chn kernel so the battery is terrible with system taking up a massive amount but I've been focusing on LOS far more than any kernel stuff ATM.

---------- Post added at 12:23 AM ---------- Previous post was at 12:21 AM ----------


You work with Sean! I knew I saw your name before XD Sean's actually been helping me with the source for this for Los :3 I have vendor up and everything except inits and msm8998.mk and a few other things before building but most of the foundation is done!

Where is your device tree? Im fighting a crashy ril and audio card not wanting to be brought up but external codecs are seen on C9 maybe ill take a break from C9 and look at S8+ G9550.
 

travis82

Senior Member
Jan 8, 2011
1,524
1,689
38
Marysville, Washington
Good start, device.mk needs to be filled out and your vendor tree do all those files pull when you run the extract script? Camera needs chromatix and a lot more files. Config files are missing for sensors and what not. You could probably use ril-caf to bring up ril. Just what I noticed at first glance.
 

xdauser'17

Senior Member
Jun 27, 2017
149
38
See on g9550 it just wrecked my system with system os of over 30% so he must of done something else in the patch of the fact that I'm using China open based kernel source and maybe he kept HK local or something

Another weird thing, with semi-stock kernel, they're 4 extra icons,
Knox II Settings
Knox Settings
Phone
Messages
In other words, I got two 'phone' and two 'messages' icons.
 

Attachments

  • Screenshot_20171023-164012.jpg
    Screenshot_20171023-164012.jpg
    85.3 KB · Views: 115

Top Liked Posts

  • There are no posts matching your filters.
  • 11
    Semi-Stock Kernel
    for Galaxy S8 and S8+ (Snapdragon)


    LICENSE:
    Kernel sources:
    GPL 2.0: https://www.gnu.org/licenses/gpl-2.0.html

    Kernel binaries, patches to system, ramdisk modifications, etc.:
    Code:
    You can use, mirror, modify and/or integrate it/them with your own works, WITHOUT inform me, subject to the following conditions:
    1. Credit MUST be given. (a possible form: thanks *** for ***)
    2. Warranty is NOT provided. I am not responsible for any possible losses. 
    3. Authorization may be TERMINATED for selected person without prior notice under certain conditions (subject to my sole discretion). 
    4. Above conditions must be preserved. (You have the responsibilities to inform your users about these conditions. A possible way is to add "LICENSE: (link to this post)" to "thanks *** for ***")

    Features:
    • Kernel Security Features, Root Restrictions are DISABLED
    • Versioning: RELEASE x

    Download:
    RELEASE 1:
    https://www.androidfilehost.com/?fid=961840155545582162

    NOTE:
    1. You need to flash root package (Magisk or SuperSU) AFTER flash kernel if you want root access.

    Show your appreciation:
    Click Thanks!, Rate 5-star or/and Donate to me. ;)

    Get informed about news and updates:
    Join Official Telegram Channel

    XDA:DevDB Information
    Jesse's Kernel for Galaxy S8 and S8+ (Snapdragon), Kernel for the Samsung Galaxy S8

    Contributors
    jesec
    Source Code: https://github.com/jesec/android_kernel_samsung_msm8998

    Kernel Special Features:

    Version Information
    Status: Stable

    Created 2017-07-16
    Last Updated 2017-07-16
    2
    173992641623209104%253Faccount_id%253D0

    So franken kernel is alive atm I also got magisk running :) gotta package it up and fix it on a source level but if you wanted a super jankety version i can have on up :)
    2
    oK first time I didnt so I redid all the steps and installed your image to boot.
    phone boots but when you restart it manually it shows secutity Error screen and the phone does not start.

    I will need to use Odin again.
    Let it sit at that Seandroid error it will boot eventually
    2
    Anybody onboard to take part of a bounty to have a working kernel for S8+ 128Gb HK? Seems like Jesec is not around anymore and I am definitely willing to pay to have magisk working on my S8+
    2
    Add me for 20. I think we won't be long to reach a decent sum (for "just" a kernel)
    Just got the device, the reason that the kernel wont boot is due to a partitioning issue with the fstab. When my device arrives i should hopefully begin working on a kernel :) stay tuned!