yashsingh1/xdaforums huggingface dataset:
[Galaxy S III Android Development] eiraku:
Testing 1.4GB swap in Wanamlite 2.0 + Siyah latest beta. No issues so far besides the zram "off setting not sticking (and ONE random restart - prolly due to GPU OC).

Will be monitoring performance these few days.
[Galaxy S III Android Development] graffixnyc:
The OP suggested disabling zram and then powering off, then back on (not reboot) and it will stick. I did it this way and it has stuck on disabled

also increased my partition from 512 to 1gb :)
[Galaxy S III Android Development] eiraku:
Must have missed it. Trying that out now.
[Galaxy S III Android Development] SkzBR:
I know the danger of doing that, but i brought 32GB version just in mind of this. I'll put a 64GB card soon as possible, so sdcard will be my primary storage. Maybe i'm thinking wrong.
[Galaxy S III Android Development] gcrutchr:
Maybe this will help:

Using unzip in Cygwin:

$ unzip Hard*.zip

Archive: Hard-Swap-Yank555.lu_Flasher-v1.0a.zip

error [Hard-Swap-Yank555.lu_Flasher-v1.0a.zip]: missing 5 bytes in zipfile

(attempting to process anyway)

error [Hard-Swap-Yank555.lu_Flasher-v1.0a.zip]: attempt to seek before beginnin

g of zipfile

(please check that you have transferred or created the zipfile in the

appropriate BINARY mode and that you have compiled UnZip properly)

(attempting to re-compensate)

file #1: bad zipfile offset (local header sig): 0

(attempting to re-compensate)

error [Hard-Swap-Yank555.lu_Flasher-v1.0a.zip]: attempt to seek before beginnin

g of zipfile

(please check that you have transferred or created the zipfile in the

appropriate BINARY mode and that you have compiled UnZip properly)

creating: META-INF/com/

creating: META-INF/com/google/

creating: META-INF/com/google/android/

creating: setup/

inflating: META-INF/com/google/android/update-binary

inflating: META-INF/com/google/android/updater-script

creating: setup/init.d/

inflating: setup/init.d/98swap

creating: setup/install/

inflating: setup/install/install.sh

EDIT: Works fine if I re-zip it.
[Galaxy S III Android Development] theprateik:
i am also one of those who have been envying the AT&T SGS3 because of the 2gb ram... I will surely gonna use this mod as soon as i get my external mem card... thanks for this mod..... :)
[Galaxy S III Android Development] Yank555:
Hmm ... strange, that never happened to me... just tested on my Ubuntu Linux 12.04 dev virtual box :

yank555-lu@android-dev:~/temp$ unzip Hard-Swap-Yank555.lu_Flasher-v1.0a.zip
Archive: Hard-Swap-Yank555.lu_Flasher-v1.0a.zip
creating: META-INF/
creating: META-INF/com/
creating: META-INF/com/google/
creating: META-INF/com/google/android/
creating: setup/
inflating: META-INF/com/google/android/update-binary
inflating: META-INF/com/google/android/updater-script
creating: setup/init.d/
inflating: setup/init.d/98swap
creating: setup/install/
inflating: setup/install/install.sh
yank555-lu@android-dev:~/temp$

Can some else confirm a problem with the 1.0a installer ?

I've also added MD5 info on the Changlog, please also check the download was fine.

Thanx, JP.
[Galaxy S III Android Development] Yank555:
The danger is that in a file, you won't know where exactly on the memory the file's blocks will be. But those will be worn most, and the internal SD is also you "internal memory" where apps are installed etc.

If now one or a few memory bits wear out, you could just stop using swap, but if you reinstall your system (superwipe, factory reset), those blocks were potentially scattered all over the memory, so impossible to tell what file of your new installed system's /data might be using one of those, and unpredictible behaviour follows. You'd kind of end up with a semi-working bricked phone.

I find this too dangerous, and rather use a partition on an external card, the cards are relatively cheap (cheaper than a new SGS3 that is), and the partiton is clearly located.

Would the last 512Mb of my card wear out, I'd just leave those unpartitioned and partion the 512Mb in front of them and go on. So my card would just "lose" 512Mb, of which I would exactly know where they are !

JP.
[Galaxy S III Android Development] mattiadj:
Yank i want ask you a thing. I have made a 512mb of swap and all is ok. No lags at all.

Often I type free in terminal emulator to see how much swap space is user and how much is free. I noticed that the max memory of swap partition used is 200/210mb and many apps in previous opened are killed from android.

My question is: is possible to force the system to use ALL memory swap and have a better multitasking?

Inviato dal mio GT-I9300 con Tapatalk 2
[Galaxy S III Android Development] gaetanolip:
ok

finally igot mo working, swap èartition 1GB

2 questions

1: only about 200 MB are used by swap, is it possible to use more swap?

2: i also use supercharger script, its swappiness is set to '20'. Does that interfere with 'your' swappiness '100'.How to control what now is the real working swappiness value?

thank
[Galaxy S III Android Development] Yank555:
I can confirm, that is what I am seeing as well, never had much more, which is why I suggest 256Mb, 512Mb at most if you can spare it.

What you can do to help use the swap, is to set Android Low Memory Killer settings like this (System Tuner can do that for you) :

2Mb Foreground Apps

4Mb Visible Apps

5Mb Secondary Server

8Mb Hidden Apps

12Mb Content Providers

16Mb Empty Apps

Other than that, it's up to the OS to swap...

JP.
[Galaxy S III Android Development] Yank555:
What exactly does supercharger script do ?

Most likely yes, swappiness is a global system parameter...

JP.
[Galaxy S III Android Development] gaetanolip:
superchargher : http://xdaforums.com/showthread.php?t=991276

it allows many tweaks , for example changing minfree values, service.jar, and many other things..

i set minfree values like you said ( through supercharger) and now i have about 448 mb of swap used.

About swappiness, where can i check the workin current value ( i mean swappiness overall value system, not only the one in your mod because i have to control if system is using your swappiness value or the one set from supercharger)...
[Galaxy S III Android Development] beautyangel:
yank555, here are the result buddy.

su

fdisk -l /dev/block/mmcblk1

disk /dev/block/mmcblk1 : 63.8gb

255 heads, 63 sectors/track, 7764 cylinders

units = cylinders of 16065 * 512 = 8225280 bytes

Id system 1 7764 62362624

/dev/block/mmcblk1p1

7 HPFS/NFTS

v1.4

Edited : partition 512mb under CWM

working now with but force closes, "android is upgrading" start applications. SGS3 Re-starts again and again, going to Wipe all, reformat 64gb sdcard and UNINSTALL THIS MOD COMPLETELY. For me no way. tries many times no luck. ;
[Galaxy S III Android Development] F1tty:
memory leak issue fix!?

have a look here ;)

http://xdaforums.com/showthread.php?t=1817918

Nice Thank you :P
[Galaxy S III Android Development] rlorange:
Excellent mod! Used mini tool and your clear instructions worked first go!

Q: if I unmount my SD card without rebooting and remount what happens to the swap?
[Galaxy S III Android Development] Yank555:
Unmounting and remounting is not a problem, because that's unmount and mounting the FAT/exFAT partition. But removing when the device is running is a very bad idea.

Good point, will add this to the F.A.Q. !

JP.
[Galaxy S III Android Development] rlorange:
OK so with swap running you should never remove SD card while phone is running with or without unmounting first?

Would it be possible via a script to unmount swap as well to make this possible?
[Galaxy S III Android Development] Yank555:
It is quite easy in a terminal to do this, just type :

su
swapoff -a

And check with :

free

or

cat /proc/swaps

until you see that swap is disabled.

JP.
[Galaxy S III Android Development] rlorange:
I'll make a tasker toggle. :) I often use my card in my sansa clip mp3 player at work.

So far its running perfectly. Brilliant!
[Galaxy S III Android Development] Yank555:
Glad to hear ;)

By the way, to reactivate swap when you later reinsert the SD card, you'd simply need to execute the script in a terminal :

su
/system/etc/init.d/98swap

JP.
[Galaxy S III Android Development] the_ape:
Cache was formatted before hand so was dalvik (force of habit)

Didn't create the log, it's empty though. Rom is Omega 11 jfyi
[Galaxy S III Android Development] rsxsniper:
Am i doing this right? Why is my swap value so little? How do i change this
[Galaxy S III Android Development] Yank555:
By the size, I guess that is zram.

Can you describe with a little more details what you did (step by step) ?

Also please provide the following info :

1) ROM

2) kernel

3) the /data/hardswap.log file (if it exists)

4) the /data/swap.0.log (if it exists)

5) if none of the files exist, the result of these commands in a terminal :

su

fdisk -l /dev/block/mmcblk1

cat /proc/swaps

Thanx, JP.
[Galaxy S III Android Development] Yank555:
And you're using v1.0

a

? Have you checked MD5 ?

JP.
[Galaxy S III Android Development] jnr21:
You need to make linux swap partition to your sd card.
[Galaxy S III Android Development] gaetanolip:
IMPORTANT

for all who use v6supercharger script :

rename hardswap script in etc\ init.d folder ( rename the initial digits of the script '98' in '991'). Otherwise, at every reboot, your swappiness will be set to 20 instead to 100, because v6supercharger script interfere)
[Galaxy S III Android Development] Yank555:
Thanx for pointing that out !

Quick off-topic question :

Since I've been seeing this supercharger script on htc Sensations as well. What exactly is the benefit of this script ?

Thanx, JP.

PS: Just a detail, by doing so, the uninstaller won't remove the script anymore, so to uninstall, you'd need to remove the script manually ;)
[Galaxy S III Android Development] gaetanolip:
v6 supercharger script is essentially a complete ram manager script.

it allows to set lowmemorykiller values, bulletproof apps, service.jar OOM levels, zipalign apps, db sql cleaning, no more launcher redraws, 3g-wifi mods, build.prop mode etc..

i use it above all for better multitasking , together with your script.

PS don't use ram manager to change lowmamorykiller values, it does not consider OOM grouping ( better it is wrong with OOM grouping) . instead use v6 supercharger that patch service.jar...
[Galaxy S III Android Development] Yank555:
OK, I see. Might be worth that I change the default script name to 991_swap then... would be safer.

Will have a look tonight.

JP.
[Galaxy S III Android Development] gaetanolip:
you are great!!

i apoligize for my 'noobniness'

v6 supercharger is '99'v6supercharger, while hardswap is '98'swap, so i think that renaming 98swpa in '991'swap your scipr is lanuched at boot after v6 supercharger, so setting right 100 to swappiness, is it right???
[Galaxy S III Android Development] Yank555:
Yep, that's the idea ;)
[Galaxy S III Android Development] rlorange:
Been experimenting with swapper 2 app with a partition and it works fine after some settings also seems so swap more. Also can be disabled easily for hot sdcard dismount

---------- Post added at 07:38 AM ---------- Previous post was at 07:23 AM ----------

Wow! Using swapper 2 app and 100 swappiness I maxed my partition out and every app not in used swapped causing major lags... now going to increase partition to 512mb to see how much swap I can really get!... excited

---------- Post added at 08:11 AM ---------- Previous post was at 07:38 AM ----------

Not to disrespect your swap implementation but swaper 2 app seems to swap heaps more. Before I got 130mb max and with the use partition settings with no actual swap file designated I had 370mb swapped all recoverable as they were including maps Google earth and dead space game. 512mb is truley usable.

Edit on siyah b5. Also when you dismount the sdcard for a hot swap it automatically disables the swap too.

.
[Galaxy S III Android Development] Yusei:
Flash a kernel erase this scrip right?

Guess not, even with ultimate kernel clean swap scrip still there and typing free on terminal give the expected result.
[Galaxy S III Android Development] rlorange:
Nope disable zram in stweaks it shows as swap all you have to is also move the swap script from init.d and reboot
[Galaxy S III Android Development] Yank555:
Obviously, an app will always be able to do more than a script in terms of dismounting, but :

Not possible an app will generate more swap activity, that is 100% kernel implemented and no app can change that.

What it CAN do is change kernel settings.

Check the android low mem killer settings for example... can you post the settings you have when this is active ?

JP.

PS: Btw, did you set the low mem killer as I suggest in post 2 ?
[Galaxy S III Android Development] Yank555:
You can use my provided uninstaller ;)

Init.d scripts don'y get removed by flashing a kernel, and dunno this ultimate clean, it can only remove what knows, anything else would be 'dangerous'm since not only kernels put things in init.d, ROMs as well...

JP.
[Galaxy S III Android Development] dantheman122:
I'm just curious how to go about using this and ExtSd2InternalSd, do this first then the other or vice-versa?
[Galaxy S III Android Development] beautyangel:
Thanks to "mattiadj"and "Yank555"

personnally For me ExtSd2InternalSd and "Swap partition" are not working together. Its very difficult to say I would love to make both work but till up now no luck at all. Both MODS working but If i choose "ExtSd2InternalSd" , "Swap partition" not working and If I choose "Swap partition" then " ExtSd2InternalSd" not working.

IT would be grateful IF "BOTH KING DEVS" "ExtSd2InternalSd" and "Swap Partition" contact each other to make both MODS Working "why not" in "ONE" way.

For us members it would be a Real gratitude and chance to make "IMPOSSIBLE" from "SAMSUNG" to BE "POSSIBLE" FROM OUR AMAZING DEVS on XDA.

Thanks to "mattiadj"and "Yank555"

Please collaborate together. For our luck. Need Both MODS badly.
[Galaxy S III Android Development] Yank555:
Little busy now, can you provide me a link to the script, so I can work around it for you ;) And / or contact the dev.

There should be no reason at all for these not to get along !! We will sort that out :cowboy:

JP.
[Galaxy S III Android Development] dantheman122:
http://xdaforums.com/showthread.php?t=1772234

Good luck!
[Galaxy S III Android Development] evilged:
Hi

Using ExtSd2InternalSd and hard swap script on the PARANOIDANDROID v1.9.7a with SiyahKernel S3 v1.5beta5 with no issue.

I have have a 512MB primary swap partition at the end of a fat32 64GB card.

its swapping quite happily at the moment :)

Maybe an issue with stock kernel version of the ExtSd2InternalSd?

the only difference in the script for fat32 ExtSd2InternalSd is:

(custom)

mount -o remount,rw /

mount -t vfat -o umask=0000 /dev/block/vold/179:49 /mnt/sdcard

mount -o bind /data/media /mnt/extSdCard

to (stock)

mount -o remount,rw /

mount -t vfat -o umask=0000 /dev/block/vold/179:16 /mnt/sdcard

mount -o bind /data/media /mnt/extSdCard

Perhaps if users are putting a swap at the beginning rather than the end its bumping the partition number up for the main external sd partition?

Haven't looked at the exfat version but I imagine it works on similar lines.

G

PS Yank555 just moved from Sensation too was running HNS & Faux kernel with your aroma good to see you here :)
[Galaxy S III Android Development] Yank555:
Thanx for the headsup. Will have to look a little closer into this... might get a little tricky if there are loads of possible constellations.

So you swam to "faster" shores as well ;) I'm quite fond of the new toy, just struggling to get my first kernel compiled (on stock, so no swap for me in the last few days), but have only spent one evening on it, guess there will be a few more to come :D

JP.
[Galaxy S III Android Development] Yusei:
My intention was, if a new kernel erase the script I've to install it again.

I'm a lover of this script :)
[Galaxy S III Android Development] ctrlaltdel:
I am running both mod and without any problem with my 64GB exfat formatted card. I tried this setup with various roms as well, like omega, arhd, foxhound and hypergalaxy and rgui. Hypergalaxy 0.5.1 will need to install busybox from market to get the required symlinks.

this is how i install them:-

1. create a swap partition at the end of the sd card, i am using a 512 partition.

2. Flash siyah kernal.

3. Flash the extsd2internalsd mod

4. Extract the hard-swap script and put it to /etc/init.d and make the correct permission. You can copy the permission of the extsd2internalsd script on the same folder.

5. Setup the suggested low level killer value

6. Reboot and done.

Thanks again for the 2 great mod!!
[Galaxy S III Android Development] Yank555:
Just two thoughts ...

1) Why not flash this mod ?

2) You should format the swap partition (mkswap), this is done when flashing this mod

JP.
[Galaxy S III Android Development] ctrlaltdel:
Hi JP,

I am still using version 1.0 which is not working via cwm, didn't tried v1.0a tho....

I didn't realized that the script will format the swap partition... I am using gparted to do the partition stuff on my sd card and it is quite convenient to format the swap partition as well via gparted.

Will give v1.0a a go when I flash next rom.
[Galaxy S III Android Development] Yank555:
Hi,

Ok, I've taken the time to look at extsd2internalsd (each of the 4 variants), and I don't see where the mods would interfere with each other.

All that is happening is partitions being remounted, and as long as you create the swap partition as second (or more) partition, which is what I suggest doing, neither of the scripts will break the other.

All my script will do, is find the swap partition, format it (during installation only !) and install the activation script.

And at each reboot, my activation script will just activate the swap on that partition (swapon).

Both scripts work on partition level, not filesystem level, so not issuers at all using both at the same time.

JP.
[Galaxy S III Android Development] ahac85:
This mod is freakin awesome, the multi tasking is amazing now on my phone. Using 512mb swap :)

I currently have launcher priority fix, can anyone confirm if this fixes launcher redraws?

I've just flashed the external sd to internal sd and can confirm it breaks the swap mod, hope the dev finds a way to fix it.
[Galaxy S III Android Development] Yank555:
Well get this sorted ;)

Could both of you please post the result of the following commands :

su
fdisk -l /dev/block/mmcblkp1
mount
df -h

Thanx, JP.
[Galaxy S III Android Development] Yank555:
I'm still rather new to the S3, but if that works like the fix that keeps Rosie in memory on Sense ROMs (i.e. htc Sensation), then yes,and if they are not totally eliminated, it should at least help to storngly minimize those.

JP.
[Galaxy S III Android Development] ahac85:
hi im unable to mount as this mmcblkp1 does not exist, ive taken a look using es file explorer that does not exisit
[Galaxy S III Android Development] Yank555:
Typo, sorry, it's a little late here (3am in the meantime)...

su
fdisk -l /dev/block/mmcblk1
mount
df -h

These commands will not do anything, just print info...

JP.
[Galaxy S III Android Development] ahac85:
lol 2am here, anyways thats showing something but upon last command it says no such file or directory

app_186@android:/ $ export PATH=/data/local/bin:$PATH

app_186@android:/ $ su

app_186@android:/ # fdisk -l /dev/block/mmcblk1

Disk /dev/block/mmcblk1: 15.8 GB, 15829303296 bytes

256 heads, 63 sectors/track, 1916 cylinders

Units = cylinders of 16128 * 512 = 8257536 bytes

Device Boot Start End Blocks Id System

/dev/block/mmcblk1p1 * 1 1917 15457280 c Win95 FAT32 (LBA)

app_186@android:/ # mount

rootfs / rootfs rw,noatime 0 0

proc /proc proc rw,noatime 0 0

sysfs /sys sysfs rw,noatime 0 0

tmpfs /dev tmpfs rw,nosuid,noatime,mode=755 0 0

devpts /dev/pts devpts rw,noatime,mode=600 0 0

none /acct cgroup rw,relatime,cpuacct 0 0

tmpfs /mnt/asec tmpfs rw,noatime,mode=755,gid=1000 0 0

tmpfs /mnt/obb tmpfs rw,noatime,mode=755,gid=1000 0 0

tmpfs /mnt/ntfs tmpfs rw,noatime,mode=755,gid=1000 0 0

none /dev/cpuctl cgroup rw,relatime,cpu 0 0

/dev/block/mmcblk0p9 /system ext4 ro,relatime,barrier=1,data=ordered 0 0

/dev/block/mmcblk0p12 /data ext4 rw,nosuid,nodev,noatime,barrier=1,journal_async_commit,data=ordered,noauto_da_alloc,discard 0 0

/dev/block/mmcblk0p8 /cache ext4 rw,nosuid,nodev,noatime,barrier=1,journal_async_commit,data=ordered 0 0

/dev/block/mmcblk0p3 /efs ext4 rw,nosuid,nodev,noatime,barrier=1,journal_async_commit,data=ordered 0 0

/sys/kernel/debug /sys/kernel/debug debugfs rw,noatime 0 0

/dev/fuse /mnt/sdcard fuse rw,nosuid,nodev,noatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0

/dev/block/vold/179:49 /mnt/extSdCard vfat rw,dirsync,nosuid,nodev,noexec,noatime,nodiratime,uid=1000,gid=1023,fmask=0002,dmask=0002,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0

/dev/block/vold/179:49 /mnt/sdcard vfat rw,dirsync,relatime,uid=1000,gid=1023,fmask=0002,dmask=0002,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0

/dev/block/mmcblk0p12 /mnt/extSdCard ext4 rw,nosuid,nodev,noatime,barrier=1,journal_async_commit,data=ordered,noauto_da_alloc,discard 0 0

app_186@android:/ # df -h

Filesystem Size Used Free Blksize

-h: No such file or directory

1|app_186@android:/ #
[Galaxy S III Android Development] Yank555:
Then leave out the "-h", it's just meant to show capacity in "human readable", maybe that's not implemented ;)

JP.

PS: I'm tired, but happy, managed to compile my first kernel on the S3 :D
[Galaxy S III Android Development] ahac85:
ok heres a screenshot
[Galaxy S III Android Development] Yank555:
OK, this shows that you have not partitioned your SD card. Is that possible ? The partitioning you need to do yourself, the script cannot take care of it.

You should have something like this :

JP.
[Galaxy S III Android Development] ahac85:
it was working fine first, then i flashed the externaltointernal sd mod

edit: ive just removed script for the switching of sd cards lets see what happens

edit; still doesnt work, going to repartition card again and take things from there, i think somehow partition may have got deleted, although i havent got the space back on the fat partition if it has

EDIT: All working fine, both mods working as they should, i wonder what deleted the partition, i was unable to see it under info in 4ext recovery aswell, the only partition available was the fat32.
[Galaxy S III Android Development] Yank555:
Well, at leasr you're up & running ;)

Anyone else having conflicts between the two mods ? I'd like to be certain, there is nothing I'm missing here.

JP.
[Galaxy S III Android Development] nfsmw_gr:
Hey Yank555!

I used your mod,installed fine free command outputs swap is working ok and swappines is set to 100!

But...when i type free i see the the swap only uses 20-40mb out of 500...is this normal mate? :S

I though it should use more than that...

But the way i'm on cm9,siyah kernel and user of supercharger v6...dunno if it makes any diference,juat saying...:)
[Galaxy S III Android Development] ctrlaltdel:
Hi, v6 supercharger will change the swappiness back to 20.

To solve this u will need to either change the swap script name from 98 to 991 or comment out the swappiness setting in v6 script.

I use method 2 coz it will reserve the sd cache tweak applied by supercharger.
[Galaxy S III Android Development] Yank555:
Absolutely, swappiness must be set high, and I suggest setting it 100, which is what my mod will do, except that supercharger will revert this back to 20 very soon after that, which makes swap work poorly if not not at all :(

I will take care of renaming the script and upload a new falsher tonight, so that swap script will be executed after supercharger.

You will then just need to reflash the mod and it will hanled the renaming.

JP.
[Galaxy S III Android Development] njmata:
Is there a problem?

Is there a problem with my installation?

I saw the swap partition using the "fdisk" command but when I use the "Free" Command I saw a 0 total 0 used 0 free.