yashsingh1/xdaforums huggingface dataset:
[Samsung Galaxy S9 & S9+ Cross Device Development] xdauser'17:
This is an awesome answer, I've learned a lot. THANK YOU SO MUCH!

I've tried a lot these days, and everything works very well right now.

To disable for encryption, I changed "forceencrypt" to "encryptable",

and removed ",quota" in the end,

in "/system/vendor/etc/fstab.qcom" file.

Then I replaced the original libsecure_storage.so with yours (yes it does work). [MENTION=6424744]tomatolei[/MENTION] also sent me some patched NVRAM file for wifi, I put them in "/system/vendor/etc/wifi", set proper permission bits/selinux contexts, and created a symlink to it in /system/etc

ln -s ../vendor/etc/wifi /system/etc/wifi

wifi is now working too!

And yes, I've also removed ",verify" in dts, to disable dm-verity, just like tomatolei suggested.

Again, thanks to all you guys who provided me these valuable info. Without your help, it's impossible for me to do this. :)
[Samsung Galaxy S9 & S9+ Cross Device Development] saxmydix:
I mean custom rom like lineage and others.
[Samsung Galaxy S9 & S9+ Cross Device Development] ma_t14:
Sources for BRG6 are now available.
[Samsung Galaxy S9 & S9+ Cross Device Development] ianmacd:
I don't know enough about them, to be honest. I don't know what extra work would be needed to make this kernel work with them.
[Samsung Galaxy S9 & S9+ Cross Device Development] ianmacd:
All in good time. I'm currently on holiday, and I don't yet have a device running BRG6 on which to test. That probably applies to most users at this point, too.

I probably won't recompile against BRG6 until DevBase is rebased on it, which should be in just a few days.
[Samsung Galaxy S9 & S9+ Cross Device Development] saxmydix:
Thanks for answering, how about working on existing tree based like los? Btw, your work is great, thanks.
[Samsung Galaxy S9 & S9+ Cross Device Development] ianmacd:
I don't have a device that runs LOS, and I don't really have the capacity to widen the scope of this project at the moment. I'm happy to assist anyone who does, though.
[Samsung Galaxy S9 & S9+ Cross Device Development] emphazer:
i have some bad news... are you sure that you want to keep The SELINUX_DEVELOP flag disabled?

the past days i really made intensive tests with your kernel.

I told you everything works fine with selinux enforced. but with your v7 release I noticed after 2 days that my whole security concept isn't working anymore. I'm talking about fake gps over xposed privacy etc etc...

I switched back to v6... still same problem... in the end I had to restore a 1 week old data backup. dunno why.

I compiled your v7 kernel by myself with SELINUX_DEVELOP on.

I had and have no problems anymore.

I can run everything in enforced too. no problems at all.

pls consider about turning it on again in v8.

I guess the xposed modules but just some parts for that user on permissive. and that's not possible anymore if you turn it off.

thanks and best wishes,

chris
[Samsung Galaxy S9 & S9+ Cross Device Development] ianmacd:
Can you please be more specific about what you mean when you say that your "whole security concept isn't working any more"?

You mention "fake GPS over Xposed privacy", but I'm not sure what you mean by this. Android's mock locations feature certainly doesn't require SELinux permissive mode.

You also say you "can run everything in enforced too" when you recompile with CONFIG_SELINUX_DEVELOP enabled, but the only thing that CONFIG_SELINUX_DEVELOP does it make it possible to switch between enforcing and permissive modes. Voluntarily running the kernel in enforcing mode with CONFIG_SELINUX_DEVELOP enabled is therefore technically no different than being forced to run the kernel in the same mode with CONFIG_SELINUX_DEVELOP disabled.

Whatever problems you are having, I can't imagine how they could be related to CONFIG_SELINUX_DEVELOP having been removed from the kernel. My own S9+ is running APGK 0.99.7 together with a whole slew of Magisk and Xposed modules, and I have experienced no issues whatsoever. The only problem you may encounter is with modules that expect to be able to switch SELinux to permissive mode. That obviously won't work. Any module happy to run with SELinux in enforcing mode, however, should present no problems at all with CONFIG_SELINUX_DEVELOP disabled.

Likewise, nothing about removing CONFIG_SELINUX_DEVELOP should have led to you needing to restore a back-up of your data. The file-system is totally unaffected. Can you be more specific about the symptoms that led you to this action?

There just has to be another explanation for your problems. Check your logs. If you see any evidence that the kernel is causing your problems, post the logs and I'll investigate.
[Samsung Galaxy S9 & S9+ Cross Device Development] simo255:
hello

your kernel is awesome

i managed to get 5h+ of sot, thank you !
[Samsung Galaxy S9 & S9+ Cross Device Development] yodainascoda:
As you see he mentions xposed fake gps which runs permissive its not the kernel its more the xposed modules no log has been shown so until such time no worries imo
[Samsung Galaxy S9 & S9+ Cross Device Development] emphazer:
thats exactly what i ment

thx
[Samsung Galaxy S9 & S9+ Cross Device Development] ianmacd:
Version 0.99.8 released

From the roasting recesses of the Morvan region in France, and uploaded to the world over two baked bean cans and a length of string, comes this latest nugget for your delectation. As usual, handle with care, treat with suspicion, etc.

Change log

Updated to upstream Linux 4.9.116.

Rebased to Samsung's BRG6 kernel source code, including boot image updates.

Updated WireGuard to v0.0.20180731.

Disabled process authenticator daemon (pa_daemon) via init.local.rc in boot image.
[Samsung Galaxy S9 & S9+ Cross Device Development] kangshoo:
have a nice holiday！nice kernel！
[Samsung Galaxy S9 & S9+ Cross Device Development] riso123:
I may be doing something wrong, but I only get the pre boot splash screen on my device when flagging this latest version. I'm on the correct ROM version BRG6. Any ideas?
[Samsung Galaxy S9 & S9+ Cross Device Development] Sora94:
Great! I Was waiting for this one, thanks a lot for your great work.
[Samsung Galaxy S9 & S9+ Cross Device Development] Baercity:
If you are coming from Flash-Kernel you have to flash the BRG6 vendor before.
[Samsung Galaxy S9 & S9+ Cross Device Development] riso123:
Is there a flashable zip I can download for that?
[Samsung Galaxy S9 & S9+ Cross Device Development] Baercity:
http://www.soldier9312.de
[Samsung Galaxy S9 & S9+ Cross Device Development] riso123:
Nice one. Cheers mate.

---------- Post added at 08:08 PM ---------- Previous post was at 08:02 PM ----------

Strange. Even flashing soldiers stock kernel doesn't allow the device to boot :confused:
[Samsung Galaxy S9 & S9+ Cross Device Development] Baercity:
Did you flashed the vendor?
[Samsung Galaxy S9 & S9+ Cross Device Development] riso123:
You mean the kernel or firmware?
[Samsung Galaxy S9 & S9+ Cross Device Development] Baercity:
Take a look to this folder http://www.soldier9312.de/#firmware
[Samsung Galaxy S9 & S9+ Cross Device Development] riso123:
Yeah I just tried flashing this, but no go unfortunately.
[Samsung Galaxy S9 & S9+ Cross Device Development] Baercity:
You flashed this file - Flashable_G96XF_Vendor_BRG6_r4.zip?

Flash vendor -> kernel -> root
[Samsung Galaxy S9 & S9+ Cross Device Development] riso123:
I'm using his ROM though. Won't that break something?

---------- Post added at 09:17 PM ---------- Previous post was at 09:11 PM ----------

Done and working. Many thanks for your help and persistence :)
[Samsung Galaxy S9 & S9+ Cross Device Development] ianmacd:
Version 0.99.9 released

For those fighting a losing battle against their OCD and looking for an excuse to flash something, hot on the heels of 0.99.8 and fresh from le fournille du Morvan comes this new bundle of bits to tickle your fancy.

Change log

v0.99.9 (2018-08-04)

Updated to upstream Linux 4.9.117.

Updated WireGuard to v0.0.20180802.

Removed ondemand and conservative CPU governors, as these (now) cause an immediate reboot on these devices.
[Samsung Galaxy S9 & S9+ Cross Device Development] emphazer:
works very good.

btw,

i had immediate reboot on interactive governor too.

can anybody confirm?
[Samsung Galaxy S9 & S9+ Cross Device Development] ianmacd:
Ah, yes. It's not immediate on my device, but it doesn't take very long. This one may need to be disabled, too.
[Samsung Galaxy S9 & S9+ Cross Device Development] emphazer:
yes, it happens on higher cpu load.
[Samsung Galaxy S9 & S9+ Cross Device Development] Noxxxious:
Mentioned in post 4 about govs.
[Samsung Galaxy S9 & S9+ Cross Device Development] ianmacd:
Post #4 merely asks, somewhat rhetorically, why anyone would want to use alternative governors. It says nothing about the stability of doing so.

Personally, I never use anything but schedutil. The others were included in the original release simply because other kernels offer them, and to do so was trivial.
[Samsung Galaxy S9 & S9+ Cross Device Development] woodman:
Thread cleaned.

If you could be back on track now, that would be great guys :good:

Thanks

Wood Man

Senior Moderator
[Samsung Galaxy S9 & S9+ Cross Device Development] yodainascoda:
Nice work you come along way from telegram feew months ago im glad you shut them up with presenting a good kernel where other ""devs"" are way under par
[Samsung Galaxy S9 & S9+ Cross Device Development] simo255:
hello,

can i flash the latest version of the kernel while im in brf8?
[Samsung Galaxy S9 & S9+ Cross Device Development] ianmacd:
Version 0.99.10 released.

Another minor point release for the inveterate kernel junkies amongst you.

Change log

Updated to upstream Linux 4.9.118.

Removed interactive CPU governor, as this (now) leads to a reboot on these devices.
[Samsung Galaxy S9 & S9+ Cross Device Development] emphazer:
are you going to update your github repo too?
[Samsung Galaxy S9 & S9+ Cross Device Development] ianmacd:
Yes. Sorry. I forgot to push the changes. It's up-to-date now.
[Samsung Galaxy S9 & S9+ Cross Device Development] emphazer:
thx a lot my friend.

i wish you a good night
[Samsung Galaxy S9 & S9+ Cross Device Development] yodainascoda:
very nice work
[Samsung Galaxy S9 & S9+ Cross Device Development] ianmacd:
Version 0.99.11 released.

This maintenance release removes support for the three remaining alternative CPU governors, which, whilst functional, yield no benefit on these devices.

Change log

Updated to upstream Linux 4.9.119.

Updated WireGuard to v0.0.20180809.

Removed ondemand, powersave and userspace CPU governors, as these provide no benefit on these devices. The only supported governor is now schedutil.
[Samsung Galaxy S9 & S9+ Cross Device Development] Sora94:
By far my favorite kernel, thanks for the speedy updates, always up to date and the most balanced kernel I've tried so far.

Also did you by any chance see the recent changes on noto kernel? Did you find anything interesting to implement?
[Samsung Galaxy S9 & S9+ Cross Device Development] ianmacd:
I still need to go through those commits. I've been busy with travel this last week, but when I get a few moments, I'll read through them.

If there's anything in particular you have in mind, feel free to suggest it. One thing to bear in mind is that Notorious sets out to achieve improved overall device performance at the expense of battery life. I'm happy to make any tweak to APGK that results in improved responsiveness, so long as there's no trade-off for stability, and little or no trade-off for battery performance.
[Samsung Galaxy S9 & S9+ Cross Device Development] babyboy3265:
So I am currently using this Kernel with SOLDIERS ROM. I guess it is a good combo. Probably some more battery life wouldn't harm but I understand it is not easy to achieve that...

Below is a screenshot showing a few details. I left the notification panel slightly open to also show what EK Kernel Manager predicts.
[Samsung Galaxy S9 & S9+ Cross Device Development] ianmacd:
Version 0.99.12 released.

Change log

Updated to upstream Linux 4.9.120.

Further installer refinements.
[Samsung Galaxy S9 & S9+ Cross Device Development] ianmacd:
I have since gone through the NK 1.03 release and didn't see anything that was an obvious candidate for inclusion in APGK. NK 1.04 should be out soon, however, and that may be a different story.
[Samsung Galaxy S9 & S9+ Cross Device Development] MidnightDevil:
Question (and I'm sorry if someone asked before, but my search seems to be missbehaving), does it work with the Note9 port Rom?

Many thanks :)
[Samsung Galaxy S9 & S9+ Cross Device Development] ianmacd:
Version 0.99.13 released.

Another day, another maintenance release.

This kernel was built against Samsung's BRGA kernel source. However, I couldn't find a source for a BRGA stock boot image that would download quickly enough from my current location, so I used the boot image from the newer BRH1 firmware after verifying that it was 100% compatible. In fact, the only difference between the BRH1 boot image and that of BRG6 (which the previous release of APGK was still based on) is a one line addition to audit_filter_table. The only reason APGK itself isn't yet built against BRH1 kernel source is that Samsung hasn't yet released this update in source form.

Change log

Updated to upstream Linux 4.9.122.

Rebased to Samsung's BRGA kernel source code; boot image rebased to BRH1.

EDIT: I should add that, whilst I typically recommend against mixing and matching system components compiled against different versions of the Samsung sources, running this BRGA-based kernel in combination with BRH1-based firmware, such as the latest version of [MENTION=5150393]_alexndr[/MENTION]'s DevBase, presents no obvious problems.
[Samsung Galaxy S9 & S9+ Cross Device Development] energyword:
can you add the use of Dex with any hdmi adapter? thank you

Inviato dal mio SM-G965F utilizzando Tapatalk
[Samsung Galaxy S9 & S9+ Cross Device Development] ianmacd:
I will add this for the next release. Thanks for the suggestion.

If you tell me your handle on Telegram and which device you're using, I'll send you a boot image to test before release.
[Samsung Galaxy S9 & S9+ Cross Device Development] ianmacd:
Version 0.99.14 released.

It's that time again.

Change log

Updated to upstream Linux 4.9.123.

Samsung DeX should now work (= untested) with any model of HDMI adapter. [Requested by [MENTION=3899440]energyword[/MENTION], and reported not working.]
[Samsung Galaxy S9 & S9+ Cross Device Development] energyword:
Thank's [MENTION=5747880]alex_it[/MENTION] on Telegram

Inviato dal mio SM-G965F utilizzando Tapatalk
[Samsung Galaxy S9 & S9+ Cross Device Development] ianmacd:
The feature has already been added to 0.99.14, released today.

Please let me know whether it works.
[Samsung Galaxy S9 & S9+ Cross Device Development] babyboy3265:
May I ask, those updates of Linux Upstream, how do they affect the device, in layman terms? :D

Thank you.
[Samsung Galaxy S9 & S9+ Cross Device Development] energyword:
however it does not work, but it could be my hdmi adapter because it does not even go with els kernel soldier

Inviato dal mio SM-G965F utilizzando Tapatalk
[Samsung Galaxy S9 & S9+ Cross Device Development] Eamo5:
This also appears to be broken on notorious too
[Samsung Galaxy S9 & S9+ Cross Device Development] energyword:
so you're telling me that on S9 + it does not work at the moment?

Inviato dal mio SM-G965F utilizzando Tapatalk
[Samsung Galaxy S9 & S9+ Cross Device Development] Eamo5:
Not at the moment, however from memory I think faro was going to fix it in NK v104. I think. Anyway when V104 drops, it'll hopefully work again
[Samsung Galaxy S9 & S9+ Cross Device Development] xFirefly93:
Improved specifc device security, kernel hardening, newer kernel patches/driver updates and so on.

:)
[Samsung Galaxy S9 & S9+ Cross Device Development] ianmacd:
Sorry about that. I'll look into what else is needed to make it work.
[Samsung Galaxy S9 & S9+ Cross Device Development] energyword:
no problem, thanks for the excellent kernel that makes us available

Inviato dal mio SM-G965F utilizzando Tapatalk
[Samsung Galaxy S9 & S9+ Cross Device Development] Baercity:
With your latest version of this brilliant kernel my banking app is working again probably.

Thank you!
[Samsung Galaxy S9 & S9+ Cross Device Development] ianmacd:
Whilst I'd love APGK to take the credit for that, I think you must have changed some other aspect of your system, too.
[Samsung Galaxy S9 & S9+ Cross Device Development] Baercity:
I'am pretty sure that no other condition changed on my phone. If I switch to soldiers latest (or any other version) ELS kernel my banking app (for NFC payment) does not work. When switch back to your latest kernel solve the issue. The App works as it shall.

Soldier's patched stock kernel works also fine...
[Samsung Galaxy S9 & S9+ Cross Device Development] Eamo5:
I believe this is due to an issue with Soldier's build of ELS rather than APGK fixing something. People have reported issues with banking apps on Soldier's ELS in the telegram chat
[Samsung Galaxy S9 & S9+ Cross Device Development] UberBock:
well ELS is set to permissive and APGK is set to enforcing....could that be why
[Samsung Galaxy S9 & S9+ Cross Device Development] ianmacd:
Version 0.99.15 released.

Something for the weekend.

I've reinstated the ability to query the kernel about its own config. This feature was removed in 0.99.7, but there is really no good reason not to offer it.

Change log

Updated to upstream Linux 4.9.124.

Removed non-functioning Samsung DeX universal HDMI adapter code added in 4.9.123.

Reinstated support for extracting kernel config from kernel image or running kernel.
[Samsung Galaxy S9 & S9+ Cross Device Development] ianmacd:
Yes. I was thinking the same thing. In any case, offering a kernel with SELinux in permissive mode by default is a very bad idea in my opinion.
[Samsung Galaxy S9 & S9+ Cross Device Development] emphazer:
true, but a kernel with selinux in enforced by default and the develop flag=y could fix the Problem.

even if you keep enforced mode
[Samsung Galaxy S9 & S9+ Cross Device Development] farovitus:
ELS is the base and it have selinux set to Enforce as in stock. Soldier compile ELS base along with his own changes and mods, so ELS by default contain no such issue at all. Also, you should ask your kernel dev to stick with Enforce IF he is using Permissive state.

Users should read more about what ELS offer and then maybe check GitHub source for more info.
[Samsung Galaxy S9 & S9+ Cross Device Development] xdauser'17:
Making DeX work even without plugging in anything would be more fancy. Just use /sys filesystem as a trigger to activate it, then connect to keyboard/mouse and mirror screen... it'll be awesome. :D Maybe im a bit crazy. :p
[Samsung Galaxy S9 & S9+ Cross Device Development] Lord_KivO:
Latest magisk update(0827-1) from your repo soft bricked my device :) Could you please check it.
[Samsung Galaxy S9 & S9+ Cross Device Development] WhoIsJohnGalt1979:
Not sure what went wrong at your end, but I flashed the same build and it works perfectly fine at my end, booted just fine along with APGK on Soldier's 7.4 ROM

Would help if you could share more details. Were you in the process of changing magisk builds as in soldier's magisk builds to Ian's magisk builds or were you already on Ian's magisk build and you were just updating a daily build post which you came across a bottloop etc.
[Samsung Galaxy S9 & S9+ Cross Device Development] Lord_KivO:
I was on Ian`s build and soldier 7.4 . After update on magisk manager via Ian's repo my phone rebooted directly to download mode.I recovered via flashing whole rom again.I'm not sure what went wrong but i'll give it another try.

*edit

I deleted the zip file in magisk folder, redownloaded volaa :) problem solved.Thx for the reply.
[Samsung Galaxy S9 & S9+ Cross Device Development] ianmacd:
Version 0.99.16 released.

This maintenance release fixes a minor bug in the scheduling code.

Change log

The definition of MAX_LOAD_AVG in the EHMP code was not dependent on the configured PELT decay rate. (Thanks to [MENTION=9116297]Eamo5[/MENTION] for spotting this omission.)
[Samsung Galaxy S9 & S9+ Cross Device Development] kykint:
Could you add Korean variants, G96xN, to device name detection as well? Been using your kernel on it for a while without any noticeable problems, at least with soldier's rom. Thanks!
[Samsung Galaxy S9 & S9+ Cross Device Development] ianmacd:
Thanks for the suggestion.

I'll add N device recognition to the installer for the next release.
[Samsung Galaxy S9 & S9+ Cross Device Development] ianmacd:
Version 0.99.17 released.

This maintenance release introduces installation support for 'N' (Korean) model devices, as requested by [MENTION=5441270]kykint[/MENTION].

Change log

Updated to upstream Linux 4.9.125.

Updated WireGuard to v0.0.20180904.

Installer now permits installation on 'N' model devices.
[Samsung Galaxy S9 & S9+ Cross Device Development] iampatricktan:
Thanks for the update. Installed with Soldier's ROM..
[Samsung Galaxy S9 & S9+ Cross Device Development] ianmacd:
Version 0.99.18 released.

Change log

Updated to upstream Linux 4.9.126.
[Samsung Galaxy S9 & S9+ Cross Device Development] pixelmatt:
Your Kernel is the best one i tried until now. (i think i tried all of the available ones...)

Nevertheless, I would have a suggestion to make your kernel even better.:)

Is it possible to create an installation program in which you implement your own build of Magisk so that we can flash both (kernel and magisk) immediately?

Thank you very much:)
[Samsung Galaxy S9 & S9+ Cross Device Development] ianmacd:
Thank you for the kind words. I've been quite pleasantly surprised by this kernel's popularity.

If you copy both the APGK and Magisk zips to your device, you can queue them and flash one after the other in TWRP.

It may also be possible to build something into my installer that automatically chains installation of the latest build of Magisk found on your SD card.

If, however, what you're looking for is pre-rooted boot images, that would add significant complexity and size to the installer.
[Samsung Galaxy S9 & S9+ Cross Device Development] pixelmatt:
Thanks for your answer:good::)

I know i can queue zips within TWRP, but i thought on a solution like it is used by the TGP-Kernel. There you could choose Magisk as root method.

However, I do not know if that's a pre rooted boot image.

If you could build a solution to chain the installation, that would be great.:)

Thank you for all your efforts and keep up the good work.:good:
[Samsung Galaxy S9 & S9+ Cross Device Development] tomiga:
This kernel is frickin' awesome. I've been using it for a few months now and haven't had any issues with it. Will definitely keep using this unless I decide to make the jump to LineageOS.

Also for the record, this kernel seems to work just fine with Treble ROMs, just as an added bonus.
[Samsung Galaxy S9 & S9+ Cross Device Development] ianmacd:
Version 0.99.19 released.

This maintenance release brings a new time-saving feature in the installer.

It's now possible to cause Magisk to be automatically installed after installing APGK. The mechanism to make use of this facility is explained in the FAQ of the original posting, but basically requires you to maintain a directory of Magisk versions on your external SD card, and to indicate your desire to auto-flash Magisk by either renaming the APGK ZIP file or by creating a specially named file on your external SD card.

When these conditions are met, the APGK installer will determine the latest version of Magisk on your external SD card and automatically install it after flashing the kernel.

Change log

Updated to upstream Linux 4.9.127.

Updated WireGuard to v0.0.20180910.

Installer will now optionally automatically chain installation of Magisk. (Feature requested by [MENTION=6396450]pixelmatt[/MENTION])

UPDATE:

I should add that Samsung's latest firmware versions continue to feature no changes to the stock kernel or ramdisk. What this means for APGK users is that they may install the latest version of APGK on any version of the S9/S9+ firmware from BRGA up to and including at least BRI1 without fear of any side-effect.