Swap for Samsung Galaxy Tab 3 8.0

Search This thread

ax562

Senior Member
Aug 8, 2012
181
107
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:

ax562

Senior Member
Aug 8, 2012
181
107
I'm currently using cm 12.1 on tab 3 10.1. This will work on any rooted ROMwith init.d support.
 

sandeep0048

Senior Member
Aug 26, 2012
244
45
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
181
107
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
181
107
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
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
181
107
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
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.
 

jrv331

Senior Member
Dec 10, 2010
763
134
I'm on Noelkat 1.1 and after step. 5 I get this toolbox error.
 

Attachments

  • 20170108_202712.jpg
    20170108_202712.jpg
    186 KB · Views: 313

Top Liked Posts

  • There are no posts matching your filters.
  • 3
    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!

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