[Galaxy S 4 i9505 Original Android Development] Creeper36:
.

How to Install a Stock Kernel in Optimized CM13:

* NOTE: The Official CM13 kernel is still under development and may cause some undesirable effects. Proceed with the knowledge that this is not perfect and you may need to Restore your Optimized CM13 ROM with Optimized CM13 kernel. I will not be held responsible for undesirable problems.

* SUPERUSER NOTE: A basic Superuser is pre-installed with this Rom (called 'Privacy Guard)'. When Privacy Guard prompts you for Superuser access, click 'Remember my choice' and hit 'ALLOW'. You will be prompted several times for this. You MUST choose 'ALLOW' or this process will Fail.

In order to install a stock kernel in Optimized CM13 you will need to backup the kernel that comes in Official CM13. The Official CM13 kernel is considered 'stock' for Optimized CM13. You will need to install the Official CM13 ROM that is closest to your S4 variant, backup the Official CM13 kernel using Flashify (an app from the Play Store), then Restore the backup over the Optimized CM13 kernel.

= Boot into Recovery and WIPE ALL! (You cannot use an Optimized CM13 ROM Backup for this process.. it must be a clean install).

= Install Official CM13 > http://download.cyanogenmod.org/

= Install Gapps > https://github.com/opengapps/arm/releases/ (look for: "open_gapps-arm-6.0-pico-[DATE].zip")

= Clear Cache/Dalvik and then Reboot

= Once you have finished your First Boot you will need to gain Root.

= Goto: Settings > About Phone .. tap 'BUILD NUMBER' 7 times to unlock Developer Options

= Goto: Settings > Developer Options > ROOT ACCESS

= Change ROOT from 'OFF' to 'APPS and ADB' .. This enables 'Privacy Guard' to function -- SEE SUPERUSER NOTE ABOVE.

= Install from the Play Store the following Apps: Busybox, Flashify, ES File Explorer

= Open Busybox and Install the internal Busybox apps.

= Reboot

= Open Flashify and select 'Backup/Restore TAB', then select 'Backup Current Kernel'.

= Backup the Official CM13 kernel to 'sdcard' .. (this is the internal sdcard partition).

= Open ES File Explorer and goto: 0 (internal sdcard) > Android > Data .. then COPY the folder 'com.cgollner.flashify' to the External MicroSD Card.

= Reboot into Recovery and Wipe ALL! (You cannot use an Optimized CM13 ROM Backup for this process.. it must be a clean install).

= Install Optmized CM13 and Gapps and go through the normal First Boot setup. (You cannot Flash a SuperSU at this point.. it will created a Bootloop.)

= Once you have finished your First Boot you will need to gain Root.

= Goto: Settings > About Phone > ROM .. tap 'BUILD NUMBER' 7 times to unlock Developer Options

= Goto: Settings > Developer Options > ROOT ACCESS

= Change ROOT from 'OFF' to 'APPS and ADB' .. This enables 'Privacy Guard' to function -- SEE SUPERUSER NOTE ABOVE.

= Goto: Settings > About Phone > Rom .. look at Kernel Version.

= Install from the Play Store the following Apps: Busybox, Flashify, ES File Explorer

= Open Busybox and Install the internal Busybox apps.

= Reboot

= Open Flashify and backup the Optimized CM13 kernel (this is used to create the folders/settings necessary for restore).

= Install ES File Explorer and goto: 0 > Android > Data .. then delete the folder 'com.cgollner.flashify'.

= Copy 'com.cgollner.flashify' that you copied to the External MicroSD Card from above and place it in 0 > Android > Data.

= Reboot

= Open Flashify and under 'Restore' choose the kernel from Official CM13 (example: cyanogenmod-xxxxxxx #1).. then Choose 'YUP!' and 'Reboot Now'.

= Goto: Settings > About Phone > Rom .. look at Kernel Version.. it should be changed from previous look.

= You have successfully installed the Stock Kernel into Optimized CM13.

= Offical CM13 kernel is in 'ENFORCING' mode.. you will need to download and Flash "MAKE-PERMISSIVE" to change this before SuperSU is flashed or installed. FAILURE WILL RESULT IN A BOOTLOOP.

= SuperSU can now be flashed or installed from the Play Store.

.