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.

"image"

"image"

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

su

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.

"image"

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.

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

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.

"image"

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

Post Author: Dr Dee

28 thoughts on “Increase your android phone’s RAM without any RAM expander

    OSAMA

    (May 17, 2015 - 9:04 am)

    first iloved your post i really hate those paid bloatwarethank 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.

    brainydaps

    (July 18, 2015 - 10:14 pm)

    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.

    NONAME01.DUC

    (November 2, 2015 - 3:05 pm)

    My phone says: “swapon: /sdcard/swap/swap: Invalid argument”, and i don’t know how to fix it, can you help me?

    brainydaps

    (November 2, 2015 - 3:10 pm)

    Try changing sdcard to sdcard0 then try it again, if it doesn’t work then change it to sdcard1, and try it again

    NONAME01.DUC

    (November 2, 2015 - 3:29 pm)

    Nothing changes

    brainydaps

    (November 2, 2015 - 3:32 pm)

    Try and read the instructions carefully again, and make sure you put the right spacing and punctuation properly, make sure Ur swap file was even created successfully, and be patient, u might have rushed something somewhere that’s causing the error.

    NONAME01.DUC

    (November 2, 2015 - 3:48 pm)

    It does not have any error, swap file created successfully, it about 1.5Gb, but i can’t turn it on

    Dr_Dee

    (November 24, 2015 - 12:43 pm)

    Reinstall busybox. That should solve the problem

    Increase your android phone’s RAM without any RAM expander | Welcome to the world of an eccentric nerd!

    (December 4, 2015 - 12:17 am)

    […] post has been moved here , sorry for the […]

    ezekiel

    (January 9, 2016 - 3:54 pm)

    just tried it no error report every thing worked fine even the intial command how to i know id=f d ram increased

    Kumar Siddhant

    (May 2, 2016 - 7:22 pm)

    It still keeps showing “invalid argument” I have even tried roehsoft ram expander.. Even that’s returning the same message.. Any ideas?? I desperately need more ram!! My fifa 16 is running on like 0.25 fps!!!!

    Adrian

    (June 8, 2016 - 4:02 pm)

    BUSYBOX SWAPON /SDCARD/SWAP/SWAP Applet not found ??

    Dr_Dee

    (June 9, 2016 - 11:09 am)

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

    zaiiii

    (June 16, 2016 - 6:47 pm)

    hey there , im getting same trouble that terminal say “invlid argument” can you please solve it

    Dr_Dee

    (June 16, 2016 - 6:48 pm)

    You haven’t given enough details for me to help you.

    XXX

    (June 28, 2016 - 11:03 am)

    I types the 2 nd code in terminal and its showing busy box not found? What to do

    Dr_Dee

    (June 28, 2016 - 12:19 pm)

    Install busybox properly

    Emman

    (August 8, 2016 - 1:08 pm)

    /Sdcard/swap/swap 1200000
    Can’t execute permission denied

    What should I do now?

    Dr_Dee

    (August 8, 2016 - 9:28 pm)

    Root your phone

    Emman

    (August 8, 2016 - 11:20 pm)

    Its rooted by kingroot sir

    Dr_Dee

    (August 8, 2016 - 11:26 pm)

    Try the internal memory(the other memory) then.

    Ade

    (February 1, 2017 - 6:35 am)

    Can this work for a windows phone

    Dr_Dee

    (February 1, 2017 - 7:35 am)

    No, only android phones

    Rii

    (March 7, 2017 - 2:55 pm)

    Mine worked out well but when activating it shows ‘invalid argument’. I need help please…

    nazz

    (June 4, 2017 - 7:03 pm)

    how to know if the swap file is active

    nazz

    (June 4, 2017 - 7:05 pm)

    how to know if the swapfile is active

    rayblaze

    (July 5, 2017 - 5:07 am)

    /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?

    rayblaze

    (July 5, 2017 - 5:17 am)

    /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.

Leave a Reply

Your email address will not be published. Required fields are marked *