Swap for Samsung Galaxy Tab 3 8.0

ax562

Senior Member
Aug 8, 2012
123
73
0
DISCLAIMER:
I AM NOT RESPONSIBLE FOR YOUR DEVICE OR ANYTHING THAT MIGHT OCCUR WHILE USING THIS TUTORIAL. TRY AT YOUR OWN RISK!


Credits:
[mbm] for teaching me this dd terminal method.

As we all know, for what ever reason, Samsung decided to release the Tab 3 model tablets with 1 GB of ram. I believe this system needs more ram but unfortunately we cannot upgrade the hardware. What we can do is create virtual memory or a "Swap file" that acts like ram to help our Tab 3's out with multitasking and other memory hogging tasks. Below are the steps to:

1. Create a swap file.
2. Create a script file to run at boot from your /system/etc/init.d directory.
3. Create a android system with 1GB of RAM and 1GB of swap file virtual memory. :D

*Remember whatever device you are using must have a rom with init.d support and be rooted.


STEP 1: TERMINAL COMMANDS PT.1
Download terminal emulator from the play store if you don't already have it.
https://play.google.com/store/apps/details?id=jackpal.androidterm&hl=en

Open terminal emulator and execute these commands in order:

1. "su"
2. "cd /system"
3. "mount -o rw,remount /system"
4. "dd if=/dev/zero of=swapfile bs=1m count=600" (be patient, this step takes about a minute)
5. "mkswap swapfile"
6. "chmod 755 swapfile"

STEP 2: INIT.D SWAP FILE TEXT CREATION
Now to create a script to execute at boot every time you boot your phone. I used the app QuickEdit from the play store.
https://play.google.com/store/apps/details?id=com.rhmsoft.edit
Now open that up and put the text below in the file:

"mount -o rw,remount /system
swapon /system/swapfile"

Now save that to your sdcard (/sdcard) as "swap" (remember do not save with the .txt)



STEP 3: TERMINAL COMMANDS PT.2
Now go back into terminal and execute these commands:

1. mv /sdcard/swap /system/etc/init.d
2. chmod 755 /system/etc/init.d/swap

I kept my previous terminal session open but if you closed it for what ever reason you might have to execute "su" and then "mount -o rw,remount /system" before the two commands in step 3.

STEP 4:
Reboot and win. :laugh::good::laugh::cool:

To verify that the process has worked, after reboot, bring up terminal emulator and type "free -m". You should see that swap has more than 600M! This will stick after reboot. If for whatever reason you want to get rid of your swap file just delete the "swapfile" file and the "swap" script. Enjoy!

 
Last edited:

Ibbi786

Senior Member
Nov 13, 2015
263
70
0
New Delhi
DISCLAIMER:
I AM NOT RESPONSIBLE FOR YOUR DEVICE OR ANYTHING THAT MIGHT OCCUR WHILE USING THIS TUTORIAL. TRY AT YOUR OWN RISK!


Credits:
[mbm] for teaching me this dd terminal method.

As we all know, ......

Thanks for the tutorial, but on which ROM have you tested this? :)
 

sandeep0048

Senior Member
Aug 26, 2012
244
45
0
MUMBAI
Was just wondering which space does it uses to swap the memory and create virtual memory? Do we have to use sdcard and den make partitions there is no such step in this...

Sent from my SM-T311 using XDA-Developers mobile app

---------- Post added 24th July 2016 at 12:22 AM ---------- Previous post was 23rd July 2016 at 11:30 PM ----------

After 5,th step it shows swapfile needs to be atleast 40kb... What to do for dat?

Sent from my SM-T311 using XDA-Developers mobile app
 

ax562

Senior Member
Aug 8, 2012
123
73
0
Was just wondering which space does it uses to swap the memory and create virtual memory? Do we have to use sdcard and den make partitions there is no such step in this...

Sent from my SM-T311 using XDA-Developers mobile app

---------- Post added 24th July 2016 at 12:22 AM ---------- Previous post was 23rd July 2016 at 11:30 PM ----------

After 5,th step it shows swapfile needs to be atleast 40kb... What to do for dat?

Sent from my SM-T311 using XDA-Developers mobile app

@sandeep0048 just follow the steps and you will be good. No need to make partitions because we make "swapfile".
 

ax562

Senior Member
Aug 8, 2012
123
73
0
I did this to my T310 running Blissrom, and I see the 600m after the command free - m. How do I know if it is being used? I didn't detect any difference in response or behavior, but maybe I was expecting incorrectly.

Sent from my SM-T310 using XDA-Developers mobile app
This is going to help on games or apps that use a lot of RAM. It's also going to help when using a lot of apps at the same time. Multitast a lot , open up a lot of apps and then run the command "free -m" you will then see swap being used.
 
  • Like
Reactions: nabril15

sandeep0048

Senior Member
Aug 26, 2012
244
45
0
MUMBAI
@sandeep0048 just follow the steps and you will be good. No need to make partitions because we make "swapfile".
Thanks...I dont want to use try it on tab however, would like to use it on other htc explorer did all the steps however, could'nt get to know if everything is working fine:confused: when I type swap on command it gives me error could run this command kind of... will it work on other devices too? I know this is a tab 3 thread however, just asking...
 

ax562

Senior Member
Aug 8, 2012
123
73
0
Thanks...I dont want to use try it on tab however, would like to use it on other htc explorer did all the steps however, could'nt get to know if everything is working fine:confused: when I type swap on command it gives me error could run this command kind of... will it work on other devices too? I know this is a tab 3 thread however, just asking...
If the kernel supports swap then yes it will work, if not then no. You will also need init.d support for it to work.
 

nabril15

Senior Member
Nov 9, 2012
1,532
304
103
Miami, FL
I tried this on my tab simply to experiment, and I undid the changes. However, when I try to backup my tab, I'm being told that I don't have enough space, and I haven't added anything significant. I deleted the file named swapfile, but I ask if perhaps something else needs to be done to truly free that space.