[KERNEL][OREO] [SM-T830/T835] [2019-11-21] Modesty 1.0.0 [Linux 4.4.202] [ARK4]

Search This thread

ianmacd

Senior Member
Jan 5, 2016
2,332
3,735
Amsterdam
localhost
Version 0.99.48 released.

Linux 4.4.201 followed 4.4.200 so quickly that it would be churlish not to merge it, so here we have one final release before I switch the version number to v1.0.0.

Change log

v0.99.48 (2019-11-13)

  • Updated to Linux 4.4.201.
 

ianmacd

Senior Member
Jan 5, 2016
2,332
3,735
Amsterdam
localhost
Version 0.99.49 released.

Today was going to be the day that I released v1.0.0, but then another Linux kernel appeared, so here's another round of beta.

If no new problems show up and no new Linux kernel is releasing in the next few days, this version will be promoted to v1.0.0.

Change log

v0.99.49 (2019-11-16)

  • Updated to Linux 4.4.202.
 
Last edited:

ianmacd

Senior Member
Jan 5, 2016
2,332
3,735
Amsterdam
localhost
Stable version 1.0.0 released.

It's finally here: Stable release 1.0.0.

And with that, my involvement in this project draws to a close.

The last version of this kernel to receive more than 10 downloads was version 0.99.27, some 6 months ago. That was probably the moment at which the 9.0 release of Android became widely available for these devices, triggering a mass migration.

Merging each new Linux kernel has been getting progressively more difficult for a while now, with my first attempt often not booting at all. Apart from the investment of time this implies, which I can no longer justify for the handful of users still interested in the project, it's imperative to retain a Tab S4 on which to test, and that's something I can no longer commit to. For me, it's time to reinstall the Tab S4 and hand it down to one of my children.

The beauty of GPLed code is that anyone with a need can now pick up where I'm leaving off. My retirement need not signal the end of Modesty.

Thank you for your interest in the project and your support over the last 13 months.

Change log

v1.0.0 (2019-11-21)

  • Kernel proclaimed stable. Version number incremented. No code changes since v0.99.49.
 

giorgio183

New member
May 15, 2021
2
0
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[/INDENT]
[INDENT]-rwxrwx--x 1 root sdcard_rw 0 2018-09-15 14:31 /storage/0000-0000/.modesty_magisk[/INDENT]
[INDENT]star2lte:/ $ ls /storage/0000-0000/Magisk/Magisk-* | tail -n 3[/INDENT]
[INDENT]/storage/0000-0000/Magisk/Magisk-v17.2-2018091001-ianmacd.zip[/INDENT]
[INDENT]/storage/0000-0000/Magisk/Magisk-v17.2-2018091201-ianmacd.zip[/INDENT]
[INDENT]/storage/0000-0000/Magisk/Magisk-v17.2-2018091501-ianmacd.zip[/INDENT]
[INDENT]
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


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.
Hello , do you know if it's possible downgrade S4 from 10 to Oreo and install Modesty? Thank you
 

abujoo

New member
May 18, 2021
4
0
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[/INDENT]
[INDENT]-rwxrwx--x 1 root sdcard_rw 0 2018-09-15 14:31 /storage/0000-0000/.modesty_magisk[/INDENT]
[INDENT]star2lte:/ $ ls /storage/0000-0000/Magisk/Magisk-* | tail -n 3[/INDENT]
[INDENT]/storage/0000-0000/Magisk/Magisk-v17.2-2018091001-ianmacd.zip[/INDENT]
[INDENT]/storage/0000-0000/Magisk/Magisk-v17.2-2018091201-ianmacd.zip[/INDENT]
[INDENT]/storage/0000-0000/Magisk/Magisk-v17.2-2018091501-ianmacd.zip[/INDENT]
[INDENT]
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


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.
thanks
 

Top Liked Posts

  • There are no posts matching your filters.
  • 19
    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


    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.
    9
    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.
    6
    Version 0.99.18 released.

    Change log

    • Updated to Linux 4.4.172.
    6
    Stable version 1.0.0 released.

    It's finally here: Stable release 1.0.0.

    And with that, my involvement in this project draws to a close.

    The last version of this kernel to receive more than 10 downloads was version 0.99.27, some 6 months ago. That was probably the moment at which the 9.0 release of Android became widely available for these devices, triggering a mass migration.

    Merging each new Linux kernel has been getting progressively more difficult for a while now, with my first attempt often not booting at all. Apart from the investment of time this implies, which I can no longer justify for the handful of users still interested in the project, it's imperative to retain a Tab S4 on which to test, and that's something I can no longer commit to. For me, it's time to reinstall the Tab S4 and hand it down to one of my children.

    The beauty of GPLed code is that anyone with a need can now pick up where I'm leaving off. My retirement need not signal the end of Modesty.

    Thank you for your interest in the project and your support over the last 13 months.

    Change log

    v1.0.0 (2019-11-21)

    • Kernel proclaimed stable. Version number incremented. No code changes since v0.99.49.
    5
    Version 0.99.10 released.

    The 0.99.10 release brings the inclusion of the KCAL advanced colour/gamma control driver. Amongst other things, @Chainfire's CF.lumen can make good use of this to efficiently apply a blue light filter to your screen. Android Oreo has a built-in blue light filter, of course, but in my opinion it leaves much to be desired. There is no gradual transition to night mode and when active, colours appear oversaturated. If, like me, you had abandoned CF.lumen on Oreo, you may wish to revisit that decision.

    The number of tracing and logging features has also been further reduced in this release. Such features really have no place outside an internal engineering build and cause the kernel's footprint to be unnecessarily large, both on disk and when loaded into memory. Pretty much only logging features I have left enabled are those that are actually useful, plus those whose removal causes recurring messages to be emitted to the system log.

    Disabling some of these logging features caused a spurious and rather grave-sounding Android System warning to appear on boot, the solution to which was to have the kernel falsely report a stock config to user land when queried via /proc/config.gz. Please be aware, therefore, that this is no longer a reliable mechanism. GitHub is the definitive source of the configuration actually used to build the kernel.

    Finally, Linux 4.4.164 appeared as I was preparing 0.99.10 for release, so this has also been merged.

    All users on ARJ3 firmware are encouraged to upgrade.

    Here's a comparison of the memory used by Modesty 0.99.10 vs. 0.99.9 (and 0.99.9 was already much improved over the stock kernel):

    Code:
        0.99.9: Memory: 3169928K/3856128K available (19582K kernel code, 2183K rwdata, 10888K rodata, 7424K init, 8001K bss, 501880K reserved, 184320K cma-reserved)
        0.99.10: Memory: 3172276K/3856128K available (19390K kernel code, 2151K rwdata, 9740K rodata, 5952K init, 7669K bss, 499532K reserved, 184320K cma-reserved)

    Change log

    • 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.
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone