Increase your android phone’s RAM without any RAM expander


I know most people are probably frustrated with the fact that their phone hangs, lags and sometimes freezes. They may have realized that this is due to insufficient RAM on your phone. Some have tried downloading a RAM expander which uses a portion of your SD card as RAM. But the problem is that the application makers are asking for money to use it.

The truth however, is that you can use the right terminal emulator and some codes to create and use a portion of your sdcard as RAM  without using any RAM expander application.

Isn’t that good news?

What you need:
1)Terminal emulator (download from Play Store)
2)DroidEdit Free (download from Play Store)
3)A good SD card at least 4GB capacity.
4)Busybox (download from Play Store)
5)A rooted android phone(search Google on how to root your phone)

Download and install Busybox first, all other application would work based on Busybox. Confirm every prompt that shows up in the busy box. You don’t need to wait for smart install to complete – you can immediately install Busybox like that.

After successful installation, go to your SD card and create a folder. Name it “Swap”.

Then open DroidEdit free, click on the first icon at the bottom left of the application. Next, click on “save as” and choose local. After that, choose your SD card, then clear  “untitled” and type “swap” (i.e. save as swap)then click create,choose /storage/sdcard1/swap as the folder you wish to save the empty file called swap.



After creating the empty file swap in the swap folder, check to see if the file named swap is in the folder named  swap,the swap size would be zero.

Now open the terminal emulator and type this code below


This is to grant terminal emulator super user(su ),grant it super user permission then type this code again

busybox mkswap /sdcard/swap/swap 1200000

1200000 is the size of the swap file you want to create in byte,Which is equal to about 1.2Gb,but after creating the swap file it would be less than 1.2Gb because (1024kb=1mb)
Wait for some minutes for the swap file to be created, when it’s completed you would see the information about the newly created swap file written in the terminal emulator. Let’s proceed to activating the swap file.
Type below the code into the terminal emulator

busybox swapon /sdcard/swap/swap

Then to set the swappiness, type in the following code

echo 40> /proc/sys/vm/swappiness

That means we have set the swappiness to 40 on a scale of 100,swappiness is the rate at which your system transfers dormant applications from the RAM to the swap file,it indicate how readily your system transfers dormant memory from RAM to swap, that are currently idle until when called upon by opening the idle application,this way we indirectly increase the RAM or lets say reduce the burden of the RAM. I recommend  swappiness of 40.
Then to check if the swap file is activated,type the following code:

busybox free

You would be shown the RAM usage and also swap  usage,if swap is not active,all the three values of total, used and free would be zero. But if it’s active you would see the size of the swap in total and free,used would still be zero because system hasn’t used any of it yet.


Now the last step, is to automate this whole process because every time you switch on your phone, swap is not activated until you activated it yourself,So click on menu of the terminal emulator, select “preferences” then scroll down to initial command,then type in the code accordingly, to move to next line of code  press enter key on your keyboard.

busybox swapon /sdcard/swap/swap
echo 40> /proc/sys/vm/swappiness

The last line of code,you can use either “free” or “busybox free” anyone works.
Then click ok.
Remember if you dont set the swappiness ,the default value would be 60,instead of 40 when you set it to 40.


After all is set and done ,ensure that you always start terminal emulator whenever you switch on your phone,to activate the swap file,or you make terminal emulator auto start on boot,however you want it.

Enjoy!  And don’t forget to subscribe for more tips and tricks. See ya!  😄:D


  1. first iloved your post i really hate those paid bloatware
    thank you for this post
    second your rom is very cool can share it to me?
    or link me?
    idont care if its for jelly Bean or kitkat just share thak you.

    • Hello thanks for the review. I made an article on my site about how to make your jellybean look like android KitKat, I actually used gravity box and xposed installer together with ifont to customize my phone.

    • That means you did not install busybox completely, pls update busybox or reinstall it and be patient enough for the installation process to complete.

  2. /sdcard/swap/swap not found, i tried replacing it with /storage/external_sd/swap/swap but it doesnt give any response and then when i type 1200000 it responded 1200000 not found. omg pls help me. did i miss something?

  3. /sdcard/swap/swap not found,i tried trial and errors and somehow replace /sdcard/swap/swap to /storage/external_SD/swap/swap but no response from emulator, i tried /sdcard0/, sdcard1,and sdcard2 still says not found. My swap file is in swap folder in my memorycard but emulator cants seem to find it. pls help me, i been working on this for 8hr straight 🙁 i want to learn.