[KERNEL][CM13] Kernel with ZRAM swap

Search This thread

Krush206

Member
Sep 4, 2016
38
18
Hello! After many years without development, today I'm sharing a new kernel with ZRAM and swap support for this device.
The kernel is based upon weritos' Cyanogenmod 13 kernel source code and should work on both rev. 1 and rev. 2 devices.

Installation procedure is as follows:
1. Download the latest TWRP, kernel build and modules.
2. Install the kernel and TWRP from ADB shell (the device must be booted into Android) or a terminal app:
Bash:
su (from a terminal app; not required from ADB shell)
cat </path/to/TWRP_image> > /dev/block/mmcblk0p13
cat </path/to/kernel_image> > /dev/block/mmcblk0p8
reboot recovery
3. Install the kernel modules:
Bash:
mount /dev/block/mmcblk0p21 /system
unzip -o </path/to/modules.zip> -d /system/lib/modules
4. Done! Reboot into Android.

NOTE: The < and > symbols should never be issued within the commands!

Version Information
Status: Beta (Bluetooth, camera recording and screen recording do not work.)

Created: 2021-05-11
Last Updated: 2021-05-12 (Import and enable Ultra KSM driver.)
 
Last edited:
  • Like
Reactions: Turkish developers

SerjSX

Senior Member
Oct 26, 2019
57
12
@Krush206 it's saying can't open zip file on the last step, how to fix??
fixed it, I was supposed to write:
Code:
unzip -o /sdcard/modules.zip -d /system/lib/modules

instead of:
Code:
unzip -o /storage/emulated/0/modules.zip -d /system/lib/modules

in TWRP terminal.

However, how do I know if it successfully worked?? My phone booted up normally but no sign that shows if it worked 100% or not. @Krush206
 
  • Like
Reactions: Turkish developers

Krush206

Member
Sep 4, 2016
38
18
I still have this device, will this kernel with twrp installed fix the crashing problems in cm 13, thanks for your effort
This is the reason I exported the ZRAM driver to the kernel. However, I have noticed it breaks Wi-Fi, so I will have to fix it for proper testing.
However, how do I know if it successfully worked?? My phone booted up normally but no sign that shows if it worked 100% or not.
Either install Termux (or a terminal app of your choice) or use ADB and issue the free -m command.
 

SerjSX

Senior Member
Oct 26, 2019
57
12
This is the reason I exported the ZRAM driver to the kernel. However, I have noticed it breaks Wi-Fi, so I will have to fix it for proper testing.

Either install Termux (or a terminal app of your choice) or use ADB and issue the free -m command.
Hi, thanks for your response. Just did i and looks like it worked, 59 total swap, used 58, and free 541.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    @Krush206 it's saying can't open zip file on the last step, how to fix??
    fixed it, I was supposed to write:
    Code:
    unzip -o /sdcard/modules.zip -d /system/lib/modules

    instead of:
    Code:
    unzip -o /storage/emulated/0/modules.zip -d /system/lib/modules

    in TWRP terminal.

    However, how do I know if it successfully worked?? My phone booted up normally but no sign that shows if it worked 100% or not. @Krush206
  • 1
    Hello! After many years without development, today I'm sharing a new kernel with ZRAM and swap support for this device.
    The kernel is based upon weritos' Cyanogenmod 13 kernel source code and should work on both rev. 1 and rev. 2 devices.

    Installation procedure is as follows:
    1. Download the latest TWRP, kernel build and modules.
    2. Install the kernel and TWRP from ADB shell (the device must be booted into Android) or a terminal app:
    Bash:
    su (from a terminal app; not required from ADB shell)
    cat </path/to/TWRP_image> > /dev/block/mmcblk0p13
    cat </path/to/kernel_image> > /dev/block/mmcblk0p8
    reboot recovery
    3. Install the kernel modules:
    Bash:
    mount /dev/block/mmcblk0p21 /system
    unzip -o </path/to/modules.zip> -d /system/lib/modules
    4. Done! Reboot into Android.

    NOTE: The < and > symbols should never be issued within the commands!

    Version Information
    Status: Beta (Bluetooth, camera recording and screen recording do not work.)

    Created: 2021-05-11
    Last Updated: 2021-05-12 (Import and enable Ultra KSM driver.)
    1
    @Krush206 it's saying can't open zip file on the last step, how to fix??
    fixed it, I was supposed to write:
    Code:
    unzip -o /sdcard/modules.zip -d /system/lib/modules

    instead of:
    Code:
    unzip -o /storage/emulated/0/modules.zip -d /system/lib/modules

    in TWRP terminal.

    However, how do I know if it successfully worked?? My phone booted up normally but no sign that shows if it worked 100% or not. @Krush206