[KERNEL][OREO] [SM-T830/T835] [2019-11-21] Modesty 1.0.0 [Linux 4.4.202] [ARK4] - Samsung Galaxy Tab S4 ROMs, Kernels, Recoveries, &

Modesty - a modest custom kernel for the Samsung Tab S4
Modesty aims to provide a mildly appealing and reasonable alternative to the stock 4.4.78 kernel that comes with The Tab S4. In its pursuit of being both mildly appealing and reasonable, it will eschew features that could compromise device stability, whilst gleefully embracing low-risk, self-contained enhancements. In other words, your lowest expectation should be that this kernel will be at least as stable as the stock kernel.
Since there are currently no other custom kernel projects supporting the Tab S4, there isn't really any previous device-specific work to build on. Development of this kernel is therefore likely to be slow and steady.
"Why is this kernel called Modesty? That's crap! Why not Wolverine, Intrepid or Jupiter?"
Because it's just a operating-system kernel, not a turbo-charged supercar or a mission into outer space. Even as operating-system kernels go, this one is pretty dull. Besides, I'm a weary curmudgeon in his fifties, not a teenager.
This project has the modest aim of modestly enhancing the pleasure you derive from your Tab S4 and is therefore modestly named Modesty.
Key characteristics
Supports both the wi-fi only (T830) and wi-fi/LTE (T835) models.
Forked from Samsung's pristine kernel source code (Linux 4.4.78 for ARGH firmware at time of launch).
Regular merging of the upstream Linux kernel's linux-4.4.y branch (4.4.161 at time of public launch).
Regular merging of Samsung's updates to its modified kernel source as they are made available.
Includes @savoca's KCAL advanced colour/gamma control driver.
Includes @flar2's sound control driver to manage headphone and microphone gain.
Disables a huge amount of tracing and logging features inexplicably left enabled by Samsung in the stock release kernel. These debugging features have no place outside engineering builds.
Packed into a boot.img (boot image) taken directly from Samsung's latest stock firmware and kept as close to the original as possible. No obscure boot-time kernel configuration is stashed away here, and no changes are made to any other part of the file system at either install time or run time.
Provides a fully automated installer, with the option of interactive installation to allow manual selection of features and the ability to automatically root the device with Magisk in the post-installation phase.
Includes WireGuard VPN support (version 0.0.20180818 at the time of public launch), which will be updated as available.
Includes @Lord Boeffla's generic kernel wakelock blocker. The conservative default block-list is: qcom_rx_wakelock and NETLINK.
Utilises Westwood+ TCP congestion algorithm by default.
Includes Veno TCP congestion algorithm.
SELinux operates in enforcing mode and cannot be dynamically switched to permissive mode.
FAQ
Q. Is this kernel still actively developed?
A. No. The final ianmacd release was v1.0.0 on 21st November 2019 and no-one else has picked up maintenance of the project.​
Q. Will this kernel also run on Android 9.0 (Pie) devices?
A. No. Modesty targets Android 8.1 (Oreo) and there was never an intention to update it for 9.0 (Pie).​
Q. Can I overclock or underclock the CPU using this kernel?
A. No.​
Q. How does interactive installation mode work?
A. If the ZIP file name contains the string _interactive or a dot-file called .modesty_interactive is present in the root of the external SD card, interactive installation mode is triggered. Please note that this mode overrides any selections implied by the archive name or the presence of dot-files on the file-system.
In interactive mode, you will be asked whether to root the device afterwards with Magisk. Selections are made using the Volume buttons. Just follow the on-screen prompts.​
Q. Can I safely block wakelock X?
A. Perhaps. However, unless you know what a particular wakelock does and are certain that it is causing an actual problem on your device, I suggest you leave it alone.​
Q. Why is this kernel labelled beta? Is it safe to use? And who are you, anyway? Can you be trusted?
A. My T830 has been running this kernel every day since I first rooted it, and I can therefore personally vouch for its stability on this model.
A couple of users have reported Modesty running well on the T835. Initially, it was reported that the kernel did not boot on this model, but after trying several test kernels, the user in question discovered that his machine had a non-standard firmware installation. Once this situation was remedied, Modesty booted and worked as designed.
As the person who built the kernel, I know exactly what's in it, and therefore the only risk I'm exposing myself to when I run it is that of my own incompetence. That's not true for you, however, and you should exercise due caution and at least pause for a moment to consider what you are installing, and the far-reaching powers you are about to grant this unaudited code over your device. Although I link to the source code below, you have only my word for it that this bears any resemblance to the kernel actually provided in the installer.
There are likely to be many iterations of this kernel before it sees a 1.0 release. Features may be added or removed along the way, although there is no clear roadmap at this point in time. Development will go where the needs of the users take it.
Please see the Installation section below for an important note regarding the use of this kernel in combination with stock (i.e. unmodified) Samsung firmware.​
Q. Can I safely root this kernel?
A. Of course. What use would it be if you couldn't? I recommend Magisk for the task. It has a few minor issues, but as a project is very much alive, something that cannot be said about its peers. Magisk has arguably now established itself as the de facto root solution for Android devices.
It just so happens that I also produce my own builds of Magisk, which you are welcome to use. These are release builds (as opposed to debugging builds), produced from my own fork of @topjohnwu's original source, often augmented with patches. You can use anyone's builds, though.
Again, these builds work for me on various Samsung devices, but they are unofficial and you should approach them with fitting caution.​
Q. Can I install Magisk at the same time as Modesty?
A. Yes. The Modesty installer allows you to automatically root your device with Magisk following installation of Modesty..
To make use of this facility, either rename the Modesty zip file to contain the string _magisk or create a file called .modesty_magisk in either the root of your external SD card or in the standard Download directory of the internal SD card. Alternatively, you can utilise interactive installation mode. See above for details.
If any of these trigger conditions is met, the installer will look in the standard internal Download directory as well as in ./Magisk (if present) on the external SD card (if present) for a suitable Magisk zip file to install. Preference is given to versioned files matching the glob Magisk-v*, in which case the latest according to lexical sort order will be used. If none is found, the installer then looks for unversioned release builds (e.g. official Canary channel release builds) called magisk-release.zip in the same locations, selecting the one with the most recent timestamp. If none is found, the installer will then try to find unversioned debug builds (e.g. official Canary channel debug builds) called magisk-debug.zip, again picking the one with the most recent timestamp. Finally, the installer falls back to looking for the most recent file called Magisk.zip or magisk.zip. If still no files have been found by this stage, chaining of Magisk is abandoned.
For example:
Code:
star2lte:/ $ ls -l /storage/0000-0000/.modesty_magisk
-rwxrwx--x 1 root sdcard_rw 0 2018-09-15 14:31 /storage/0000-0000/.modesty_magisk
star2lte:/ $ ls /storage/0000-0000/Magisk/Magisk-* | tail -n 3
/storage/0000-0000/Magisk/Magisk-v17.2-2018091001-ianmacd.zip
/storage/0000-0000/Magisk/Magisk-v17.2-2018091201-ianmacd.zip
/storage/0000-0000/Magisk/Magisk-v17.2-2018091501-ianmacd.zip
When you flash the Modesty archive in TWRP, the most recent version of Magisk that could be found will now be used to automatically root your kernel, i.e. Magisk-v17.2-2018091501-ianmacd.zip in this example.​
Q. Why doesn't Modesty have its own Telegram group?
A. Because my experience of Android-themed Telegram groups is that they invariably degenerate into seething cesspits of rudeness, ignorance, superstition and — on a good day — pseudo-science. I don't wish to police such a den of iniquity. Of course, it's a free world (or so I still like to kid myself), so you are at liberty to create your own Telegram group for Modesty if you wish. Just please don't invite me to it.​
Building
Building the kernel from source is beyond the scope of this document. If you want to build this kernel from scratch, for example to change its configuration, start with this handy reference tailored to building kernels for Android.
Download
See posting #2 in this thread for links to the latest and all previous versions.
Known Issues
Bluetooth HID (input) devices do not work.
Versions 0.99.11 to 0.99.22 contained a bug that caused Bluetooth HID (input) devices, such as mice, keyboards and gamepads, not to function. They could be paired with the tablet, but their input was not recognised. This bug was finally traced and fixed in 0.99.23.​
Installation
Make a back-up of your existing boot partition using the custom recovery environment provided by TWRP. If your device doesn't yet have TWRP, you will need to install it first. Then, use it to flash the Modesty ZIP file. The boot image will automatically be installed in the boot partition of your device.
If your device has unmodified Samsung firmware, you will encounter problems with Bluetooth (namely delayed initialisation and forgotten pairings) after installing this or any other custom kernel. To remedy this, you will need to patch your system with modified libsecure_storage.so libraries. Some custom kernel installers actually install these without telling you, overwriting your system libraries and transparently circumventing the problem before you can run into it. This approach necessarily modifies your device's file-system, however, and that may not be what you want. At the very least, the user should be made aware what is happening to his device.
For this reason, I have instead prepared a companion Magisk module that achieves the same goal without modifying the file-system. This will allow you to run a custom kernel (not just this one, but any custom kernel) on pristine stock firmware without any Bluetooth issues. The module can be found in the official Magisk module repository, accessible from Magisk Manager on your tablet. If you install this Magisk module, you may wish to also disable the secure_storage_daemon by editing /system/etc/init/secure_storage_daemon.rc (change start to stop), as it no longer serves a purpose.
In a similar vein, you may encounter authentication errors when connecting to wireless networks after installing this or any other custom kernel. This problem is not serious and easily remedied by re-entering your passphrase for the networks you use.
Finally, if SecurityLogAgent notifies you that unauthorised actions have been detected, do not be alarmed. This is a normal consequence of having installed a custom kernel. You may wish to disable SecurityLogAgent to avoid being repeatedly notified..
Whilst the above issues are the only ones you can expect to encounter when running this kernel vs. the stock Samsung kernel, they may sound like more trouble than they're worth. In that case, you might be happier just sticking to Samsung's stock kernel. The company supplies a perfectly good kernel straight from the factory.
Configuration
You are encouraged to use either @morogoku's excellent MTweaks (a modified version of Kernel Aduitor) or @flar2's EX Kernel Manager to manage the features provided by this kernel.
Source code
Modesty's GitHub repository.
References
A useful guide to CPU governors, I/O schedulers (and more).
For more information on the some of the individual schedulers included in this kernel, you can also look under Documentation/block in the kernel source.
The WireGuard user guide, control app, home page and source code.
Credits
Thank you to everyone in the Linux kernel universe for getting us this far. Within the Android development community, I am grateful to the following people for their time-saving contributions:
@osm0sis for Android Image Kitchen, which has saved me a huge amount of work in packing and unpacking boot images.
An honorary mention must go to @Chainfire, the extent of whose benefaction to the Android community is still not fully understood or appreciated in some quarters.

Change log
v1.0.0 (final ianmacd release) (2019-11-21)
Kernel proclaimed stable. Version number incremented. No code changes since v0.99.49.
v0.99.49 (2019-11-16)
Updated to Linux 4.4.202.
v0.99.48 (2019-11-13)
Updated to Linux 4.4.201.
v0.99.47 (2019-11-11)
Updated to Linux 4.4.200.
v0.99.46 (2019-11-06)
Updated to Linux 4.4.199.
v0.99.45 (2019-10-31)
Updated to Linux 4.4.198.
v0.99.44 (2019-10-19)
Updated to Linux 4.4.197.
v0.99.43 (2019-10-08)
Updated to Linux 4.4.196.
v0.99.42 (2019-10-07)
Updated to Linux 4.4.195.
v0.99.41 (2019-09-22)
Updated to Linux 4.4.194.
v0.99.40 (2019-09-16)
Updated to Linux 4.4.193.
v0.99.39 (2019-09-11)
Updated to Linux 4.4.192.
Fixes unavailability of external SD card in Modesty 0.99.38.
v0.99.38 (2019-09-08) Release withdrawn (External SD card unavailable)
Updated to Linux 4.4.191.
v0.99.37 (2019-08-26)
Updated to Linux 4.4.190.
v0.99.36 (2019-08-12)
Updated to Linux 4.4.189.
v0.99.35 (2019-08-07)
Updated to Linux 4.4.188.
v0.99.34 (2019-08-05)
Updated to Linux 4.4.187.
v0.99.33 (2019-07-23)
Updated to Linux 4.4.186.
v0.99.32 (2019-07-12)
Updated to Linux 4.4.185.
v0.99.31 (2019-06-28)
Updated to Linux 4.4.184.
v0.99.30 (2019-06-22)
Updated to Linux 4.4.183.
v0.99.29 (2019-06-18)
Updated to Linux 4.4.182.
v0.99.28 (2019-06-12)
Updated to Linux 4.4.181.
v0.99.27 (2019-05-17)
Updated to Linux 4.4.180.
v0.99.26 (2019-04-28)
Updated to Linux 4.4.179.
v0.99.25 (2019-04-07)
Updated to Linux 4.4.178.
v0.99.24 (2019-03-26)
Updated to Linux 4.4.177.
Build only the latest revision of the DTB.
v0.99.23 (2019-03-02)
Fixed bug, introduced in v0.99.11, that caused input from Bluetooth HID devices, such as keyboards, mice and gamepads to be ignored.
v0.99.22 (2019-02-23)
Updated to Linux 4.4.176.
v0.99.21 (2019-02-20)
Updated to Linux 4.4.175.
v0.99.20 (2019-02-11)
Updated to Linux 4.4.174.
v0.99.19 (2019-02-08)
Updated to Linux 4.4.173.
v0.99.18 (2019-01-26)
Updated to Linux 4.4.172.
v0.99.17 (2019-01-17)
Updated to Linux 4.4.171.
v0.99.16 (2019-01-13)
Updated to Linux 4.4.170.
v0.99.15 (2018-12-30)
Rebased on ARK4 kernel source code and boot images.
v0.99.14 (2018-12-23)
Updated to Linux 4.4.169.
Merged four more UPSTREAM commits from android-4.4 kernel branch.
v0.99.13 (2018-12-13)
Updated to Linux 4.4.167.
Merged selected BACKPORT and UPSTREAM commits from android-4.4 kernel branch.
v0.99.12 (2018-12-05)
Updated to Linux 4.4.166.
Realtek USB Ethernet driver upgraded from v2.08.0 to v2.10.00.
v0.99.11 (2018-11-29)
Updated to Linux 4.4.165.
KCAL advanced colour/gamma control driver optimisation.
Added @flar2's sound control driver for controlling headphone and microphone gain. (Configure with MTweaks or EX Kernel Manager).
v0.99.10 (2018-11-21)
Updated to Linux 4.4.164.
Added KCAL advanced colour/gamma control driver. (Configure with MTweaks or EX Kernel Manager).
Lots of tracing and debug logging disabled, further reducing kernel size.
CONFIG_DISPLAY_USE_INFO
CONFIG_SEC_DISPLAYPORT_LOGGER
CONFIG_FB_MSM_MDSS_XLOG_DEBUG
CONFIG_SEC_FILE_LEAK_DEBUG
CONFIG_SEC_DEBUG_USER
CONFIG_SEC_DEBUG_SUMMARY
CONFIG_SCSI_UFSHCD_CMD_LOGGING
CONFIG_MSM_SMEM_LOGGING
CONFIG_PROFILING
CONFIG_DEBUG_INFO
CONFIG_SCHED_DEBUG
CONFIG_SEC_PM_DEBUG
CONFIG_CORESIGHT
Built as monolithic kernel (i.e. without CONFIG_MODULES).
Built as relocatable code (CONFIG_RELOCATABLE_KERNEL).
Assembler symbols stripped (CONFIG_STRIP_ASM_SYMS set).
Embedded kernel config (reported via /proc/config.gz) now falsely reports stock settings to allow disabling of superfluous kernel features that otherwise cause grave Android System warning on boot.
v0.99.9 (2018-11-13)
Rebased on ARJ3 kernel source code and boot images.
v0.99.8 (2018-11-10)
Updated to Linux 4.4.163.
More than 100 fixes applied from upstream AOSP android-4.4 and android 4.4-o branches.
Lots of tracing and debug logging disabled:
CONFIG_IPC_LOGGING (debug logging for IPC drivers)
CONFIG_QCOM_RTB (register tracing)
CONFIG_TRACER_PKT (for tracing IPC protocols)
CONFIG_FTRACE (kernel tracing infrastructure)
CONFIG_CPU_FREQ_SWITCH_PROFILER (CPU frequency switch profiler)
CONFIG_TRACING_EVENTS_GPIO (traces GPIO subsystem)
Fixes to allow kernel to build when above logging and tracing options are disabled.
v0.99.7 (2018-10-30)
Rebased on ARH5 kernel source code.
Reworked the v4l2 fix that restores liboemcrypto-dependent apps to working state.
v0.99.6 (2018-10-28)
v4l2 fixes to restore liboemcrypto-dependent apps to working state.
v0.99.5 (2018-10-21)
Updated to Linux 4.4.162.
v0.99.4 (2018-10-19)
Initial public release, based on Linux 4.4.161.
v0.99.3
Internal build, based on Linux 4.4.160.
v0.99.2
Internal build, based on Linux 4.4.159.
v0.99.1
Initial internal build, based on Linux 4.4.78.

It begins! Awesome to finally see a custom kernel for the Tab S4.

I want to test for you once I can get root back

ianmacd said:
Change log
v0.99.4 (2018-10-19)
Initial public release, based on Linux 4.4.161. Caution: This kernel remains completely untested on the T835.
v0.99.3
Internal build, based on Linux 4.4.160.
v0.99.2
Internal build, based on Linux 4.4.159.
v0.99.1
Initial internal build, based on Linux 4.4.78.
Click to expand...
Click to collapse
Flashed on T835 device doesnt even get past the Boot (custom device) screen is there a way to get logs without using a computer?
Sent from my Samsung SM-G950F using XDA Labs

dr460nf1r3 said:
Flashed on T835 device doesnt even get past the Boot (custom device) screen is there a way to get logs without using a computer?
Click to expand...
Click to collapse
I'll look into it this evening. I'm just about to get off a plane.
Were there any errors when installing? Was your device properly detected as a T835?
Sent from my SM-G965F using XDA Labs

ianmacd said:
I'll look into it this evening. I'm just about to get off a plane.
Were there any errors when installing? Was your device properly detected as a T835?
Click to expand...
Click to collapse
Installing just fine, correctly detected as well.
Sent from my Samsung SM-G950F using XDA Labs

dr460nf1r3 said:
Installing just fine, correctly detected as well.
Click to expand...
Click to collapse
I've gone through the ramdisk of the T835's boot image with a fine-tooth comb and can find nothing untoward. I also verified that I properly removed the dm-verity flag from the T835's device tree.
There are actually very few source code differences between the T830 and T835. Both can be built from a single tree. The only differences lie in the kernel config file and the device tree, but I am building with the default T835 configuration, and with the proper device tree for that device.
Let's try at least ruling out my installer code. Please image-flash this new boot image[/i] to your device and tell me if it boot-loops. If it does, my installer isn't the problem, because it's only used for a ZIP flash. I've already checked the installer code and can't see any bugs, so I don't think the issue lies there.
Can you also please tell me which version of the firmware your device is running? Possibly there's an issue there, too. Samsung has so far released the source to the ARGH kernel only. This seems to work fine on my ARH5 firmware, but it's uncertain whether it would still work on something based on ARI*, and I've seen that a couple of countries do now have ARI firmware available. Mind you, even if it wasn't compatible, it should still get as far as booting.
Anyway, please test that boot image and let me know your firmware version.

While I soldier on with the issues afflicting the T835 build, can anyone else verify the T830 build as working for them?
Don't be shy; I'm running it on my own device, so I'm certain that build boots.

ianmacd said:
While I soldier on with the issues afflicting the T835 build, can anyone else verify the T830 build as working for them?
Don't be shy; I'm running it on my own device, so I'm certain that build boots.
Click to expand...
Click to collapse
Sorry for the noob question if i flash this kernal on my SM-T835 will i lose DEX ? Sorry i'm not quite understanding what KERNEL does ? Thanks in advance!

N1NJATH3ORY said:
Sorry for the noob question if i flash this kernal on my SM-T835 will i lose DEX ? Sorry i'm not quite understanding what KERNEL does?
Click to expand...
Click to collapse
When the kernel is working as intended, you won't lose DeX, but it currently isn't even booting on the T835.
Only those who are able to assist in debugging the current boot failure should install the T835 build at this time.
The T830 build, on the other hand, is rock solid for me, and I encourage anyone who is capable of recovering from an unexpected bootloop to try it out.

Version 0.99.5 released.
This release updates the kernel to the latest upstream Linux.
T830 owners, install at will. T835 owners, beware: The previous release has been reported unbootable on this model, and this release is likely to be similarly afflicted. Investigations are ongoing. Until this issue is resolved, the whole project has been downgraded to alpha status.
Change log
Updated to Linux 4.4.162. Caution: This release is likely to cause a bootloop on the T835.

ianmacd said:
I've gone through the ramdisk of the T835's boot image with a fine-tooth comb and can find nothing untoward. I also verified that I properly removed the dm-verity flag from the T835's device tree.
There are actually very few source code differences between the T830 and T835. Both can be built from a single tree. The only differences lie in the kernel config file and the device tree, but I am building with the default T835 configuration, and with the proper device tree for that device.
Let's try at least ruling out my installer code. Please image-flash this new boot image[/i] to your device and tell me if it boot-loops. If it does, my installer isn't the problem, because it's only used for a ZIP flash. I've already checked the installer code and can't see any bugs, so I don't think the issue lies there.
Can you also please tell me which version of the firmware your device is running? Possibly there's an issue there, too. Samsung has so far released the source to the ARGH kernel only. This seems to work fine on my ARH5 firmware, but it's uncertain whether it would still work on something based on ARI*, and I've seen that a couple of countries do now have ARI firmware available. Mind you, even if it wasn't compatible, it should still get as far as booting.
Anyway, please test that boot image and let me know your firmware version.
Click to expand...
Click to collapse
Firmware Version ist arh5 and after flashing your img the device still constantly reboots on the start screen and doesnt even get to the boot Screen
Sent from my Samsung SM-G950F using XDA Labs

dr460nf1r3 said:
Firmware Version ist arh5 and after flashing your img the device still constantly reboots on the start screen and doesnt even get to the boot Screen
Click to expand...
Click to collapse
Thanks. That absolves the installer of any wrongdoing, at least.
Something is fundamentally wrong with the kernel for the T835.
The boot image is taken from stock firmware, and modified just enough to allow a custom kernel to boot. I very much doubt the problem lies there. A virtually identical image works for the T830.
The kernel config used is the one supplied by Samsung. The only modifications made to it are the same ones I made to the T830's.
I think my next step will be to produce a kernel built without downstreaming the 4.4.y Linux branch, so back to 4.4.78. If that works, it will indicate that an error affecting only the T835 was introduced during all of my merging of the upstream kernel.
I'll post again when I've built the kernel, which won't be for a few hours, as I'm on holiday at the moment.
Sent from my SM-G965F using XDA Labs

ianmacd said:
I think my next step will be to produce a kernel built without downstreaming the 4.4.y Linux branch, so back to 4.4.78. If that works, it will indicate that an error affecting only the T835 was introduced during all of my merging of the upstream kernel.
Click to expand...
Click to collapse
OK, @dr460nf1r3, please try this new T835 build.
This is rewound to 4.4.78, with just a few extra cherry-picked commits to enable it to build cleanly and boot without triggering dm-verity.
In other words, this kernel should be 99% identical to the one that shipped with the machine. This assumes that the source as supplied by Samsung was actually used to build the stock kernel.. They have been known to publish sources that don't match what's on the machine.

ianmacd said:
OK, @dr460nf1r3, please try this new T835 build.
This is rewound to 4.4.78, with just a few extra cherry-picked commits to enable it to build cleanly and boot without triggering dm-verity.
In other words, this kernel should be 99% identical to the one that shipped with the machine. This assumes that the source as supplied by Samsung was actually used to build the stock kernel.. They have been known to publish sources that don't match what's on the machine.
Click to expand...
Click to collapse
Thanks, flashing now will report back in a few minutes
Sent from my Samsung SM-G950F using XDA Labs
---------- Post added at 05:44 PM ---------- Previous post was at 05:17 PM ----------
ianmacd said:
OK, @dr460nf1r3, please try this new T835 build.
This is rewound to 4.4.78, with just a few extra cherry-picked commits to enable it to build cleanly and boot without triggering dm-verity.
In other words, this kernel should be 99% identical to the one that shipped with the machine. This assumes that the source as supplied by Samsung was actually used to build the stock kernel.. They have been known to publish sources that don't match what's on the machine.
Click to expand...
Click to collapse
Did not work still the same issue.. flashed via twrp to boot partition. Noob question, the boot backup i got is 64mb while your kernel hardly has 25.. whats going on here?
Sent from my Samsung SM-G950F using XDA Labs

dr460nf1r3 said:
Did not work still the same issue.. flashed via twrp to boot partition.
Click to expand...
Click to collapse
Well, that's disappointing. I was hoping that it was my screw-up, rather than Samsung's, but at this point almost everything I've done has been backed out and it still won't boot.
Noob question, the boot backup i got is 64mb while your kernel hardly has 25.. whats going on here?
Click to expand...
Click to collapse
Good question.
Your back-up is of the entire partition, including the area with no data on it, so you're getting a file the same size as the partition itself. My boot image contains just the data segment, so it's smaller.
If you pull the stock boot image from the AP file of Samsung's firmware, you'll see that it's a very similar size to mine (slightly smaller, actually):
Code:
$ unzip -p T835XXU1ARH5_T835OXM1ARH5_PHN.zip AP_T835XXU1ARH5_CL14008523_QB19263559_REV00_user_low_ship_MULTI_CERT_meta.tar.md5| tar xf - -O boot.img.\*lz4 | lz4 -dc > boot.img
$ ls -l boot.img
-rw-rw-r--. 1 ianmacd ianmacd 23593232 Oct 21 22:01 boot.img
$ file boot.img
boot.img: Android bootimg, kernel (0x8000), ramdisk (0x2000000), page size: 4096, cmdline (console=null androidboot.hardware=qcom user_debug=31 msm_rtb.filter=0x37 ehci-hcd.park=3 lpm_le)
So, what now?
I'll see which other minor changes I can back out, in an effort to arrive at a kernel built from source that is as close to stock as possible. If you're wondering Why doesn't he just build from pristine sources?, the answer is: Because Samsung's source code won't even build out of the box. Many of the kernel header files are simply not in the expected locations. Alas, this is a fairly common problem with Samsung's kernel source code releases.
I suspect the solution to this problem may actually lie in changes that have yet to be made, rather than changes made that need to be reverted. In other words, the T835 may require some kernel modifications or configuration that the T830 doesn't. Theoretically, a kernel compiled from Samsung's pristine sources should just work, but that's starting to look unlikely now.
I'm hoping that I can enable/disable a few further options in the kernel config, rebuild and produce a kernel that works for you. If, however, the problem is that the source itself is faulty, we may have to wait for a future release by Samsung to give us something that compiles into a working kernel.
But I don't intend to throw in the towel on the T835 just yet. There are still a few more things we can try.

ianmacd said:
Well, that's disappointing. I was hoping that it was my screw-up, rather than Samsung's, but at this point almost everything I've done has been backed out and it still won't boot.
Good question.
Your back-up is of the entire partition, including the area with no data on it, so you're getting a file the same size as the partition itself. My boot image contains just the data segment, so it's smaller.
If you pull the stock boot image from the AP file of Samsung's firmware, you'll see that it's a very similar size to mine (slightly smaller, actually):
So, what now?
I'll see which other minor changes I can back out, in an effort to arrive at a kernel built from source that is as close to stock as possible. If you're wondering Why doesn't he just build from pristine sources?, the answer is: Because Samsung's source code won't even build out of the box. Many of the kernel header files are simply not in the expected locations. Alas, this is a fairly common problem with Samsung's kernel source code releases.
I suspect the solution to this problem may actually lie in changes that have yet to be made, rather than changes made that need to be reverted. In other words, the T835 may require some kernel modifications or configuration that the T830 doesn't. Theoretically, a kernel compiled from Samsung's pristine sources should just work, but that's starting to look unlikely now.
I'm hoping that I can enable/disable a few further options in the kernel config, rebuild and produce a kernel that works for you. If, however, the problem is that the source itself is faulty, we may have to wait for a future release by Samsung to give us something that compiles into a working kernel.
But I don't intend to throw in the towel on the T835 just yet. There are still a few more things we can try.
Click to expand...
Click to collapse
Thanks for explaining everything for me. Id like to help you were i can but i dont have a computer by my hands right now for the next time
Sent from my gts4llte using XDA Labs

dr460nf1r3 said:
Thanks for explaining everything for me. Id like to help you were i can but i dont have a computer by my hands right now for the next time
Click to expand...
Click to collapse
Here's a new build to try. This one reverts the last few changes I originally made to the T835's kernel configuration before building. This is as close to stock as possible, whilst still being able to build.
If this doesn't boot, it pretty much means that Samsung has supplied code for the T835 that simply will not compile into a working kernel. At that point, we'll probably have to wait for updated sources. I already have a request pending with Samsung for the release of the BRI sources.
Just to be clear, the current status quo as I understand it is that the Samsung logo never starts to be written from left to right. You never get past the static screen with the device name and the word Custom. Is that correct?

ianmacd said:
Here's a new build to try. This one reverts the last few changes I originally made to the T835's kernel configuration before building. This is as close to stock as possible, whilst still being able to build.
If this doesn't boot, it pretty much means that Samsung has supplied code for the T835 that simply will not compile into a working kernel. At that point, we'll probably have to wait for updated sources. I already have a request pending with Samsung for the release of the BRI sources.
Just to be clear, the current status quo as I understand it is that the Samsung logo never starts to be written from left to right. You never get past the static screen with the device name and the word Custom. Is that correct?
Click to expand...
Click to collapse
Im sorry to tell you but this doesnt boot either in fact it doesnt even reboot the static screen. Your right about the current status quo sadly.
Sent from my Samsung SM-G950F using XDA Labs

Related

Extracting kernel config from I9000XXJP3

Dear all,
Did anyone succeed extracting kernel configuration from I9000XXJP3? Kernel version is 2.6.32.9, the vermagic is "2.6.32.9 mod_unload ARMv7"
extract-ikconfig doesn't work on it.
I succeeded extracting a zImage gzipped payload, but it seems not to contain any configuration in it (see attached).
/proc/config.gz doesn't exist, Samsung open source package (downloaded from Samsung open source site) contains only Android 2.1 Eclair or previous versions.
My target is to build tun.ko and, eventually, ext3/ext4 modules to make them working in Samsung Galaxy S I9000 with rooted I9000XXJP3.
Any idea?
Without froyo source code or a good Samsung Kernel (es. for himem capable) I think is impossible to play good with theses beta roms.
Ciao
Any news? I need tun.ko for jp3 too..
I have tried to compile the 2.6.32.9 kernel editing the .config in 2.6.9, the module tun.ko is accepted by the device, but I get a kernel panic!
redsh said:
I have tried to compile the 2.6.32.9 kernel editing the .config in 2.6.9, the module tun.ko is accepted by the device, but I get a kernel panic!
Click to expand...
Click to collapse
Did you use the stock linux kernel? Or the common from android.kernel.org?
I'm trying the same thing actually. Isn't there any default config for the processor that might work? I tried with the config from .29 but when loading the module it says wrong format.
try to build 2.6.32 with the 2.6.29 config ("yes" all missing stuff)
turn on your galaxy, adb push the tun.ko
try to load it, it will say "missing symbols" blabla
find the config options that match those symbols, enable them, recompile, try again
Great to see some people who are hacking the kernel! Keep it up!
But I'm afraid it is not going to be as easy as dropping aries_rev03_defconfig as .config in a 2.6.32 kernel tree and doing 'make oldconfig'. That's because many of Samsung's changes have not been included in the newer mainline kernel versions yet.
Samsung added quite a lot of low-level board support for their dev boards (and for the SGS, of course), did some customization and added a few drivers which you will need to forward-port to the newer kernel.
Please have a look at this thread, in which I've started a breakdown of the Samsung patches against Android Eclair's 2.6.29 kernel.
The best course of action I think is to git clone Android's kernel from AOSP, checkout the android-2.6.29 branch, apply Samsung's patches to that, then attempt to rebase your tree to a newer kernel version. (Note, you may want to start with small steps, to get a feel for what you're up against )
Note that there probably will be lots of merge conflicts which you need to resolve, and after dealing with all those, you also have to make sure that everything else that's merged still works as expected, but at least that will show you the amount of work involved. You will basically be doing all the work that Samsung is doing right now for their kernel for FroYo. It will be interesting to follow their progress on the mailing lists and on IRC.
bilboa1 said:
try to build 2.6.32 with the 2.6.29 config ("yes" all missing stuff)
turn on your galaxy, adb push the tun.ko
try to load it, it will say "missing symbols" blabla
find the config options that match those symbols, enable them, recompile, try again
Click to expand...
Click to collapse
Thats exactly what I did, but I got wrong module format... which is a fatal error. I need to invest further in the used config... maybe i did not pick up the right one properly..
miki4242 said:
Great to see some people who are hacking the kernel! Keep it up!
But I'm afraid it is not going to be as easy as dropping aries_rev03_defconfig as .config in a 2.6.32 kernel tree and doing 'make oldconfig'. That's because many of Samsung's changes have not been included in the newer mainline kernel versions yet.
Samsung added quite a lot of low-level board support for their dev boards (and for the SGS, of course), did some customization and added a few drivers which you will need to forward-port to the newer kernel.
Please have a look at this thread, in which I've started a breakdown of the Samsung patches against Android Eclair's 2.6.29 kernel.
The best course of action I think is to git clone Android's kernel from AOSP, checkout the android-2.6.29 branch, apply Samsung's patches to that, then attempt to rebase your tree to a newer kernel version. (Note, you may want to start with small steps, to get a feel for what you're up against )
Note that there probably will be lots of merge conflicts which you need to resolve, and after dealing with all those, you also have to make sure that everything else that's merged still works as expected, but at least that will show you the amount of work involved. You will basically be doing all the work that Samsung is doing right now for their kernel for FroYo. It will be interesting to follow their progress on the mailing lists and on IRC.
Click to expand...
Click to collapse
Yes that would be a lot of work. Maybe its better to just wait until they release the kernel from froyo. I read that they release their opensource stuff rather fast. But just for adding a module like ext4 I don't think you need those patches, because imho they didn't touch the fs of the kernel. We just need an adaquate kernel config and adding modules should be possible.
Phlogiston said:
Thats exactly what I did, but I got wrong module format... which is a fatal error. I need to invest further in the used config... maybe i did not pick up the right one properly..
Click to expand...
Click to collapse
Make sure you're using the same kernel version number and build number, because samsung kernels do not have the option to load incorrect module versions
Yes i've set the subversion as well but without the patches from samsung its impossible it seems. We need to wait and hope that they release the froyo kernel sources soon....
bilboa1 said:
Make sure you're using the same kernel version number and build number, because samsung kernels do not have the option to load incorrect module versions
Click to expand...
Click to collapse
Are you sure they set CONFIG_MODVERSIONS? It's off in the downloadable sources.
Just compare the output of `modinfo -F vermagic <yourmodule>` to `modinfo -F vermagic <modulewhichloads>` or to /proc/version .
did this get solved yet? I google'd for the tun.ko file for my i9000 using jp3 but nothing yet... if you have a proper one for the MoDaCo version here please attach it! ~
I think I saw someone's post with tun.ko for FroYo beta somewhere in these forums, I mean i9000 Android Dev. One of the guys here has found a way to compile kernel for jp* here. I am sure.
I actually found it attached somewhere in the forum and it was 1,5447 mb big I think it was... but it still didn't work for me so I presumed the kernel or something must have been wrong.

[PATCH] Kexec-hardboot patch

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/7833796, 4.4 AOSP 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_PROC_DEVICETREE=y
CONFIG_ATAGS_PROC=n # This one is turned on automatically, but it is not needed, so you can disable it.
All these options must be enabled.​
Userspace kexec binary: https://github.com/Tasssadar/kexec-tools
I had to change some things in kexec userspace binary because of some kernel bugs, complete description is in that repository. You can get statically built binary at https://github.com/Tasssadar/multirom/blob/master/install_zip/prebuilt-installer/multirom/kexec​
Usage:
Once you have the kernel patches and kexec userspace binary in place, just run following command to boot into new kernel:
Code:
kexec --load-hardboot zImage --initrd=initrd.img --mem-min=0x20000000 --command-line="$(cat /proc/cmdline)" --dtb
kexec -e
Note the command line parameter - cmdline from bootloader is not added automatically, you have to put it there by yourself.
Authors:
This patch was made by Mike Kasick for Samsung Epic 4G. Since that, it was ported to several devices, one of them is Asus Transformer TF201 - 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 hammerhead, I've improved the patch a bit - only the host needs to be patched now and I've added support for DTB.
Merged, thanks again for the awesome work @Tasssadar!
Good deal.My day is getting better.
@show-p1984 would love to see this in bricked kernel too! ?
@neobuddy89 did you see this?
Sent from Nexus 5 on Slimkat
thanks for the hard work.. thats awesome.
AndroidSlave said:
@neobuddy89 did you see this?
Sent from Nexus 5 on Slimkat
Click to expand...
Click to collapse
Yeah, I saw this.
neobuddy89 said:
Yeah, I saw this.
Click to expand...
Click to collapse
I asked that 6 months ago
Sent from my Nexus 5 using Tapatalk
awesome work bro...
much needed..
AndroidSlave said:
I asked that 6 months ago
Sent from my Nexus 5 using Tapatalk
Click to expand...
Click to collapse
Yeah, I know and I saw that days back..
Enough of OT. :fingers-crossed:
Help with applying the patch
Okay so I have my aosp kernel made. I have my working directory too. Can you just guide me on how do I apply this partch to it?
Is it possible to add that patch from a on the fly flashable zip ?
@Anoopnk since the patch is for the kernel(zImage) its not possible to patch it like that. Or you have to compile the kernel or you need to ask your kernel dev friendly or he can include it in his kernel.
Hello, first I'd like to apologize for dredging up an old thread. Second, I am attempting to build a CM13+kali+kexec compatible kernel, with extra wifi drivers as the base kernel doesnt support my wifi card. Based on that goal, I have a multi-part question for the OP, or anyone else with the know-how to assist me in my quest.
1)Is there a source available for your kernel_kexec_hammerhead_cm13-01-2c39db662.zip listed on the multirom page for nexus 5? I'm attempting to build a new kernel, for kali+CM13+multirom, and your android_kernel_google_msm git only has branches going up to CM12. It would be far easier for me to start with a 'clean' CM13+kexec source then trying to patch myself as per question #2
2) I've attempted to patch a plain old hammerhead_defconfig from CM13 git, however I believe I am doing so wrong. I have managed to compile kexec-tools and aquired the hammerhead 3.4.x patch. Now am I supposed to patch my produced zImage-dtb AFTER build, running the patch from the kexec-tools folder and against the zImage-dtb? Is it something like 'KEXEC.patch -p1 < zimage-dtb'
Any clarification on the use of the kexec-tools patch, or simply a link to github source of a 'clean' CM13 kernel with the kexec patch already applied, would be incredibly helpfull on my journey down the rabbit hole
~EDIT~
Ok so I've managed to figure out the patch and feel like a dumbass. For anyone else looking to get into kernel dev, and wanting to use the kexec patch, heres the basics:
1- run patch within your kernel source directory
2-ensure that the config settings in OP are set (I had to add them to my source by hand as they werent there)
3-when zipping up your kernel, add the sbin and lib/kexec-tools folders from the kexec-tools source build, and be sure your updater-script / updater-binary is set to move these folders into /sbin and /lib respectively.
4-Flash and enjoy Kexec! (check with multirom manager)

[UNOFFICIAL][KERNEL] Custom kernel (codename Noire) for SM-T560NU (CM14.1)

This release is only tested on the SM-T560NU USA (gtelwifiue).
This kernel is based on vince2678's port of LineageOS, with a couple of updates and optimizations.
This kernel has only been tested with vince's cm14.1 releases.
Flashable zips use a modified version of the AnyKernel2 system. While only tested on cm14.1, it may work on other ROMs, since it does not modify your initrd.
Very special thanks to vince2678.
Without his effort on this device, this release would not be possible.
Updates:
2017-06-10:
First build for CM14.1
Features:
DriveDroid Mass Storage and CD-ROM Support
Built with gcc-linaro-4.8-2015.06-x86_64_arm-eabi toolchain
Additional CPU optimizations
Updated CPU assembly optimizations
Various security patches
XPad (xbox 360 and xbox one) gamepad support
Known issues:
None
How to Install:
1. Download the latest release zip
2. Transfer zip to your device (or skip this step if sideloading)
3. Reboot into TWRP Recovery [Volume Up+Home] (If you need TWRP, first install mine or vince2678's.)
4a. Find the zip in the TWRP install browser, and install it
-OR-
4b. Sideload the zip using adb.
5. Reboot to system and enjoy
How much faster is it with the new optimizations?
Standard Kernel (click for full benchmark):
Noire Kernel (click for full benchmark):
What does "dirty" mean?
Whenever you modify a git repo and do not commit the changes, it will flag the kernel as "dirty".
Rather than forking the git repo, I use a clean copy of vince's repo, then apply my patches over it.
Because this isn't really how git was designed to be used, the build system sees it as "dirty".
It is nothing to worry about, as it is not harmful in any way.
Getting the kernel
Releases can be found on my site. (Check the header on the download page for a link to the source directory for tools to build your own):
https://files.persona.cc/zefie/files/cell/SM-T560NU/kernel/cm14.1
If/when there are more than one release, the most recent release should be on top, but verify the Last Modified date to be sure of the latest release.
Also be aware you will need to reflash anytime you update the main CM14.1 OS, as it will overwrite the kernel.
Bugs and issues
As vince's CM14.1 release is a rolling release, depending on many different sources, unexpected issues may come up in either the upstream code, his code, or my code.
Before submitting any reports to vince, be sure you are using his kernel (reflash the cm zip without flashing mine, preferably with a clean install)
Before submitting any reports to me, be sure the issue is not caused by the current release of CM14.1 (aka doesn't happen when you try the above).
No warranty is implied or provided. Be sure to have backups before flashing. But this is a no-brainer.
bump, because new release and target (was cm13, now cm14.1)
This kernel helped me to finally have USB OTG working by default, great job! :good:
Can you give us more detailed info about optimizations? Does your kernel have any impact on battery life?
jon355 said:
Can you give us more detailed info about optimizations? Does your kernel have any impact on battery life?
Click to expand...
Click to collapse
I haven't tested thoroughly but they shouldn't.
The optimizations are some patches that update the arm assembly functions to use features available in our CPUs that were not previously used.
As well as compiling while telling the compiler that we are using a cortex-a53 (in armv7 mode) (by default it just compiled generic armv7 with old armv5/6 assembly).
In short, they aren't overclocks, just using more of the processor's full potential, which is already sitting there doing nothing. Therefore, it shouldn't have a huge impact on battery life.
The CPU patches are here: https://files.persona.cc/zefie/files/cell/SM-T560NU/kernel/common-source/cpu_opts.patch.xz
Fun fact: Our CPU is actually armv8 64-bit, but we can't use it because we depend on Samsung's proprietary binaries, which are compiled in 32-bit (armv7 mode)
Sm-t560 <> smt560nu
Hey,
I'd like to Install this ROM, but obviously i get the message that it's not supported for my Device (in TWRP on flash attempt)
Mine is from the EU so, probably why..
Any chance to get this ROM to work for it?
Akineesan said:
Hey,
I'd like to Install this ROM, but obviously i get the message that it's not supported for my Device (in TWRP on flash attempt)
Mine is from the EU so, probably why..
Any chance to get this ROM to work for it?
Click to expand...
Click to collapse
No.
Unfortunately, Samsung made several hardware changes, including the CPU, when they brought this device to the USA.
You could almost think of the SM-T560NU as the "SM-T560 New".
It is a newer model with revamped hardware, and thus not compatible with ROMs made for the other.
Sorry.
zefie said:
No.
Unfortunately, Samsung made several hardware changes, including the CPU, when they brought this device to the USA.
You could almost think of the SM-T560NU as the "SM-T560 New".
It is a newer model with revamped hardware, and thus not compatible with ROMs made for the other.
Sorry.
Click to expand...
Click to collapse
Alright, thanks for the Quick follow-up!
zefie said:
I haven't tested thoroughly but they shouldn't.
The optimizations are some patches that update the arm assembly functions to use features available in our CPUs that were not previously used.
As well as compiling while telling the compiler that we are using a cortex-a53 (in armv7 mode) (by default it just compiled generic armv7 with old armv5/6 assembly).
In short, they aren't overclocks, just using more of the processor's full potential, which is already sitting there doing nothing. Therefore, it shouldn't have a huge impact on battery life.
The CPU patches are here: https://files.persona.cc/zefie/files/cell/SM-T560NU/kernel/common-source/cpu_opts.patch.xz
Fun fact: Our CPU is actually armv8 64-bit, but we can't use it because we depend on Samsung's proprietary binaries, which are compiled in 32-bit (armv7 mode)
Click to expand...
Click to collapse
Great info. What optimizations were done on OTG mass storage? On stock LOS 14.1 kernel, USB OTG wasn't working for me while with your kernel it works flawlessly.
Jacsd said:
Great info. What optimizations were done on OTG mass storage? On stock LOS 14.1 kernel, USB OTG wasn't working for me while with your kernel it works flawlessly.
Click to expand...
Click to collapse
Honestly none of my patches do anything USB related, except DriveDroid, but that lets the tablet be a device (by hosting disk images), not anything to do with connecting a device to it. Therefore, I cannot take the credit for that. Vince must have fixed it in his kernel. I built this with the latest code at the time, code that may have been more recent than the last lineage build of his that you tried.
zefie said:
Honestly none of my patches do anything USB related, except DriveDroid, but that lets the tablet be a device (by hosting disk images), not anything to do with connecting a device to it. Therefore, I cannot take the credit for that. Vince must have fixed it in his kernel. I built this with the latest code at the time, code that may have been more recent than the last lineage build of his that you tried.
Click to expand...
Click to collapse
I tried latest build and a few older builds, on every I was stucked in the loop of mounting and unmonting USB device. I only managed to enable USB OTG when I installed StickMount. It seems Drive Droid does the same. Will you continue work on this kernel?
Jacsd said:
I tried latest build and a few older builds, on every I was stucked in the loop of mounting and unmonting USB device. I only managed to enable USB OTG when I installed StickMount. It seems Drive Droid does the same. Will you continue work on this kernel?
Click to expand...
Click to collapse
I'll update it if there are any necessary updates for performance or security, or any issues are found, but for now it seems fairly stable and should be alright for a while.
zefie said:
I haven't tested thoroughly but they shouldn't.
The optimizations are some patches that update the arm assembly functions to use features available in our CPUs that were not previously used.
As well as compiling while telling the compiler that we are using a cortex-a53 (in armv7 mode) (by default it just compiled generic armv7 with old armv5/6 assembly).
In short, they aren't overclocks, just using more of the processor's full potential, which is already sitting there doing nothing. Therefore, it shouldn't have a huge impact on battery life.
The CPU patches are here: https://files.persona.cc/zefie/files/cell/SM-T560NU/kernel/common-source/cpu_opts.patch.xz
Fun fact: Our CPU is actually armv8 64-bit, but we can't use it because we depend on Samsung's proprietary binaries, which are compiled in 32-bit (armv7 mode)
Click to expand...
Click to collapse
Tnx for detailed answer. Btw, I tested your LOS 13 build and it's very smooth and battery life is great. Only issue I encountered so far is when charging offline, screen doesn't go off and there is no charging percents showed. Also, can you sync with the latest LIneage changes? Can you replace stock browser with the Jelly and stock camera with the Snap camera?
jon355 said:
Tnx for detailed answer. Btw, I tested your LOS 13 build and it's very smooth and battery life is great. Only issue I encountered so far is when charging offline, screen doesn't go off and there is no charging percents showed. Also, can you sync with the latest LIneage changes? Can you replace stock browser with the Jelly and stock camera with the Snap camera?
Click to expand...
Click to collapse
The thread for that is over here:
https://forum.xda-developers.com/showthread.php?t=3632745
Also, I am unable to reproduce the issue with the screen not shutting off. There is no percentage, but my screen shuts off while locked when charger is plugged in. Percentage and timeout can probably be configured in settings. I sync with Lineage every update. An update will come sometime this month with July's security patches.
As for replacing stock apps, I'll look into it. As the thread says, this is mostly for my use, hence why it wasn't publicly announced before. If I find the apps useful I will see about integration.
Wondering if this is still supported?
zefie said:
The thread for that is over here:
https://forum.xda-developers.com/showthread.php?t=3632745
Also, I am unable to reproduce the issue with the screen not shutting off. There is no percentage, but my screen shuts off while locked when charger is plugged in. Percentage and timeout can probably be configured in settings. I sync with Lineage every update. An update will come sometime this month with July's security patches.
As for replacing stock apps, I'll look into it. As the thread says, this is mostly for my use, hence why it wasn't publicly announced before. If I find the apps useful I will see about integration.
Click to expand...
Click to collapse
From the title you can tell if this still works. For example will it work with official LineageOS and what not. Hoping to get a response so I can overclock my tablet
Bigority said:
From the title you can tell if this still works. For example will it work with official LineageOS and what not. Hoping to get a response so I can overclock my tablet
Click to expand...
Click to collapse
Should still work. I haven't messed with the SM-T560NU in a while. If I recall the Lineage build system was creating broken builds, I'm running 14.1-20171121-NIGHTLY-gtelwifiue and Noire Kernel still works with that.
As for newer builds, last time I tried (some time between xmas and new years), all of the more recent Lineage builds would not boot, with or without my kernel. If trying newer Lineage NIGHTLYs, try without my kernel first, then try with if it does boot.
Vince has kinda abandoned the SM-T560NU, although I'm not sure it is a fair reason to abandon us, because we didn't test on a completely different device, but his choice is his alone, and as such, without him working on Lineage, the newer builds are likely to stay broken unless either he comes back to fix it, or someone else takes over (don't look at me).
zefie said:
Should still work. I haven't messed with the SM-T560NU in a while. If I recall the Lineage build system was creating broken builds, I'm running 14.1-20171121-NIGHTLY-gtelwifiue and Noire Kernel still works with that.
As for newer builds, last time I tried (some time between xmas and new years), all of the more recent Lineage builds would not boot, with or without my kernel. If trying newer Lineage NIGHTLYs, try without my kernel first, then try with if it does boot.
Vince has kinda abandoned the SM-T560NU, although I'm not sure it is a fair reason to abandon us, because we didn't test on a completely different device, but his choice is his alone, and as such, without him working on Lineage, the newer builds are likely to stay broken unless either he comes back to fix it, or someone else takes over (don't look at me).
Click to expand...
Click to collapse
For it to work properly should I try your port of LINEAGEOS or should I try Vince's port of Cyanogen Mod?
Bigority said:
For it to work properly should I try your port of LINEAGEOS or should I try Vince's port of Cyanogen Mod?
Click to expand...
Click to collapse
This kernel is for vince's 14.1. My 13.0 already uses Noire kernel and this release should not be flashed with that
zefie said:
This kernel is for vince's 14.1. My 13.0 already uses Noire kernel and this release should not be flashed with that
Click to expand...
Click to collapse
Alright thanks
zefie said:
This kernel is for vince's 14.1. My 13.0 already uses Noire kernel and this release should not be flashed with that
Click to expand...
Click to collapse
The link isn't working to download the kernel :l
Edit: It was working just my internet was too ****ty too load it.

[KERNEL][Stock#1/AOSP#5][V30*][Oreo|Pie] Lunar-Kernels for LG V30

initial thread here, further clarifications in recently added posts below OP/1st post
Lunar-Kernels
tl;dr - too long didn't read / first things first
Stock ROM kernels are attached in posts #1-4 or link to Google Drive
AOSP/LineageOS kernels are attached in post #5 or folder
simply dropping the folder with kernels here (Stock ROM):
https://drive.google.com/open?id=1xL5gEiG-fjzTuSGM_kUDsrOKy-jTtGr1
Description: 3 sub-folders (thus kernels) available:
"old" shouldn't really be used, this is a very bare to LG stock source kernel and (probably) using outdated ramdisks which prevent FM Radio, Mirrorlink, etc. from working
"stable" stable has gotten more testing (or more recent fixes) and is deemed fit for daily driver usage
"bleeding edge" is newest branch, very experimental changes/fixes or just the very latest kernel (if those don't end up in "stable" already)
Stable and bleeding edge are the
Further notes for "eas":
From the tests so far - it has turned out that power consumption ALWAYS was higher compared to HMP and/or the default shipped LG kernel (tweaked HMP)
So the best results up until now was to underclock CPU, underclock GPU (or keep at lowest 1-2 levels) and add tweaks to shut phy power source off for display, this is similar results like anandtech with Exynos EAS/HMP tests: https://www.anandtech.com/show/12620/improving-the-exynos-9810-galaxy-s9-part-2/3
Meaning: NO EAS kernels until further notice - only HMP kernels will be developed/provided right now
Usage case: [outdated]
"old": should work pretty reliable, everything is built conservatively & close to stock one of the first kernels
"stable": probably great daily driver material - FM Radio & MirrorLink, etc. still broken
"bleeding edge": just the latest and greatest from upstream, security, tuning, etc. - features might break in the process
eas [attached here]: daily driver, long running for lots of reading, lots of watching videos, high SOT demand ; suitability for gaming has yet to be evaluated
NOT working and probably will NOT in the near future (or at all): [outdated]
- FM Radio (broken with "old", "stable" kernels - those use v300 ramdisk)
- MobiCore - thus MirrorLink, etc. (broken with "old", "stable" kernels - those use v300 ramdisk)
- FM Radio & MirrorLink currently works with bleeding edge kernels
Notes (Kernel):
This kernel is built first and foremost FOR ME and shared with the community to benefit from that work,
you don't owe me anything and I don't owe you anything
like with Sony (yeah, even Sony !) and other vendors with their modified, proprietary non-AOSP ROMs - kernel development is extremely bothersome, each few commits kernel doesn't boot or compilation fails, so don't expect e.g. 4.4.137 kernel or catchup with latest codeaurora changes since that takes simply too much time and work (time, effort, nerves, etc.)
tested on H930 (Europe) V30 ONLY, test at your own risk on H930DS (dual SIM) or other devices; ramdisks and device configs WILL differ (global defconfig used - so compatiblity should be higher, limitations/compatibility issues with US, Korea and other models possible)
You need to have knowledge how this device behaves in case of flashing broken kernels, filesystem corruption and other worst-case scenarios
You must:
stay calm all of the time while flashing and must NOT do anything rash or chaotic
know how to get into bootloader/fastboot mode via USB-cable (when device is off) OR via adb command from a running system
know how to force the device to turn off (it will turn on again but that might help in certain cases) - this way you easily can get into fastboot/bootloader again
know and/or have a basic understanding that the device will settle most issues on its own
have your device charged to a battery level AT LEAST to 50-60% in case boot loops take longer (it is caught in boot loop) and you can't quickly turn the device off anymore
know/expect that flashing Magisk and other mods most certainly will lead the device too boot several times ("artificial bootloop") and might get you uneasy or confused, we need to figure out how to speed up the process that it finally boots into the ROM
potential issues & potential remedies/fixes: [up-to-date]
might have high load unless rctd disabler is flashed (root detection tool) => flash rctd
might not boot unless no-verity is flashed, custom ROM => flash no-verity
might not boot or work with encrypted phone or encrypted anything => should be self-explanatory, don't use LG encryption on custom ROMs/mods
some security functionality might not work => TEE/qseecom/lgecrypto_module might not work, encryption safe, folder encryption, etc. might be broken (if applicable)
might not boot or bootloop microSD with exfat is cause of LOT of trouble => in doubt remove microSD before flashing custom Kernels or ROM mods to avoid having additional trouble-maker to troubleshoot
phone boot-"loops" several times => seems to be default bootloader behavior for LG V30 (and/or other LG phone)
phone boot-"loops" several times => might need a few times to "settle" to boot the ROM up
booting up takes long => might actually rebuild dalvik cache or do some filesystem checking
SIM PIN isn't request and WiFi is dead as well => several reboots might fix it;
SIM PIN isn't request and WiFi is dead as well => permission corruption might have occurred, (need root) try to fix via: https://stackoverflow.com/questions...acct-uid-10064-read-only-file-system-in-emula
after flashing (custom) Kernel or (custom) ROM phone (re)boots into fastboot => "no OS" , Kernel might not actually be bootable , kernel issue, system partition issue
after flashing (custom) Kernel or (custom) ROM phone (re)boots into fastboot => might have incompatible ramdisk, no-verity was not flashed
after flashing (custom) Kernel or (custom) ROM phone (re)boots into fastboot => Kernel might be broken (totally not work or be compiled with non-compatible features)
after flashing (custom) Kernel or (custom) ROM phone (re)boots into fastboot => OS/Android might be broken (filesystem corrupted, etc.)
Flashing rctd & no-verity/verity-disabler is only necessary for LG Stock-based ROMs !
Not necessary for AOSP, LineageOS, etc. !
prepare kernel for flashing : [up-to-date]
rename the zip-file to 7z (file size limit)
extract the 7z (needs 7z that support PPMd compression)
rename it into boot.img
suggested flash : [up-to-date]
Get into fastboot mode (turn off => connect cable end to phone => hold VOL down => connect PC end of cable)
fastboot flash boot boot.img
fastboot boot TWRP.img (keep USB cable connected ALL of the time)
flash rctd disabler
flash no-verity
(optional) flash Magisk
disconnect USB cable
(optional) wipe /cache
(optional) dalvik cache
reboot system
Help:
Forcing the device to reset usually is done via Power + VOL DOWN - keep both pressed for several seconds, then the screen should turn off
the device is set up to (re)boot again - so have the USB cable, a PC/phone [on the go] with fastboot ready to connect the cable immediately when it was off
.
If you plan on using the microSD more extensively and are on non-Stock (e.g. AOSP, LineageOS, dot os, etc.) - [backup your data !] then format the microSD to ext4 in TWRP, that should give you 2x the write performance of exfat and also somewhat faster read performance
As a bonus of using ext4 on the microSD - access to your files should be available when flashing/trying out the GSIs (Project Treble)
Kernel boot test (DEVs):
[Kernel testing or if you want to try] I usually do a fastboot boot boot.img first to see if the bootanimation is successful (boots into bootanimation [non-Stock] or it boots into the ROM itself with reduced functionality [Stock ROM])
After that I do a real flash of the kernel via fastboot flash boot boot.img
Quirks (V30* phones compared to others & bootloader/boot(loop) behavior):
After first flashing - the kernel might fail at 1st boot, then reboot device and properly boot into the ROM
with Magisk it can be more reboots (I counted at least 3-4).
.
.
If the bootlooping is much longer - force reset the device (Power + VOL DOWN), that should usually allow the device to recover after 1-3 (re)boots
.
If that still doesn't help - remove the microSD - until you've successfully booted the kernel up, the exfat driver is known to cause trouble and make things much less predictable and irritating
To make things more predictable (and exclusively using AOSP/LineageOS-based ROMs) - you can format the microSD to ext4, that might help a bit with the amount of (re)boots during flashing)
FIXME:
additional notes, warnings, guides, etc.
(theory) while the device seems to bootloop after flashing Magisk or other "bigger" modifications - occasionally press the volume down button while you see the LG V30 ThinQ logo (boot splash/image) to speed up booting (input = boosting = quicker everything ?)
Kernel Source:
android_kernel_lge_msm8998/branches
lunar-kernel_II_WIP5_boot-work [current "bleeding edge"]
other/older kernels are earlier states of latest bleeding edge branch
Kudos:
Linus Torvalds, Linux Kernel devs
Greg Kroah-Hartman our favorite upstream Kernel LTS maintainer <3
Google kernel & other Android devs
codeaurora, linaro & all other devs working on qualcomm goodies
LG kernel & other devs
nathanchance for his kernel, toolchain and other reference work
sonyxperiadev & devs
sultanxda
freak07
franciscofranco
andip71
frap129
GreyLeshy
SGCMarkus
the XDA , 4PDA and all other android communities
all other devs & folks to be mentioned
last edited:
28.06.2018, add attachment: specifically built kernel for ls998, US sprint V30 model (US firmware, US998)
28.06.2018, add attachment: uploaded II_EAS_I_stable , EAS kernel on early ported EAS state, should be pretty efficient, deemed stable material, read notes: at its announcement post
06.07.2018: updated text for bleeding-edge added link to it https://forum.xda-developers.com/showpost.php?p=76996622&postcount=88
12.07.2018: attached latest HMP kernel to OP (1st post), removed EAS kernels since those had a bug with frequency being stuck at max frequency
26.10.2018: removed older attached HMP kernels, newer ones are in posts below
#1
"old", barebones kernel with absolute minimum changes (from LG) will be here
#2
"stable", only minimum additional functionality & fixes will be here
if not mentioned otherwise these are ONLY for LG Stock-based ROMs (Boombox, A.I.S., Stock, debloated Stock, etc.)
Checksums (md5sum):
d0c4572563a389ec495f1c661332c185 boot_oreo_I_6_WIP4_stock__H932_spr_US__tmo_US_20K.img
f29fc429d32de4fd79d3117642d39137 boot_oreo_I_6_WIP4_stock__H932_spr_US__tmo_US_20K_PPMd_7z.zip
6307cd6d40e97404a3c66bf78d20437f boot_oreo_I_6_WIP4_stock__US998init_spr_US_20D.img
f181f7589ecb3426006fa0d15c1e161d boot_oreo_I_6_WIP4_stock__US998init_spr_US_20D_PPMd_7z.zip
f31791fcd8b57db7e3b91ba5e4755bf3 boot_H930_21A_oreo_I_6_WIP4_LG_stock.img
d77c0504c9119f2d86880dd74d8fc0cd boot_H930_21A_oreo_I_6_WIP4_LG_stock_PPMd_7z.zip
Source:
https://github.com/zachariasmaladro...mmits/oreo_I_6_WIP4_stock__H932__US998_spr_US
#3
"bleeding edge", current development branch & WIP (work-in-progress) drops
Stability troubleshooting:
disable zram
set lowest CPU frequency and max CPU frequency to default
lower GPU max frequency
...
change each setting separately and see if that improves stability then please report your results
oreo_I_6_WIP7_3_stock
Branch:
https://github.com/zachariasmaladroit/android_kernel_lge_msm8998/commits/oreo_I_6_WIP7_3_stock
Changes:
rolled back kernel to earlier state (October 1st), troubleshooting stability
re-added sdcardfs aosp msm upstream changes, mostly "Drop dentry cache to prevent unknown file status" change in behavior (data integrity)
sdcardfs fixes
ext4, f2fs, ecryptfs and fscrypt updates and changes close to latest upstream
lockdep improvements
further oom, oom_reaper, fork-handling fixes and improvements
force 16b ECC for pstore
scheduler fixes (hmp.c; ...)
updated simple_lmk (not used in this branch)
[eval] reverting to basic optimizations for armv8-a
[eval] reverting to Google's 4.9 Toolchain (best compatibility, stability, etc.)
devfreq fixes and improvements
PCIe wake improvement for msm8998
configure i2c for bit-banging bus recovery
[eval] revert several previous changes
several other changes
Click to expand...
Click to collapse
md5sum checksums:
91273b50c1126bf44e2fa9b7d3eb00bb boot_oreo_I_6_WIP7_3_stock__H932_spr_US__tmo_US_20K.img
859fa1eb9948f19821110da85d2d996a boot_oreo_I_6_WIP7_3_stock__H932_spr_US__tmo_US_20K_PPMd_7z.zip
e20bb8036273960e99316cb7bac57c78 boot_H930_21A_oreo_I_6_WIP7_3_stock.img
0a360f4dd4cedf6cf95ded2dbd78fa1d boot_H930_21A_oreo_I_6_WIP7_3_stock_PPMd_7z.zip
0b7fc9259836f9a79c2e1715ba7bd79a boot_oreo_I_6_WIP7_3_stock__US998init_spr_US_20D.img
9c1d1f917f7cd9ba50c2464a2b8b4bb0 boot_oreo_I_6_WIP7_3_stock__US998init_spr_US_20D_PPMd_7z.zip
Click to expand...
Click to collapse
oreo_I_6_WIP8_stock
Branch:
https://github.com/zachariasmaladroit/android_kernel_lge_msm8998/commits/oreo_I_6_WIP8_stock
Changes:
faster initialization of kgsl/3d adreno graphics driver (quicker boot)
removed (for now): DTS Eagle - caused more noticeable humming/buzzing/whirring of sound at lower volume levels with aqstic (internal) DAC
timers: fix for lock contention and failing
CIFS/SMB: security fixes up-to-date [driver not used right now]
qcacld-3.0: updated WiFi driver & firmware to latest revision for Android 8.1
removed: LiveDisplay driver (only used in LineageOS; RR, etc. ?)
[eval] switched to 300Hz tickrate from 1000Hz tickrate which tends to be quite unstable on LG Stock ROMs
wcd934x: (internal DAC) a few fixes & improvements
removed/reverted: change that caused horizontal line of AOD display
several other changes
Click to expand...
Click to collapse
Known issues:
inverted color on AOD display [needs investigation] - e.g. red equals to turquoise for whatever reason
md5sum checksums:
8acd26556f1f6afe1659cff54fe61efc boot_H930_21A_oreo_I_6_WIP8_stock.img
32b8e679cdb8c066cdb945785334822c boot_H930_21A_oreo_I_6_WIP8_stock_PPMd_7z.zip
a29bda002d9c70f617180f3a955cb066 boot_oreo_I_6_WIP8_stock__H932_spr_US__tmo_US_20K.img
b06ddaba4f4c0124448b81ff78f479ba boot_oreo_I_6_WIP8_stock__H932_spr_US__tmo_US_20K_PPMd_7z.zip
3c46f82d1bb45e2fe3dfe5fc55f8b815 boot_oreo_I_6_WIP8_stock__US998init_spr_US_20E.img
e7d42505842abcb08e3ec0c90c26924d boot_oreo_I_6_WIP8_stock__US998init_spr_US_20E_PPMd_7z.zip
Click to expand...
Click to collapse
oreo_I_6_WIP9_7_5_2_stock
Leaving this here for a bit (from the Telegram Group https://t.me/LGEV30 ):
New experimental/WIP kernel for Stock LG ROMs [regression fix, headset detection might stop working after a while]
internet max throughput should be 25-30% higher than before, ZZMoove governor is onboard along with other custom ones (cultivation, impulse, blu_active), MPTCP got updated, additional fixes & improvements to cut down latency & raise stability, ppp subsystem has been updated and enhanced (potentially fixing VPN connection issue), peripheral-loader, slimbus, glink subsystem updated; camera actuator updated - uses boost to make zooming smoother, several other subsystems updated, cpu_input_boost used - screen output smoothing/boosting, oom handling fixed/improved, HSWAP (swap + lmk + page_alloc LG in-house variant) disabled in favor of upstream lmk, binder fixes and improvements, regulator fixes & improvements, mempolicy got updated, eliminated a few battery drainers (idle drain should be lower)
H930/H930DS, 21A:
https://drive.google.com/open?id=1iyX8yY8QuX1ZJv8VcUn9CEpx4bOtaU98
US998, 20E:
https://drive.google.com/open?id=1ne06IAK4AJ7k22OYiD91yicjkp0nGtZ-
H932, 20K:
https://drive.google.com/open?id=1s6y8YSEdh5QXheqPrEaqdSiiYdc6QsO-
open towards suggestions on how to reduce battery consumption of WiFi usage further
Click to expand...
Click to collapse
Kernel source branch:
oreo_I_6_WIP9_7_stock__H932__US998_spr_US
Click to expand...
Click to collapse
Note:
Attached file is a 7zip (PPMd compression) renamed to zip due to filesize limitation
rename to .7z and extract - some archiver can handle the file without renaming ...
#4
due to attachment size limitations - the file was packed with 7z PPMd (max) compression, then renamed to .zip, so: rename to .7z and unpack
afterwards flash the boot.img either
via fastboot flash boot boot
via TWRP
oreo_I_6_WIP7_3 (almost identical to current LG Stock ROM kernel)
Branch:
pie_I_6_WIP7_3
Changes:
rolled back kernel to earlier state (October 1st), troubleshooting stability
re-added sdcardfs aosp msm upstream changes, mostly "Drop dentry cache to prevent unknown file status" change in behavior (data integrity)
sdcardfs fixes
ext4, f2fs, ecryptfs and fscrypt updates and changes close to latest upstream
lockdep improvements
further oom, oom_reaper, fork-handling fixes and improvements
force 16b ECC for pstore
scheduler fixes (hmp.c; ...)
updated simple_lmk (not used in this branch)
[eval] reverting to basic optimizations for armv8-a
[eval] reverting to Google's 4.9 Toolchain (best compatibility, stability, etc.)
devfreq fixes and improvements
PCIe wake improvement for msm8998
configure i2c for bit-banging bus recovery
[eval] revert several previous changes
several other changes
Click to expand...
Click to collapse
md5sum checksums:
0639cd649bd4d8aa27bf2db5ed065761 boot_oreo_I_6_WIP7_3_H930_AOSiP-8.1-Derp_29.08.2018.img
3807e6991580b96ec796836c8c1f1bb7 boot_oreo_I_6_WIP7_3_H930_AOSiP-8.1-Derp_29.08.2018_PPMd_7z.zip
9ecaafd28851c2471c4c4de0dbd8e6be boot_oreo_I_6_WIP7_3_H930_lOS-15.1_27.09.2018.img
f148bd763cbb606508ac332b45ef15a7 boot_oreo_I_6_WIP7_3_H930_lOS-15.1_27.09.2018_PPMd_7z.zip
d9ead2f72bd19d02d50a9bf12bb85a79 boot_oreo_I_6_WIP7_3_H930_RR-O-6.1.0_29.08.2018.img
59aee22119d981b8aa91c1c846a5075e boot_oreo_I_6_WIP7_3_H930_RR-O-6.1.0_29.08.2018_PPMd_7z.zip
2a60f4130b4005736fdba05981cff408 boot_oreo_I_6_WIP7_3_H930_dotOS_2.5_27.09.2018.img
f7643c6f30c61755f7e066b4ff4d5fae boot_oreo_I_6_WIP7_3_H930_dotOS_2.5_27.09.2018_PPMd_7z.zip
Click to expand...
Click to collapse
these 4 different Kernel releases are needed because the ramdisk/init content is fundamentally different preventing the phone/ROM from booting if it doesn't match
Dirty Unicorns 9.0-based Kernels (06.10.2018 build):
see attachment
Checksums (md5sum) :
be498bf45017a28d7ead8ccada514868 boot_pie_I_6_WIP3__DU_9.0__06.10.2018.img
30c34e1566fece2ac8721868fa89b88c boot_pie_I_6_WIP3__DU_9.0__06.10.2018_PPMd_7z.zip
a4425bb19177033622d402c3b6795a4d boot_pie_I_6_WIP4__DU_9.0__06.10.2018.img
f89adcd02831700eed629195639497c7 boot_pie_I_6_WIP4__DU_9.0__06.10.2018_PPMd_7z.zip
please also take a look at the "experimental" folder if there are newer ones there (currently: 26.10.2018 - there are none newer ones)
edit (01.09.2018):
removed the attached kernel since 3 different kernels, depending on ROM, are needed to avoid confusion
edit (26.10.2018):
added updated kernels for recent AOSiP, lineageOS 15.1, Resurrection Remix Oreo 6.1.0, dotOS 2.5 builds (all Android Oreo, 8.1)
Interested in checking this out. Would I be able to get past bootloops on an already loaded rom full of Magisk mods or would this need to be done solely through clean rom flashes?
XCaliburX said:
Interested in checking this out. Would I be able to get past bootloops on an already loaded rom full of Magisk mods or would this need to be done solely through clean rom flashes?
Click to expand...
Click to collapse
Not sure what you mean with "solely through clean rom flashes"
Just do a TWRP backup of each partition separately: /boot, /system, /data
then get into fastboot:
boot into bootloader (adb reboot bootloader)
turn phone OFF, connect USB cable to phone, hold volume down - connect other end to PC
First test-run to see if it boots for you:
Code:
fastboot boot boot.img
then
Code:
fastboot flash boot boot.img
after that boot into TWRP and flash Magisk.
I've had Magisk installed before and after each kernel flash you, of course, need to install Magisk again (Magisk Mods probably, too - that at least was the case I tried NanoMod/microG via Magisk).
tl;dr
bootloops or longer booting would/could still happen no matter ROM state - ideally you should be able to flash or fastboot boot the new kernel without issues
Magisk always needs to be re-installed after new kernel (boot.img) flash, same applies to Magisk modules
Thanks
Nvm.
Thanks for your work. Is it possible to flash your kernel, as img, in twrp as usual ? Whithout using adb code ?
Envoyé de mon LG-H930 en utilisant Tapatalk
XCaliburX said:
Nvm.
Click to expand...
Click to collapse
Thanks for your comment (before replacing it )
You ran into any issues ?
The stable kernel/branch is more suitable to gain battery savings since it has the phy-off change included that allows the phy power supply to be turned off during idle state and the scheduler change (the "old" one doesn't - it constitutes the absolute bare minimum).
The scheduler change effectively reduces battery consumption during usage by approx. by half (confirmed with e.g. music playback with PowerAMP).
The flashing is actually quite straight-forward, the notes in OP / first post matches with the previous (incomplete) understanding I had how the device behaves and needs to be amended once I further understand how to most efficiently
do all the steps ...
The device (or bootloader) seems it's set up that way to bootloop (when a broken kernel/boot.img is flashed) - returning to the warning screen that the bootloader is unlocked - and once the phone was turned off (via Power button), it'll immediately boot successfully via the existing kernel on the boot partition to the ROM.
So with the boot.img files I offer actually non of the bootlooping should happen (after flashing Magisk, it'll reboot once but should boot into ROM afterwards).
There are additional power savings possible e.g. sending the GPU off to nap once it's idle but that needs careful tuning to reduce lag/non-smoothness - which I currently don't have time to do,
also we're limited to using the enhanced HMP kernel for now - EAS is off limits, so that should prevent further power savings and enhanced smoothness with high efficiency.
guigui33 said:
Thanks for your work. Is it possible to flash your kernel, as img, in twrp as usual ? Whithout using adb code ?
Envoyé de mon LG-H930 en utilisant Tapatalk
Click to expand...
Click to collapse
I haven't tried doing that yet,
but if that possibility is there it most probably should work - please give it a try
Merci
No problem flashing .img via TWRP. flashed the "stable" Kernel 2h after OP posted the links. Running fine for now w/o problems. Smooth as butter und more battery friendly than stock
Great work i have to say.
Cheers
Just a question. I replaced the kernel boot.img of a rom inside the zip with the "old" kernel. After coming across some problems, I decided to wipe partitions and restore a previous save. When I tried this, the restore would send me to the bootloader screen instead of rebooting. Is there something wrong with the save or does this mean there's some conflict with the kernel the phone's currently on and the saved restore's kernel? I'm only able to boot if I fresh reinstall the rom with the original kernel intact. Phone is a US998R.
Will try the "stable" kernel and report back if I come across anything.
XCaliburX said:
Just a question. I replaced the kernel boot.img of a rom inside the zip with the "old" kernel. After coming across some problems, I decided to wipe partitions and restore a previous save. When I tried this, the restore would send me to the bootloader screen instead of rebooting. Is there something wrong with the save or does this mean there's some conflict with the kernel the phone's currently on and the saved restore's kernel? I'm only able to boot if I fresh reinstall the rom with the original kernel intact. Phone is a US998R.
Will try the "stable" kernel and report back if I come across anything.
Click to expand...
Click to collapse
Both "old" and "stable" kernels use the "stock" modified ramdisk from SGCMarkus which was working fine while flashing his debloated (Korean origin) Stock ROM,
it could be that the device nevertheless is reacting allergic to modifications/deviations from a kernel which is very close to stock.
Can't really tell what could be the reason for it to react up - HOWEVER nothing in "old" kernel looks suspicious to can cause that.
tl;dr:
no idea
in case of doubt use completely stock kernel
don't forget to use rctd-disabler & no-verity/forced-encrypt disabler
once you have a working base, go from there
As someone with one of the"Franken-phones" ( h931 flashed to us 998 nougat and updated to Oreo via LGUP) would it be worth trying to flash this kernal? Currently these devices have issues with the Aosp roms and therefore require a rom that is closer to stock in order to avoid bootlooping. In settings my lgv30 displays as a H930 unit, so theoretically it could work.. would be nice to get a customized kernal. Any input would be appreciated. Thanks
MetaMaverick said:
As someone with one of the"Franken-phones" ( h931 flashed to us 998 nougat and updated to Oreo via LGUP) would it be worth trying to flash this kernal? Currently these devices have issues with the Aosp roms and therefore require a rom that is closer to stock in order to avoid bootlooping. In settings my lgv30 displays as a H930 unit, so theoretically it could work.. would be nice to get a customized kernal. Any input would be appreciated. Thanks
Click to expand...
Click to collapse
That's an AT&T/Time Warner model, right ?
it uses a different mode of operation/has changes in ecryptfs
runs in FIPS mode
has an in-built VpnClient security module which supports an "interceptor" netfilter module
doesn't seem to have multi-path (MPTCP) vs. the global model (or at least kernel config)
it comes with an enhanced TrustZone/qseecom driver "to enable Periodic Kernel Monitoring driver for LG IMA" (PKM)
adds support for "ccaudit logging using additional fifth buffer" (which doesn nothing ?)
haven't seen the ramdisk yet (boot.img ?)
but I guess there might be interference as soon as the kernel strays too much from stock since qseecom/TZ is involved which pretty quickly can lead to a non-booting kernel on Stock ROM (had it happen on Z5).
There might very well be additional changes from the global (H930) model - I've only looked at the main files so far ...
I have flashed the bleeding version, and it seems to be hard to boot with and to make a battery drain.
I'm on the stock twrp rom.
I flash then the stable kernel, and lt's better, the boot is fast and it seems to have no battery drain.
In case of problem, can you join the stock kernel in the topic to be flashable as image or zip via twrp ?
Good work !
Envoyé de mon LG-H930 en utilisant Tapatalk
Using the stable on ls998 stock and boots nicely...no issues so far...hopefuly be able to squeeze a bit of extra battery life out with it...thank you and great work...on another note i flashed as an image through twrp without issues
Reboots a few seconds after unlocking screen. Kmesg from twrp. Ls998 (converted from Verizon). Pretty sure twrp grabs the correct kmesg
Happens on stable and old.
TotallyAnxious said:
Reboots a few seconds after unlocking screen. Kmesg from twrp. Ls998 (converted from Verizon). Pretty sure twrp grabs the correct kmesg
Happens on stable and old.
Click to expand...
Click to collapse
Thanks for the feedback,
nope though:
Linux version 4.4.78-perf+ ([email protected]) (gcc version 4.9.x 20150123 (prerelease) (GCC) ) #11 SMP PREEMPT Sat Mar 24 22:16:32 CET 2018
Click to expand...
Click to collapse
that one's from SGCMarkus.
Can you post more info how your system is set up ?
zacharias.maladroit said:
Thanks for the feedback,
nope though:
that one's from SGCMarkus
Click to expand...
Click to collapse
I'm having trouble figuring out a way to get a kernel log then. The phone reboots too soon for adb. Any ideas? Google has only shown me ways when the phone is working normally and reboots.
---------- Post added at 02:01 AM ---------- Previous post was at 01:57 AM ----------
zacharias.maladroit said:
Can you post more info how your system is set up ?
Click to expand...
Click to collapse
Debloated from latest kdz Oreo. Magisk 16.4. I flash the img, flash magisk 16.4 then reboot. I've tried keeping wifi off (didn't change anything). I've tried with and without my personal magisk mod. All that's left is magisk mods like BusyBox and other utilities.

[REFERENCE] Umbrella Kernel

WARNING:
This is not a post targeted to end users. It is a development reference. If you expect any installable download or even added features out of this thread, please close your browser. Thank you.
What is Umbrella?
Umbrella is a project that aims to make the kernel sources that HMD released for Nokia 8 Sirocco (A1N) compatible with the Nokia 8 (NB1). The idea behind this is to replace the outdated 8.0 kernel sources that HMD released for NB1 with more up to date ones that are used in the 9.0 builds for Nokia 8 Sirocco.
Why do this, you might ask. Well, the answer is simple: The devices are so similar that HMD / FIH already have their kernel sources in a shared source tree. You can validate that yourself, by downloading the kernel config from a stock NB1 kernel (under /proc/config.gz), unpacking it, and searching for the commended entry "CONFIG_FIH_A1N". What umbrella does is take the sources that were released for A1N, readd all device specific files for NB1 (they were pruned) from it's original kernel soure, and integrate the stock kernel config (also called defconf) from NB1.
Doing this also lead to some other small quality of life improvements that are not directly relevant to an end user.
Umbrella contains the latest changes from linux-stable (v4.4.179 at the time of writing, compared to the stock v4.4.153), and Qualcomms Codeaurora upstream
The WiFi driver from Qualcomm is compiled directly into the kernel, instead of being loaded as a module. This allows you to flash umbrella based kernels to every build version while keeping everything else working correctly. The stock kernels use signature enforcement, which means that the wifi module that is loaded from the system partition has to be signed against the kernel, which is not the case for every custom kernel or even the kernels that were built for a different security patch.
Unlike the officially released kernel sources, umbrella does not have stupid typos in it's device trees that cause the phone to display white bars on all of your screen etc.
Umbrella disables the block that FIH put in place to prevent users from rebooting into EDL mode from within android (using adb reboot edl).
Umbrella also includes a patch that causes the device to not reset it's entire memory when the kernel crashes, therefore retaining the last kernel output log, which can be used for debugging
You can compile the kernel with compilers newer than GCC 4.9 (not clang though), without having it immideately crash at boot.
It includes a tool that automatically sets up a crosscompiling environment for the kernel.
What Umbrella is not
Umbrella is not a project to add significant new features, or the ability to tweak things beyond what the stock kernel already offers (which is technically not that bad). It aims to be a reference kernel, a base for (potentially) other kernels that are based on it and add those features. I know that that is kind of a broad goal, considering I am the only one who seems to do actual development for this phone, but who knows. Having a lower entry level might help in case someone is curious and wants to get into kernel hacking. And I would certainly be happy if I wasn't the only one developing for this device.
If you want Umbrella to contain features like:
Overclocking
More governors / schedulers / whatever
Color / Sound / whatever control
Wakelock blocking
etc. etc. etc.
then please Alt-F4 your browser right now. Ok, don't do that but at least please don't request it because it will make you get ignored, nothing else.
Why the name Umbrella?
While I developed the initial prototype I watched through 3 Resident Evil movies, and this is kinda a zombie project, so I think the name fits quite well.
Why are you posting this?
I am posting this because I am hoping that it will be useful for anyone that would like to get into kernel development and tweaking without the hassle that comes with setting up the kernel sources that are released by HMD.
But, one disclaimer: I am not a kernel developer. I am a curious CS student suffering from a bad mix of too much time and stupid ideas that solve stupid problems. I am trying my best to produce something useful and be of help, but please don't expect wonders from me, thanks.
Links?
Source: https://github.com/resident-nokia/umbrella
Download: None, this is a development reference.
Looks promising
Sent from my NB1 using XDA Labs
Nice. this will likely be useful in the future
Updated the umbrella source to the latest 4.4.180 kernel, and May 07 CAF tag (LA.UM.7.4.r1-05100-8x98.0). Also readded some NB1 specific code where it was missing (discovered by doing a diff against the 5140 kernel source that Nokia recently released).
Just in case anyone actually cares about it
THMSP said:
Updated the umbrella source to the latest 4.4.180 kernel, and May 07 CAF tag (LA.UM.7.4.r1-05100-8x98.0). Also readded some NB1 specific code where it was missing (discovered by doing a diff against the 5140 kernel source that Nokia recently released).
Just in case anyone actually cares about it
Click to expand...
Click to collapse
I do. Who knows, in a year's time I might have enough knowledge to build a custom Rom for this phone
Kernel sources which is used on pie has been released officially. Finally, we have an "original" kernel and we've got closed one more step to custom roms.
https://www.nokia.com/phones/en_int/opensource/
techno_man000 said:
Kernel sources which is used on pie has been released officially. Finally, we have an "original" kernel and we've got closed one more step to custom roms.
https://www.nokia.com/phones/en_int/opensource/
Click to expand...
Click to collapse
@THMSP it would be interesting to let us know how different is your kernel mod from the newly released official pie kernel for Nokia 8
MDV106 said:
@THMSP it would be interesting to let us know how different is your kernel mod from the newly released official pie kernel for Nokia 8
Click to expand...
Click to collapse
As I described here: https://forum.xda-developers.com/nokia-8/development/official-source-code-releases-nokia-8-t3930324, they are identical. The only difference are the device tree files (which still contain typos that break the display), and of course all modifications I made to the sirocco kernel source that Umbrella is based on (wifi driver, EDL mode reactivation, upstreaming, etc.)
THMSP said:
As I described here: https://forum.xda-developers.com/nokia-8/development/official-source-code-releases-nokia-8-t3930324, they are identical. The only difference are the device tree files (which still contain typos that break the display), and of course all modifications I made to the sirocco kernel source that Umbrella is based on (wifi driver, EDL mode reactivation, upstreaming, etc.)
Click to expand...
Click to collapse
So, are these new codes broken like 4.84?
techno_man000 said:
So, are these new codes broken like 4.84?
Click to expand...
Click to collapse
I wouldn't call Nokia sources broken, but I would call them incomplete, outdated and impractical to work with. And that hasn't changed.
Iam currently building device tree for nokia 8..
Unable to figure out how to edit init folder specifically for nokia8
[email protected] said:
Iam currently building device tree for nokia 8..
Unable to figure out how to edit init folder specifically for nokia8
Click to expand...
Click to collapse
Please do so! We can't let this phone die so early!
which defconfig file should choose?
lk
[email protected] said:
which defconfig file should choose?
Click to expand...
Click to collapse
nb1_defconfig is for Nokia 8
Can somebody help me? I have built Lineage OS 16.0 for the Nokia 8 with the Umbrella Kernel. However I am facing issues with getting it into work. Firstly TWRP fails to flash it with error 7. I am including the recovery.log file in case anyone wants more detail. I then proceeded to extract the payload.bin file, and flashed boot.img and system.img seperately. However that didnt work either as my phone got stuck at the Bootloader unlocked warning screen. If anyone is interesteed I can upload the .zip outputed by the build
Device Tree: https://github.com/GPUCode/android_device_nokia_nb1
Recovery.log: https://hastebin.com/akohutiwed.sql
Thanks in advanced
emufan4568 said:
Can somebody help me? I have built Lineage OS 16.0 for the Nokia 8 with the Umbrella Kernel. However I am facing issues with getting it into work. Firstly TWRP fails to flash it with error 7. I am including the recovery.log file in case anyone wants more detail. I then proceeded to extract the payload.bin file, and flashed boot.img and system.img seperately. However that didnt work either as my phone got stuck at the Bootloader unlocked warning screen. If anyone is interesteed I can upload the .zip outputed by the build
Device Tree: https://github.com/GPUCode/android_device_nokia_nb1
Recovery.log: https://hastebin.com/akohutiwed.sql
Thanks in advanced
Click to expand...
Click to collapse
hey, did you wipe userdata before flashing this? I think you need to do that, like when switching to using GSIs.
also, have you checked this https://github.com/resident-nokia/twrp? Specifically the fstab file for NB1.
oaid said:
hey, did you wipe userdata before flashing this? I think you need to do that, like when switching to using GSIs.
Click to expand...
Click to collapse
Thanks for the suggestion. I have flashed GSIs before but never had any problems. Also I cannot find any userdata partition in TWRP. I asked in the Lineage OS discord and I was told that probably that TWRP image is broken. I am confused
emufan4568 said:
Thanks for the suggestion. I have flashed GSIs before but never had any problems. Also I cannot find any userdata partition in TWRP. I asked in the Lineage OS discord and I was told that probably that TWRP image is broken. I am confused
Click to expand...
Click to collapse
that's the data partition, if I'm not mistaken ?*
which twrp image are you using? Maybe try Dorian's latest?
oaid said:
that's the data partition, if I'm not mistaken ?*
which twrp image are you using? Maybe try Dorian's latest?
Click to expand...
Click to collapse
Yes I am using the latest TWRP. Before flashing I erased the data partition but still the error persisted

Categories

Resources