[SCRIPT][UPDATED 01.26.14] Enable Ram Swap & Create a Swap File with |=~>SwapItOn<~=|

defiant07

Senior Member
Feb 26, 2013
410
496
0
Yes, it ran as root. There is swapon, swapoff, swapit files in /system/xbin. If I'm not mistaken, the mount command should be this, right?
Code:
mount -o remount,rw /system
BTW, I set TE to run
Code:
su
mount -o remount,rw /system
automatically each time I open TE. So I actually dunno why I have those errors. I'm using busybox 1.21.1-jb bionic if it matters. Maybe I should try another busybox? Oh yeah, the swapon command did not return any invalid argument error. I'll try v4 but you'll have to wait a few hours because I'm going out soon.

Edit: I tried v4, no more read only file system errors, but there is still the invalid arguments error.
Code:
Please wait while I create the swap file and
 boot script according to your specifications.
 It could take 1-5 minutes.

swapoff: /storage/emulated/legacy/swapfile: Invalid argument
360+0 records in
360+0 records out
377487360 bytes transferred in 40.941 secs (9220276 bytes/sec)
Setting up swapspace version 1, size = 377483264 bytes
UUID=861e05f3-9419-49df-93cd-644256fe4600
swapon: /storage/emulated/legacy/swapfile: Invalid argument
Does the invalid argument affect anything? Because overall I'm actually noticing a definite increase in performance.

Sent from my GT-P7500 using Tapatalk HD
Thanks for the info/reports.

Both remount commands are valid, but I guess some devices only like certain variations of the command…guess which one mine likes, lol. At any rate at least this problem is solved.

Regard the invalid argument: I am thoroughly bewildered :confused: since that swapon command worked. The proper usage of swapon, swapoff, mkswap, and a whole bunch of other commands used in my script is
Code:
 <command> <location of a file or directory>
The commands giving you errors are
Code:
swapon $storage/swapfile

and

swapoff $storage/swapfile
And since $storage is, in your case, a variable for /storage/emulated/legacy I really cannot see why its giving you those errors, especially since the $storage is used frequently throughout the script (for example the command right before the swapon command is “mkswap $storage/swapfile” which is working properly according to your output).

The fact that you’re getting invalid argument errors for these two commands will result in two things: (1) the very first time you ran “swapit_v4” swap was NOT turned on in that session unless you did that swapon command in the same session [but for all subsequent sessions (i.e. after all future reboots) it WILL/should be turned on being that if you look at the init.d script it should contain the long version of the swapon command that seems to work for you…check with the --free-- command you should see swap being used]; and (2) if you run “swapit” in future sessions you probably will NOT be able to change the swapfile size because if swap is not turned off you cannot delete the swapfile…if you want to change the swapfile size you’ll probably have to do this command
Code:
swapoff /storage/emulated/legacy/swapfile
before rerunning “swapit”.

I will continue looking in to this problem, but thus far my research is drawing blanks. I doubt it is busybox related since the mkswap command does not return an error, but I suppose it is possible for whatever reason the swapon and swapoff applets in your busybox don’t like variables…you could try the one from the V6 starter kit, it’s the one I use.

I’m sorry this is beyond my knowledge, I feel bad such a cool user is having problems :crying:. I attached a custom version that uses the long versions of the commands for swapon and swapoff, which should give the script 100% functionality for you :good:…it’s flashable since I see you’re using that option.
 

Attachments

Last edited:
  • Like
Reactions: eushaun99

zeppelinrox

Senior Member
Dec 21, 2010
9,374
21,587
0
IN THE FREAKIN' OP
Does the invalid argument affect anything? Because overall I'm actually noticing a definite increase in performance
Ya it reflects placebo tolerance... yours may be on the low side... lol

Thanks for the info/reports.

Both remount commands are valid, but I guess some devices only like certain variations of the command…guess which one mine likes, lol. At any rate at least this problem is solved.

Regard the invalid argument: I am thoroughly bewildered :confused: since that swapon command worked. The proper usage of swapon, swapoff, mkswap, and a whole bunch of other commands used in my script is
Code:
 <command> <location of a file or directory>
The commands giving you errors are
Code:
swapon $storage/swapfile

and

swapoff $storage/swapfile
And since $storage is, in your case, a variable for /storage/emulated/legacy
The problem is with the fake "external" sdcard which is really internal.

Reposting from the V6 thread...

About the other thing... it's not a busybox thing.
And I doubt either command would work if $storage is really the internal sdcard and not a "real" sdcard ie. a truly external one.

Did some quick testing and the trick is to find the real external sdcard which will have a vfat file system

So here you go...

Code:
storage=`busybox mount | awk '/vold/&&/sdcard/{print $3}' |  awk 'NR==1'`
I added the awk 'NR==1' (same as head -n 1 but why use a second tool :p) to limit the result to one hit - and I couldn't find a simple way to have awk do everything at once - limit it to one hit while searching for the pattern... so that'll do

It will also work if you change vold to vfat but I think vold is less likely to get stale with age.

oh and one more thing... gotta love teh awk :cool:
 

defiant07

Senior Member
Feb 26, 2013
410
496
0
Reposting from the V6 thread...
Damn dude, thanks again, did not expect all that extra effort - testing commands and what not; I was only expecting a yes or no :highfive:.

That code is beast...wish I had your command of the commands :silly:. I will use it to define storage in the next update...think I'm gunna add powershift style scripts to allow the user to more easily change swappiness on the fly. I'd run out of ideas for improving this script if it wasn't for you and V6, lol.

I'm still a bit confused though as to why your new code defining storage may solve his problems being that I asked him to manually do
Code:
swapon /storage/emulated/legacy/swapfile
and he said he got no errors, plus the mkswap $storage/swapfile command in the script did not return any errors. If that custom version does not work for him, I'll make a test version for him to see if redefining storage helps.
nvm guess maybe it's a jelly bean related issue due to its multi-user feature?
 
Last edited:
  • Like
Reactions: eushaun99

zeppelinrox

Senior Member
Dec 21, 2010
9,374
21,587
0
IN THE FREAKIN' OP
I got a clue from googling the error and saw that it can result from unsupported file systems.

looking at other swap scripts, they used /sdcard too so I figure that it has to be due to the internal sdcard being an unsupported file system.

I thought about adding swap stuff to V6 but never had the time plus other stuff keeps coming up lol

The 2 threads from the milestone forum are interesting.
http://forum.xda-developers.com/showthread.php?t=1951983
http://forum.xda-developers.com/showthread.php?t=2020312

The first look to see if there's a swap partition set up on the sdcard and if so, that's used.
If not, next they look to see if there is an ext partition on the sdcard and if so, that's used.
If not, it uses the sdcard's vfat file system.

Actually, I think the second one has the option to use the /cache/partition

anyway, been too busy to poke my nose the code much
 

defiant07

Senior Member
Feb 26, 2013
410
496
0
Weird, I googled the error ("swapon invalid argument") and it seemed its cause was either the user did not mkswap or a bad rom...I did not find anything related to filesystem. From past research I was under the impression that filesystem type was only a factor when using swap partitions, but I am probably mistaken.

Thanks for those links (never saw these scripts before...I don't search the device specific forums), they seem interesting, especially the first one...I will dig through those codes as best I can and see if there's anything of use.
 
  • Like
Reactions: eushaun99

clnzx2

Senior Member
Sep 17, 2007
471
196
0
I keep getting function not implemented when trying to enable swap. Any ideas?

Sent from my Galaxy Nexus using Tapatalk 4 Beta
 

eushaun99

Senior Member
Feb 8, 2013
2,014
970
193
21
Subang Jaya
Wait a minute, you said
Code:
swapon /storage/emulated/legacy/swapfile
?

I'm so sorry, my stupidness caused so much confusion for you. I thought you just wanted me to type swapon. *facepalm*

To clear things up, actually
Code:
swapon /storage/emulated/legacy/swapfile
did give me the invalid argument error. So sorry about that. :p

The test version you attached also give the invalid argument, and also a stat thing.
Code:
swapoff: can't stat '/storage/emulated/legacy/swapfile/swapfile': Not a directory
360+0 records in
360+0 records out
377487360 bytes transferred in 13.780 secs (27393857 bytes/sec)
Setting up swapspace version 1, size = 377483264 bytes
UUID=72010f65-d01a-41b5-a3ef-0f6121d2433a
swapon: /storage/emulated/legacy/swapfile: Invalid argument
Many thanks for all you and zep's efforts to help me. Somehow I think that this is actually user error given my carelessness. I'm trying to figure out maybe I have done something wrong that could have lead to this error?


Sent from my GT-P7500 using Tapatalk HD
 
Last edited:

defiant07

Senior Member
Feb 26, 2013
410
496
0
I keep getting function not implemented when trying to enable swap. Any ideas?
I have a few based upon a quick google search, although a screen shot or code box containing the script's dialog would be useful...

(1) the most common cause of this error is that your kernel does not support swap, but if this is the case you should not have made it far enough in to the script to see that error. just to double check if you enter this command cat /proc/cpuinfo in terminal does it list 'swp' or 'swap' under 'features'?

(2) it could be busybox related. do you have a "swapon" file located in /system/bin or /system/xbin?

(3) it could be a filesystem issue. if this is the case I think you will need to use a script or app that uses a partition or different location.

I will edit this post in the near future and attach a test version, which may help if it is a filesystem related issue.

Many thanks for all you and zep's efforts to help me. Somehow I think that this is actually user error given my carelessness. I'm trying to figure out maybe I have done something wrong that could have lead to this error?


Sent from my GT-P7500 using Tapatalk HD
I think my overly verbose posts played a part in the confusion...I know they have annoyed Zep in the past, lol :eek:.

Naw, it's not an user error...you did not get the dreaded ID10T error, lol :p. It seems to be a filesystem related issue, plus I think the fact that jb mirrors the filesystem in two locations because of its multiuser feature makes things get screwy.

I will edit this post in the near future and attach a test version incorporating Zep's fix, which will hopefully resolve this issue by making the swapfile on your actual external sdcard.

=====EDIT=====
##### Attached Test Version That May Resolve Swapon Related Errors #####
##### It Should Make The Swapfile On Your External Sdcard #####
 

Attachments

Last edited:
  • Like
Reactions: eushaun99

eushaun99

Senior Member
Feb 8, 2013
2,014
970
193
21
Subang Jaya
I think my overly verbose posts played a part in the confusion...I know they have annoyed Zep in the past, lol :eek:.

Naw, it's not an user error...you did not get the dreaded ID10T error, lol :p. It seems to be a filesystem related issue, plus I think the fact that jb mirrors the filesystem in two locations because of its multiuser feature makes things get screwy.

I will edit this post in the near future and attach a test version incorporating Zep's fix, which will hopefully resolve this issue by making the swapfile on your actual external sdcard.
Maybe. :D But then again I have a troll brain which always make me think stuff differently.

So to clarify things, now the swap file isn't working until I reboot, right? Typing free in terminal shows 0 for total, used and free. If its working, I suppose total should be the size of the swapfile which is 360 mb right?


Sent from my GT-P7500 using Tapatalk HD
 

defiant07

Senior Member
Feb 26, 2013
410
496
0
Maybe. :D But then again I have a troll brain which always make me think stuff differently.

So to clarify things, now the swap file isn't working until I reboot, right? Typing free in terminal shows 0 for total, used and free. If its working, I suppose total should be the size of the swapfile which is 360 mb right?


Sent from my GT-P7500 using Tapatalk HD
Nope...it is not working at all. It would have worked after reboot if the swapon /storage/emulated/legacy/swapfile command had worked, but since it did not I can definitively say nothing is working for you...you should delete the swapfile and swappinessvalue files located in /storage/emulated/legacy...they are just wasting space...you can leave the init.d script and xbin script as they will get overwritten should you give the test version a try.

=====EDIT=====

Sorry forgot to address your last question about free...yeah if swap was on you would have numbers in the 'total' 'used' and 'free' columns in the 'swap' row...also note the output of free is in kb so you'd have to divide by 1024 to get mb, although if you use free -m it will give you the output in mb.
 
Last edited:
  • Like
Reactions: eushaun99

eushaun99

Senior Member
Feb 8, 2013
2,014
970
193
21
Subang Jaya
OK now this is weird...the test version you attached a few posts above gave me this.
Code:
 Based on accessible ram, I recommend using a
 size around:                          360 mb.
 It is highly unlikely you will use more than
 this. Thus, while you could reasonably make it
 smaller, to make it significantly larger would
 probably be wasteful and foolish.

360

BusyBox v1.19.4-wraithdu (2012-02-16 23:47:29 CST) multi-call binary.

Usage: stat [OPTIONS] FILE...

Display file (default) or filesystem status

        -c fmt  Use the specified format
        -f      Display filesystem status
        -L      Follow links
        -t      Display info in terse form

Valid format sequences for files:
 %a     Access rights in octal
 %A     Access rights in human readable form
 %b     Number of blocks allocated (see %B)
 %B     The size in bytes of each block reported by %b
 %d     Device number in decimal
 %D     Device number in hex
 %f     Raw mode in hex
 %F     File type
 %g     Group ID of owner
 %G     Group name of owner
 %h     Number of hard links
 %i     Inode number
 %n     File name
 %N     File name, with -> TARGET if symlink
 %o     I/O block size
 %s     Total size, in bytes
 %t     Major device type in hex
 %T     Minor device type in hex
 %u     User ID of owner
 %U     User name of owner
 %x     Time of last access
 %X     Time of last access as seconds since Epoch
 %y     Time of last modification
 %Y     Time of last modification as seconds since Epoch
 %z     Time of last change
 %Z     Time of last change as seconds since Epoch

Valid format sequences for file systems:
 %a     Free blocks available to non-superuser
 %b     Total data blocks in file system
 %c     Total file nodes in file system
 %d     Free file nodes in file system
 %f     Free blocks in file system
 %i     File System ID in hex
 %l     Maximum length of filenames
 %n     File name
 %s     Block size (for faster transfer)
 %S     Fundamental block size (for block counts)
 %t     Type in hex
 %T     Type in human readable form

BusyBox v1.19.4-wraithdu (2012-02-16 23:47:29 CST) multi-call binary.

Usage: stat [OPTIONS] FILE...

Display file (default) or filesystem status

        -c fmt  Use the specified format
        -f      Display filesystem status
        -L      Follow links
        -t      Display info in terse form

Valid format sequences for files:
 %a     Access rights in octal
 %A     Access rights in human readable form
 %b     Number of blocks allocated (see %B)
 %B     The size in bytes of each block reported by %b
 %d     Device number in decimal
 %D     Device number in hex
 %f     Raw mode in hex
 %F     File type
 %g     Group ID of owner
 %G     Group name of owner
 %h     Number of hard links
 %i     Inode number
 %n     File name
 %N     File name, with -> TARGET if symlink
 %o     I/O block size
 %s     Total size, in bytes
 %t     Major device type in hex
 %T     Minor device type in hex
 %u     User ID of owner
 %U     User name of owner
 %x     Time of last access
 %X     Time of last access as seconds since Epoch
 %y     Time of last modification
 %Y     Time of last modification as seconds since Epoch
 %z     Time of last change
 %Z     Time of last change as seconds since Epoch

Valid format sequences for file systems:
 %a     Free blocks available to non-superuser
 %b     Total data blocks in file system
 %c     Total file nodes in file system
 %d     Free file nodes in file system
 %f     Free blocks in file system
 %i     File System ID in hex
 %l     Maximum length of filenames
 %n     File name
 %s     Block size (for faster transfer)
 %S     Fundamental block size (for block counts)
 %t     Type in hex
 %T     Type in human readable form

/system/xbin/swapit[60]: (*(/1024))/1024: unexpected '*'
1|[email protected]:/ #
Sent from my GT-P7500 using Tapatalk HD
 
  • Like
Reactions: defiant07

defiant07

Senior Member
Feb 26, 2013
410
496
0
OK now this is weird...the test version you attached a few posts above gave me this.
Code:
 Based on accessible ram, I recommend using a
 size around:                          360 mb.
 It is highly unlikely you will use more than
 this. Thus, while you could reasonably make it
 smaller, to make it significantly larger would
 probably be wasteful and foolish.

360

BusyBox v1.19.4-wraithdu (2012-02-16 23:47:29 CST) multi-call binary.

Usage: stat [OPTIONS] FILE...

Display file (default) or filesystem status

        -c fmt  Use the specified format
        -f      Display filesystem status
        -L      Follow links
        -t      Display info in terse form

Valid format sequences for files:
 %a     Access rights in octal
 %A     Access rights in human readable form
 %b     Number of blocks allocated (see %B)
 %B     The size in bytes of each block reported by %b
 %d     Device number in decimal
 %D     Device number in hex
 %f     Raw mode in hex
 %F     File type
 %g     Group ID of owner
 %G     Group name of owner
 %h     Number of hard links
 %i     Inode number
 %n     File name
 %N     File name, with -> TARGET if symlink
 %o     I/O block size
 %s     Total size, in bytes
 %t     Major device type in hex
 %T     Minor device type in hex
 %u     User ID of owner
 %U     User name of owner
 %x     Time of last access
 %X     Time of last access as seconds since Epoch
 %y     Time of last modification
 %Y     Time of last modification as seconds since Epoch
 %z     Time of last change
 %Z     Time of last change as seconds since Epoch

Valid format sequences for file systems:
 %a     Free blocks available to non-superuser
 %b     Total data blocks in file system
 %c     Total file nodes in file system
 %d     Free file nodes in file system
 %f     Free blocks in file system
 %i     File System ID in hex
 %l     Maximum length of filenames
 %n     File name
 %s     Block size (for faster transfer)
 %S     Fundamental block size (for block counts)
 %t     Type in hex
 %T     Type in human readable form

BusyBox v1.19.4-wraithdu (2012-02-16 23:47:29 CST) multi-call binary.

Usage: stat [OPTIONS] FILE...

Display file (default) or filesystem status

        -c fmt  Use the specified format
        -f      Display filesystem status
        -L      Follow links
        -t      Display info in terse form

Valid format sequences for files:
 %a     Access rights in octal
 %A     Access rights in human readable form
 %b     Number of blocks allocated (see %B)
 %B     The size in bytes of each block reported by %b
 %d     Device number in decimal
 %D     Device number in hex
 %f     Raw mode in hex
 %F     File type
 %g     Group ID of owner
 %G     Group name of owner
 %h     Number of hard links
 %i     Inode number
 %n     File name
 %N     File name, with -> TARGET if symlink
 %o     I/O block size
 %s     Total size, in bytes
 %t     Major device type in hex
 %T     Minor device type in hex
 %u     User ID of owner
 %U     User name of owner
 %x     Time of last access
 %X     Time of last access as seconds since Epoch
 %y     Time of last modification
 %Y     Time of last modification as seconds since Epoch
 %z     Time of last change
 %Z     Time of last change as seconds since Epoch

Valid format sequences for file systems:
 %a     Free blocks available to non-superuser
 %b     Total data blocks in file system
 %c     Total file nodes in file system
 %d     Free file nodes in file system
 %f     Free blocks in file system
 %i     File System ID in hex
 %l     Maximum length of filenames
 %n     File name
 %s     Block size (for faster transfer)
 %S     Fundamental block size (for block counts)
 %t     Type in hex
 %T     Type in human readable form

/system/xbin/swapit[60]: (*(/1024))/1024: unexpected '*'
1|[email protected]:/ #
Sent from my GT-P7500 using Tapatalk HD

Weird indeed...I am using the same busybox and the test script runs flawlessly...no problems with stat.

I think probably the new means of detecting the storage location is not working for you...please try
Code:
storage=`busybox mount | awk '/vold/&&/sdcard/{print $3}' |  awk 'NR==1'`
echo $storage
you should get something like /mnt/sdcard. If you do NOT get a storage location from this series of commands then the two errors you got would be expected. If you do get a storage location then I'm at a total loss.

Also if you do NOT get a location from these commands try replacing "sdcard" with "ext" so it would be
Code:
storage=`busybox mount | awk '/vold/&&/ext/{print $3}' |  awk 'NR==1'`
echo $storage
and lmk if you get a storage location.

If both these sets of commands fail to return a storage location please give me the output from the mount command. It will be pretty long since I know you have a bunch of apps, I only need the first 25% or so of the output, which should make it bit easier for you to cut and paste.

Thanks again for your testing and feedback...good night...I will return to the grindstone tomorrow.
 
Last edited:
  • Like
Reactions: eushaun99

clnzx2

Senior Member
Sep 17, 2007
471
196
0
I have a few based upon a quick google search, although a screen shot or code box containing the script's dialog would be useful...

(1) the most common cause of this error is that your kernel does not support swap, but if this is the case you should not have made it far enough in to the script to see that error. just to double check if you enter this command cat /proc/cpuinfo in terminal does it list 'swp' or 'swap' under 'features'?

(2) it could be busybox related. do you have a "swapon" file located in /system/bin or /system/xbin?

(3) it could be a filesystem issue. if this is the case I think you will need to use a script or app that uses a partition or different location.

I will edit this post in the near future and attach a test version, which may help if it is a filesystem related issue.



I think my overly verbose posts played a part in the confusion...I know they have annoyed Zep in the past, lol :eek:.

Naw, it's not an user error...you did not get the dreaded ID10T error, lol :p. It seems to be a filesystem related issue, plus I think the fact that jb mirrors the filesystem in two locations because of its multiuser feature makes things get screwy.

I will edit this post in the near future and attach a test version incorporating Zep's fix, which will hopefully resolve this issue by making the swapfile on your actual external sdcard.

=====EDIT=====
##### Attached Test Version That May Resolve Swapon Related Errors #####
##### It Should Make The Swapfile On Your External Sdcard #####
1. My kernel does support swap.
2. I have swapon and swapoff in both locations and tried installing busy box again as well
3. I tried swapon /storage/emulated/legacy/swapfile add well as swapon /storage/emulated/0/swapfile which should both get to the same file but i get function not implemented.

In the script I get the error when it does swapoff and of course when it does swapon

Thanks for the help

Sent from my Galaxy Nexus using Tapatalk 4 Beta
 

eushaun99

Senior Member
Feb 8, 2013
2,014
970
193
21
Subang Jaya
[/HIDE]
Weird indeed...I am using the same busybox and the test script runs flawlessly...no problems with stat.

I think probably the new means of detecting the storage location is not working for you...please try
Code:
storage=`busybox mount | awk '/vold/&&/sdcard/{print $3}' |  awk 'NR==1'`
echo $storage
you should get something like /mnt/sdcard. If you do NOT get a storage location from this series of commands then the two errors you got would be expected. If you do get a storage location then I'm at a total loss.

Also if you do NOT get a location from these commands try replacing "sdcard" with "ext" so it would be
Code:
storage=`busybox mount | awk '/vold/&&/ext/{print $3}' |  awk 'NR==1'`
echo $storage
and lmk if you get a storage location.

If both these sets of commands fail to return a storage location please give me the output from the mount command. It will be pretty long since I know you have a bunch of apps, I only need the first 25% or so of the output, which should make it bit easier for you to cut and paste.

Thanks again for your testing and feedback...good night...I will return to the grindstone tomorrow.
Yes, no storage location, but it showed a blank line instead. Did I do something wrong?


I don't know exactly where you want, so heck, here's the whole output. :p
http://pastebin.com/VTpVfUmF

Take a good rest my friend. You've definitely deserved it. :)

Sent from my GT-P7500 using Tapatalk HD
 
  • Like
Reactions: defiant07

zeppelinrox

Senior Member
Dec 21, 2010
9,374
21,587
0
IN THE FREAKIN' OP
[/HIDE]
Weird indeed...I am using the same busybox and the test script runs flawlessly...no problems with stat.

I think probably the new means of detecting the storage location is not working for you...please try
Code:
storage=`busybox mount | awk '/vold/&&/sdcard/{print $3}' |  awk 'NR==1'`
echo $storage
you should get something like /mnt/sdcard. If you do NOT get a storage location from this series of commands then the two errors you got would be expected. If you do get a storage location then I'm at a total loss.

Also if you do NOT get a location from these commands try replacing "sdcard" with "ext" so it would be
Code:
storage=`busybox mount | awk '/vold/&&/ext/{print $3}' |  awk 'NR==1'`
echo $storage
and lmk if you get a storage location.

If both these sets of commands fail to return a storage location please give me the output from the mount command. It will be pretty long since I know you have a bunch of apps, I only need the first 25% or so of the output, which should make it bit easier for you to cut and paste.

Thanks again for your testing and feedback...good night...I will return to the grindstone tomorrow.
Umm... Easier way to get free space...

Code:
freemb=`busybox df -m | grep $storage | awk '{print $((NF-2))}'`
 
  • Like
Reactions: defiant07

zeppelinrox

Senior Member
Dec 21, 2010
9,374
21,587
0
IN THE FREAKIN' OP
Last edited:

eushaun99

Senior Member
Feb 8, 2013
2,014
970
193
21
Subang Jaya
So you can't have swap on something that you don't have.

I just read this
http://android-revolution-hd.blogspot.ca/2013/03/virtual-sd-card-on-android.html?m=1

You probably have the second configuration.
Do:

ls -l /data/media/0

Is that the stuff that's on your fake/internal "sdcard"?

If so, do:

swapon /data/media/0/swapfile
Hey it works now. I reflashed v4, ran swapit to create the swapfile then swapon /data/media/0/swapfile and no more errors. Free command also shows swap being used. Thanks so much zep and of course defiant07. :)

Sent from my GT-P7500 using Tapatalk HD
 
  • Like
Reactions: defiant07
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone