yashsingh1/xdaforums huggingface dataset:
[Galaxy S III Android Development] Yank555:
You could not use that card on a Windows PC anymore, except if all partition are primary, in which case a Windows PC would only show the first (Windows seems to have a hard time counting further than 1 :silly:).

On Linux, thus Android, you could do that, you'd just need to make your own script to mount whatever is not the first partition ;)

JP.
[Galaxy S III Android Development] natboy:
Yeah, it looks like the partitions, at least for the sdcard is the same on the atrix. My external is mmcblk1. I couldn't get the script to run though, it couldn't find /tmp/install/{filename}. I just ran the commands manually. It did work, but then crashes shortly afterwards... on wells..

One thing though, I didn't disable zram. Is there an easy way to do that, with an app, or is that a kernel thing?
[Galaxy S III Android Development] nocoast:
Heres a random question for you. I develop AOSP roms for the i9300 and it doesnt want to read my 64gig class10 sdcard...Do you think if i partitioned it in half the file systems would be readable? (Note, the 64 gig card reads just fine while in touchwiz...Im an aosp dev/maintainer so im not dumb to this stuff but ive yet to find a fix to this issue...) If you have any advice at all itd be greatly appreciated as I would hate to put this SD to waste...
[Galaxy S III Android Development] Yank555:
The issue is the exFat filesystem which is proprietary Microsoft code, hence no sources available, so no non Sammy-kernel support :(

There would be a few options around that...

1) you could format the 64Gb partition in fat32 (4ext recovery on my Sensation would do that)

It is said to work, even though Microsoft says Fat32 is limited to max 32Gb partitions.

2) you could reformat the 64Gb partition in ntfs and use a kernel that has ntfs compiled into it (mine has)

3) you could partition the card in two 32Gb partitions, one Fat32 (seen as SD card in Windows and Android), plus an exta ext4 partition (generally called sdext) and add a script in init.d that mounts that partiton at boot, but to where so it is usefull ??

There sure are more options than those 3, those are the first that came to my mind...

Hope this helps you find a decent solution.

I wanted a 64Gb card, got a bad one, returned it, got another bad one, and gave up on 64Gb for now :(

JP.
[Galaxy S III Android Development] Yank555:
I suggest not to use zram when using hardswap ... I'd be looking for a script that formats and mount as swap a zram device ...

Try :

rgrep zram /system/etc/*[/code[

JP.
[Galaxy S III Android Development] Nixda99:
Why hardcoded device path. The swap script of Andrew Sutherland search the device path and use it for all commands.

# find SD Card
for MMC_NUM in `seq 0 9`; do
MMC_TYPE=`$BB cat /sys/block/mmcblk${MMC_NUM}/device/type`
if [ "$MMC_TYPE" = "SD" ]; then
SWAP_PART=`$BB fdisk -l /dev/block/mmcblk${MMC_NUM} | $BB awk '/^\// && $5 == 82 {print $1;exit;}'`;
break;
fi;
done

$SWAP_PART contains the correct path and can used like this:

$BB swapon $SWAP_PART >/dev/null

But the script didn't set the swappiness (Was set to 20 before). Have inserted the needed command with 100er swappiness in script and WOW!:D

Finally the apps didn't reload so often. 1 example: Building OSMAnd offline maps indexes need much time and now he will do this only 1 time after reboot. Second and following starts of the app will show instantly my last position, no long reindex process!:cool:

Thank you very much!!!
[Galaxy S III Android Development] Yank555:
Could be a good way to search for the right device, will look into this.

I started off with just a manual procedure instructing how to make and use a swap partition, until I ended up with this mod ;)

But along the way I found that there was always a little difference from device to device, so a totally generic mod might not be so easy either...

JP.
[Galaxy S III Android Development] goldenson:
thanks for the mod

using an old 2GB microsd card

fully utilising it :)

running on omega v12 and siyah v1.5sc1
[Galaxy S III Android Development] eiraku:
Trying out 90 swappiness to counter the 3.0.39-40 low memory weirdness (which still happens).
[Galaxy S III Android Development] Yank555:
Thanx for testing !

If there is anything I can do to help you figure this out, just let me know !

JP.
[Galaxy S III Android Development] whpgab:
Hi!

I installed your Hard Swap, and every thing went fine,but when I type free in a terminal emulator next to the swap everything is 0.

Kernel is :Siyah S3 v1.5rc1

How do I know if it is working?

Any idea?

Thanks
[Galaxy S III Android Development] Yank555:
Well if is shows free, then I'm afraid it's not working :(

Can you check if you have a "/data/hardswap.log" and a "/data swap.0.log" ?

Whichever you have, can you post them so I could have a look and help ?

Thanx, JP.
[Galaxy S III Android Development] eiraku:
Hmm, what exactly was changed past 3.0.39 to change the low memory behaviour in the first place anyway? I'm curious.
[Galaxy S III Android Development] Yank555:
Backports of Linux 3.5.x memory management, which should be a good thing, but Android's become touchy with lower LMK settings ever since ...

Not sure, though what exactly the problem is, still trying to figure that out on a Sensation kernel thread ... people change these settings a lot (without always really knowing what it does...) so it's a hard call, but since I saw similar reports here, and all that is linked between both is LMK setting & kernel versions.

For now I run a 3.0.15 kernel, but been wanting to update it to 3.0.40, so I may find out then ;)

JP.
[Galaxy S III Android Development] whpgab:
-----------------------------------------------

Hard Swap Flasher by Yank555.lu v1.1 for SGS3

-----------------------------------------------

SD-card device = /dev/block/mmcblk1

Paratition table for SD-card :

------------------------------

Disk /dev/block/mmcblk1: 31.3 GB, 31393316864 bytes

255 heads, 63 sectors/track, 3816 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System

/dev/block/mmcblk1p1 1 3697 29694976 7 HPFS/NTFS

/dev/block/mmcblk1p2 3697 3816 955392 82 Linux swap

Swap partition = /dev/block/mmcblk1p2

- formating swap partition '/dev/block/mmcblk1p2'

Setting up swapspace version 1, size = 978317312 bytes

- copying swap activation script to /system/etc/init.d

done.
[Galaxy S III Android Development] Yank555:
That looks fine.

You have no swap.0.log ?

JP.
[Galaxy S III Android Development] eiraku:
If you ever find out what's really going on, do update us. I'm personally stuck with the latest Siyah betas so I for one will really appreciate a way to alleviate this whole low memory weirdness business.

For me, using ICS+ browser to open the nexus galaxy boot animations thread on Android Forums (don't ask me why I'm there), with all its huge animated gifs (there are like what, 40+?), was enough to finish up my RAM and trigger the slowdown bug.

Granted, that page is a crazy bandwith killer that is far from what you normally see...
[Galaxy S III Android Development] ceo.mtcl:
It's working smoothly on siyahs 1.4b6. Should I upgrade to siyahs 1.5rc1? Do you know if i have to rerun the script if I install newer version of the kernel?

☞ sent from GS3 or Nexus
[Galaxy S III Android Development] Yank555:
Kernel update won't hurt this mod, reflashing the ROM will.

JP.
[Galaxy S III Android Development] whpgab:
No, only this one. (hardswap.log)
[Galaxy S III Android Development] Yank555:
Looks like your ROM/ramdisk has no init.d support ?

Is a "/system/etc/init.d" folder ?

JP.
[Galaxy S III Android Development] whpgab:
No, there isn't. It is a stock rom with SiyahKernel S3-v1.5rc1 kernel.
[Galaxy S III Android Development] Doughnut:
I'm using this mod on my class 10 Samsung 16gb SD card...Nothing to really report other than swap appears in terminal...
[Galaxy S III Android Development] Yank555:
Try creating the folder and reflashing the mod, I have a hunch Siyah's ramdisk might do the magic and execute init.d scripts.

In a terminal type :

su
mount -o remount,rw /system
mkdir /system/etc/init.d
chmod 777 /system/etc/init.d
chown 0:2000 /system/etc/init.d
mount -o remount,ro /system

JP.
[Galaxy S III Android Development] whpgab:
So now I have swap.0.log

:No SD-card swap partition has been found, quitting ... sorry no swap for you, I'm afraid !

------- SD-card partition table ------

----------- swappiness ---------------

A file created in the Init.d folder.

The terminal free command result is the same 0.

Before you say, I attached the sd card partition table:

First partition is exFat.
[Galaxy S III Android Development] Yank555:
Ok, the SD card is partitioned correctly...

Can you tell me the result you get if issuing the following command in terminal :

swapon /dev/block/mmcblk1p2

As well as :

fdisk -l /dev/block/mmcblk1

JP.
[Galaxy S III Android Development] whpgab:
So I type Su and after your commands. Then I got this:

Then I type free and the swap was not 0.

I restarted the phone and swap is 0 again.

If I not use SU command then permession is denied was the answer.
[Galaxy S III Android Development] Iormangund:
Working fine for me on Omega 12 with Siyah 1.5rc1, haven't tried it with 1.4b6 and no idea if a kernel upgrade will need a rerun.

Have been reports on siyah thread of battery issues with rc1 so you may be better waiting till next update (tomorrow I think).

Terminal 'free' command reports swap space usage and on appearance at least it seems to help with ram usage very well.

Cannot find an app which will show the swap space when it shows ram though, not too surprised.

Seen people mention system tuner pro and using the LMK setting medium with this mod, could someone point me to where that is? (google isnt helping). Know it's not thread related so a pm or something may be better? Thankyou.
[Galaxy S III Android Development] Yank555:
Yep, you need to be su to run those.

Very strange, all looks like it should work ...

Can't remember from which version on Siyah has swap support, though. Does the version you use offer zram ? If not, then that might be the problem, GM only added swap support when he added zram.

Although best is to turn zram off when using this mod (details, see post 3, FAQ).

JP.
[Galaxy S III Android Development] Yank555:
Flashing a kernel won't harm the mod, as long as the new kernel has swap support, of course ;)

System Tuner is available on Play Store, there's a free and a paid version.

JP.
[Galaxy S III Android Development] Mopral:
Zram is in Siyah kernel since v1.5 Beta 4 so this mod should not work on previous release
[Galaxy S III Android Development] whpgab:
This one is support swap. I checked it. Zram is also supported. In the kernel download page says zram is on by default, but on my phone is off.
[Galaxy S III Android Development] Iormangund:
Thankyou but I was actually referring to LMK setting, I already have system tuner pro, but cannot find any LMK or settings similar to the ones mentioned in this thread. Not that I know what LMK is.
[Galaxy S III Android Development] eiraku:
Here it is, under tweaks:

Check the "preset" button on the bottom left for the presets.

Next go settings -> active tweaks -> re-apply memory limits and select init.d for it to hold across reboots.

I think.

Yank555 correct me if I'm wrong.
[Galaxy S III Android Development] Yank555:
Yep that's it. I just prefer using "set on boot complete", which is not so "sexy" in terms of technical implementation, but on the other hand you'll be certain it will be set after any other script tries to do its magic ;)

JP.
[Galaxy S III Android Development] Yank555:
Wait, even zram won't work ?

What ROM you said you were using ?

Is your busybox properly installed and updated ? If you're not sure, get this app and let it install/update busybox for you.

JP.
[Galaxy S III Android Development] Mopral:
In fact, if you look at the Siyah changelog, the first one with zram as a note "enabled by default" but this setting has been revert to "off by default" in later version. This does not affect your script

About busybox: even if I think it is stupid, Siyah kernel automatically install busybox (I think it is busybox 1.20.2 CM9). But it push it to the /sbin folder. Some apps/script search for busybox in /system/xbin folder and then won't work because they can't find busybox. If you install busybox in /system/xbin with the free app, you will end with 2 busybox installed on your phone and maybe it could create some issue (not sure...) even if it seems to work fine on my phone
[Galaxy S III Android Development] Yank555:
Busybox is a little more complicated than that, you have one binary and a bunch of symlinks pointing to that binary.

Depending on the symlink name, busybox will hehave like that program, the binary is a swiss knife if you want.

Rename busybox binary into fdisk and it will behave like fdisk, rename it into swapon and it will hebave like swapon etc. ;)

Are you sure the kernel pushes busybox ? Strange, that would rather be the job of a ROM, maybe it's for convenience ?

JP.
[Galaxy S III Android Development] Mopral:
-I am on stock LG8

-I rooted it with CF-root

-I flashed Siyah kernel

-I install busybox in /system/xbin

With that I ended with busybox binary+symlink in /system/xbin AND in /sbin folders

Stock rom and CF-root do not have busybox (AFAIK) so yes I am pretty sure that the second busybox comes from Siyah kernel but I do not know why....
[Galaxy S III Android Development] hellsgod:
Because Siyah have auto rooting. If you flash Siyah and reboot the device and "auto root" is ticked, it will install it i think... Maybe i'm wrong.

hells
[Galaxy S III Android Development] Mopral:
Nope!

Auto-root will only push Superuser.apk and binary AFAIK
[Galaxy S III Android Development] Iormangund:
Perfect, thankyou. I had a suspicion it was autokill. Just read the changelog and notice mention of Low Memory Killer and I probably could have worked it out if I wasn't being dense. Still not having any issues with this mod, everything's working fantastically. Will start tweaking LMK and swappiness now and see if anything negative comes up.

EDIT: Does anyone use system tuner sysctl 'recommended' setttings? Do they work well with s3 (generally too) and this mod? Specifically the recommended swappiness of 60 and cache pressure 10?
[Galaxy S III Android Development] whpgab:
No, I just said it is off.

Stock rom : XXLFB

Busybox is installed v1.20.2

/system/bin
[Galaxy S III Android Development] Yank555:
Then I think neither stock ROM nor Siyah's ramdisk does execute init.d scripts ... do you have anything in init.d except this mod ?

JP.
[Galaxy S III Android Development] Yank555:
Only thing I could think of would be convenince, or to be certain to have all the goodies work even if the ROM used does not have busybox installed ... ? I suppose it would be easier to ask that question to GM or in his thread to get an answer rather then my guessing ;)

JP
[Galaxy S III Android Development] whpgab:
Nothing. Only yours.
[Galaxy S III Android Development] Yank555:
You could try to put this in a script file (call it "99test") and put it in "/system/etc/init.d" :

#!/system/bin/sh
touch /data/kilroy.was.here

You need to give it all permissions (rwxrwxrwx).

Then reboot and check if there is a file named "/data/kilroy.was.here".

If there is none, then there is not much I can do to help you, that means that your ROM lacks init.d support :(

If there is, well good question, but we will find a solution ;)

JP.
[Galaxy S III Android Development] Mopral:
Just wanted to say that it works for me on stock XXBLG8 with latest siyah kernel so this kernel bring init.d support even if you are on stock rom

If it still does not work for whpgab, I would suggest him to start from scratch:

-reflash stock rom

-factory reset

-root with CF-root

-flash latest siyah kernel

-flash your zip file in recovery
[Galaxy S III Android Development] whpgab:
I tried. And it is created a kilroy.was.here file.

And created a log file which says No SD-card swap partition has been found....

If there is a hope, I do not want to reflash my rom. Anyway it is working when I manually type your commands.

Memory card is a samsung class 10 card.
[Galaxy S III Android Development] Yank555:
Can you post the swap.0.log file as well as /system/etc/init.d/991swap (or 98swap whichever you find).

JP.
[Galaxy S III Android Development] Mopral:
So now that we know that your init.d folder is working

-which recovery do you use?

-which version of Siyah kernel?

-do you use another mod than this one?

-have you try with a FAT32 partition instead of an exFAT one on your SDcard (wait for Yank555 advice on this one as I do not know if it could screw the script...) ?
[Galaxy S III Android Development] Yank555:
The other partitions should not matter as long ass all are primary, which is the case...

JP.
[Galaxy S III Android Development] whpgab:
Sure.

I zip it: http://alcaportal.hu/phone.zip

Thanks for your help again.

-which recovery do you use? I think CWM

-which version of Siyah kernel? The latest version v1.5rc1

-do you use another mod than this one? Yes, circle battery

-have you try with a FAT32 partition instead of an exFAT one on your SDcard (wait for Yank555 advice on this one as I do not know if it could screw the script...) ? No, I did not try. I would like to use exFAT.

So, if I type it manually then it is working, but after phone restart I have to type it again. If there is a way that I can run it manually after boot would be ok. Usually I do not have to restart my phone a lot. :fingers-crossed:
[Galaxy S III Android Development] Mopral:
Use root explorer and go to /system/xbin, then tell me if in this folder you have this 3 files: awk, grep and fdisk

If not then use busybox app to install busybox in /system/xbin folder

Then restart in recovery and reflash this mod

Then open terminal and type:

su
free

And check if the mod finally works

Give feedback here
[Galaxy S III Android Development] whpgab:
It is working now!! So the last solution was to install busybox to xbin as well.

Thanks you guys!
[Galaxy S III Android Development] Nichie:
YES!!!!!!!

works for me as well!

Stock rom on syiah rc1.
[Galaxy S III Android Development] Mopral:
So here is the answer for everyone: this script search busybox in /system/xbin si if busybox is not installed in this folder then you're screwed

Maybe this information should be in first post...
[Galaxy S III Android Development] Yank555:
I will add it to the FAQ ;)

JP.

EDIT : FAQ updated !
[Galaxy S III Android Development] mattiadj:
This picture talks it self!

Thank you mate

Inviato dal mio GT-I9300 con Tapatalk 2
[Galaxy S III Android Development] mattiadj:
What ask a thing. Since latest omega has built in supercharger, can I flash this mod and use it as always? (also with LMK settings)

Inviato dal mio GT-I9300 con Tapatalk 2
[Galaxy S III Android Development] Yank555:
I think so, I changed the script name to be compatible with supercharger...

Don't use too harsch LMK settings, use the latest I recommended, they may use swap a little less, but on later kernel vesion (3.0.38+) you should not run into low memory induces lags.

JP.
[Galaxy S III Android Development] eiraku:
Well, actually, you're a really heavy user, you just run into it LESS... ;)

I still cannot understand how they made memory management past .38 so touchy in low memory situations. Or why.
[Galaxy S III Android Development] mattiadj:
I'm using latest suggested and I have some lags. No using supercharger now I'm on Omega 12 yet

Inviato dal mio GT-I9300 con Tapatalk 2
[Galaxy S III Android Development] Yank555:
Good call ... they must have a reason I guess ...

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

Thanks for this great script, I have applied and am very happy about the result. I am running Omega v13 and followed the instructions here: http://xdaforums.com/showpost.php?p=30350822&postcount=12854

I have shared my positive opinion on that subject. This is a great development for me!

Regards.
[Galaxy S III Android Development] Yank555:
Great to hear ;)

I'd have a general call for everyone :

If you find "good" LMK settings, could you please share the values that work great for you (please also state the kernel and kernel version you're running) ?

I think we can all learn a lot while sharing these infos ;)

Thanx, JP.
[Galaxy S III Android Development] DirkStorck:
Hi. I wanted to try your mod but the problem I have is that my sdcard is in exFat format. I didn't find a partition manager that can handle/resize exFat (Mini Tools, GParted)

I don't wanna lose exFat because of the nandroid backups I need file support for files bigger than 2GB which fat32 can't handle....
[Galaxy S III Android Development] mattiadj:
Leave the partition unformatted than format this partition with windows as exfat and you will be ok

Inviato dal mio GT-I9300 con Tapatalk 2
[Galaxy S III Android Development] DirkStorck:
Ok. Thanks I will try that :D

EDIT: Great! Now my PC does not recognize my SD card !!! :(

EDIT2: Ok. I have managed to create the exFat and the swap partition :) Now I will copy all files back and install the script. Lets see how my baby will run :D
[Galaxy S III Android Development] DirkStorck:
Thanks you some much...it is working! That one was easy! :D Lets see how it improves the phone :)
[Galaxy S III Android Development] Geo1997:
Possible to create the partition without losing the data ? They always says that it has to delete the data partitions :/

Envoyé depuis mon GT-I9300
[Galaxy S III Android Development] eiraku:
"Medium" LMK System Tuner preset (same as reccomended on OP), "swappiness" set to "90" on Siyah 1.5RC1/3.0.39.

Very good general usability, medium usage of swap. Hiccups on low memory as usual.

BTW, latest Siyah 1.5 non-RC is reverting back to 3.0.15 as base. Can we go back to heavy swapping and lighter LMK settings with 3.0.15, as that weird low mem bug shouldn't be there any more, right?

Edit: Now testing "Light" LMK ST preset with "swappiness" set to "100" on Siyah 1.5/3.0.15. Lets see how it goes.

@Geo1997: Use MiniTools Partition Wizard on PC. Data stays intact.
[Galaxy S III Android Development] Geo1997:
Yeah works with MiniTools but i had to remove the microsd and put in a microsd reader and not with the UMS mode with the phone :p

So for the moment only 75MB is taken on the swap. It will take more and more when opening apps ?
[Galaxy S III Android Development] eiraku:
Funnily enough, I tried UMS first too and was wondering why it couldn't work back when I was partitioning lol.

Anyway, yes, the more you open stuff the more swap is utilized. But makes sure you have your LMK settings set as given in OP to maximize swap usage (or if you're running a Kernel built on pre-3.0.39 Linux sources, set it even lighter).
[Galaxy S III Android Development] Geo1997:
:laugh:

Well

I did llike this (on Omega v13 and SiyahKernel v1.5) :

"Here is a small tutorial to disable supercharger on this rom and make a multitasking and fluid system.

1) Remove SuperCharger

2) Follow steps of YANK55 topic to make a swap partition of sd card 300mb and flash the version 1.1 of script

3) Download from play store autoKiller memory optimizer https://play.google.com/store/apps/d...XRva2lsbGVyIl0.

4) Choose from preset "moderate" (NOT USE THE VALUES OF LMK SUGGSTED BY YANK55)

5) Reboot"

autoKiller memory optimizer and LMK are the same ? is it working when the phone boot ? No need to start it every time ?
[Galaxy S III Android Development] whpgab:
Is there any other kernel than Siyah which can handle this swap thing?

With the latest version of Siyah kernel my battery is not too good and the phone sometimes can be very hot.
[Galaxy S III Android Development] TheRT14:
try other version of siyah, actually i´m on 1.5 RC1 Version and run so good, obviously when i play games and surf the internet my phone heats up ;P