Featured Post

All Miui 9 Beta Update for Huawei Honor Holly | Honor 3C Lite | Hol-U19

Continue reading

Tuesday, October 3, 2017

How to Enable ZRam / Swap in Any Android Rom Default in Boot.img



How to Enable ZRam / Swap in Any Android Rom Default in Boot.img


Hi guys..Today I will guide You How to enable Zram/Swap in any rom default in boot.img

What Is Zram/Swap??

zram is a Linux kernel function that gives a form of virtual memory compression. zram increases overall performance by way of 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/paging is needed, specifically on older Devices with much less RAM installed


Rquirement


1. PC
2. Knowledge about unpacking and repacking boot.img
3. Notepad++
4. a working brain

Let's Start

1. download these 4 tiny*** files (Click Here) 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 do 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 see is there any enableswap.sh file?
if yes then no need to do or edit anything in boot.img

If no, Download this zip file (Click Here).. You will see these two following files listed Below


a. enableswap.sh
b. swap line.txt

Now copy enableswap.sh and paste in initrd or ramdisk folder..

Now open swap line.txt and press CTRL + A and copy all Lines

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++
and paste 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



  • If you have any queries  about this guide, 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!
  • Note:- If You Like my work, Please Click On Ads to Support Us
Previous Post
Next Post

About Author

3 comments:

  1. No working on my mt6580 kernel 3.18.19+ Lineage OS 14.1

    ReplyDelete
    Replies
    1. This comment has been removed by the author.

      Delete
    2. Tested by me and my many friends... It's 100% working guide... Just follow all process carefully

      Delete

Click Me

Popular Posts

Widget by :Wasim Raja