How to Enable ZRam or Swap in Any Android Rom Default in Boot.img
Hi guys, Welcome back to Techy Buff Today I will guide You How you can enable Zram or Swap in any rom default in boot.img of Android Devices
What Is Zram or Swap??
ZRam is a Linux kernel function that gives a form of virtual memory compression. zram increases overall performance by keeping off paging to disk and the usage of a compressed block device in RAM instead, inside which paging takes area until it is essential to apply the swap area on a hard disk drive. Since using zram is an alternative way to provide swapping on RAM, zram allows Linux to make a better use of RAM when swapping or paging is needed, specifically on older Devices with much less RAM installed. It is pretty helpful for those who have low end Android devices and want to get better performance in their Low end Smartphones. It is a virtual Ram, Not actual Ram but gives some smoothness in your phone
Please Do not try this method if you do not have any knowledge about porting Android Custom Rom otherwise you will mess up your Android smartphones and it will not get started again.
Requirements to enable ZRam in Boot img of your Android Devices
1. PC and computer knowledge
2. Knowledge about unpacking and repacking of boot.img
3. Notepad++
4. A working brain :p
Step by Step to enable ZRam in Boot.img of your Android Custom Rom or Stock Rom
1. Download these 4 tiny*** files (Bin Files to download) and Extract it
you will get following 4 files listed below
a. tiny_mkswap
b. tiny_swapoff
c. tiny_swapon
d. tiny_switch
Now Copy these files
Extract the Rom(in which you want to enable swap or zram)
Now go to System - Bin folder and paste those four files here (all tiny** files)
2. Unpack the boot.img and go to initrd or Ramdisk folder
and check, is there any enableswap.sh file?
if yes then you don't need to do or edit anything in boot.img
If it is not there, Download this zip file (Boot.img Files).. You will see these two following files listed Below
a. enableswap.sh
b. swap line.txt
Now copy enableswap.sh and paste in the initrd or ramdisk folder..
Now open swap line.txt and press CTRL + A and copy all Lines. Now do as the instructions are given below as per your Android Version
1. If your rom is KitKat (4.4.x)
open init.rc (in ramdisk or initrd folder) with Notepad++
and paste in bottom.. and Save it
Repack the boot.img and replace it with your existing boot.img..zip the Rom And Flash it
2. If your Rom is Lollipop (5.x)
open init.mt6582.rc (in ramdisk or initrd folder) with Notepad++
and paste in bottom.. and Save it
Repack the boot.img and replace it with your existing boot.img..zip the Rom And Flash it
3. your rom is Marshmallow or Nougat (6.0.x or 7.x)
Open init.mt6582_common.rc (in ramdisk or initrd folder) with Notepad++
Now paste it in bottom.. and Save it ( if init.mt6582_common.rc is not available.. Paste it in init.mt6582.rc)
Repack the boot.img and replace it with your existing boot.img..zip the Rom And Flash it
Note:- Using This Guide You can enable only 512MB ZRam or Swap in your custom rom. Credit to XDA Developers
If you have any queries about this guide, please comment down.. I will try to help as soon as possible
ATTENTION! For all the actions with your phone, the administration of the site is not responsible! All the operations you do at your own risk!
Post a Comment