yashsingh1/xdaforums huggingface dataset:
[Xperia Play Android Development] CosmicDan:
Incorrect. ALL partitions have to be Primary, a disk can have up to four primary partitions. THe order must be 1st: FAT32, 2nd: sd-ext, 3rd: swap
[Xperia Play Android Development] bamsbamx:
Thanks for helping us!!!! ;)
[Xperia Play Android Development] Potato13:
Unfortunately, I don't have an micro SD card reader. I don't think I can create a swap partition without one right?
[Xperia Play Android Development] MilkyJoePD:
I created one from my phone via USB. It didn't even delete anything.
[Xperia Play Android Development] gpkumaran:
Hi This works well with my arc s. But only one Problem..

The swappiness Doesn`t get changed to the value i set.. It is always in constant 20..

Dunno why.. i checked /proc/sys/vm/swappiness file and it says 20 after every reboot..
[Xperia Play Android Development] ozzuneoj:
I don't really know why but this mod was hard to get working on my setup, and when I did finally get it going it caused some some pretty serious problems, such as the inability to boot the first time as well as repeated force-closes of GO Launcher. I've removed it and it actually still seems to be causing problems.

I'm on an r800x running Cola6 ROM (stock, not CM9) and DoomKernel v01 test 2.
[Xperia Play Android Development] Franzferdinan51:
Just out of curiosity

Well this work on many galaxy tab?
[Xperia Play Android Development] olokos:
Imo it will work on every android but I won't let my hand to be cut down if I'm wrong.
[Xperia Play Android Development] fcaronte:
i try it and it work....but....after an half hour i restart my phone and it's dead all black screen nothing work hard brick and pc detect as qhsusb_dload :(
[Xperia Play Android Development] olokos:
Lol, I'm running few month for now with this mod and everything is ok. Your phone may have some hw issue. Similar thing happened to my friend with t mobile galaxy s II. He switched off his phone (without anything unusual) and then he couldn't boot it. Faulty memory. Your situation may be different though. Try to delete the script with aroma file manager. If this doesn't help then it is not the mod.
[Xperia Play Android Development] fcaronte:
phone is completaly die not boot in any mode....
[Xperia Play Android Development] olokos:
Then I'd bring it to the place where someone could determine what the problem is as I can't since all I can is soldering and following tutorials and this is the only way i get any development knowledge :D

But you can't get in any mode right? I mean fast boot, flash mode? If you can't then I think it's hardware issue.
[Xperia Play Android Development] pedyvirus:
cany connect my phone to pc can anyone help me?
[Xperia Play Android Development] olokos:
You probably messed up partitions. Is the sd working on your phone?
[Xperia Play Android Development] pedyvirus:
sd card is working on phone but cannot connect the phone to pc
[Xperia Play Android Development] w4lkm4n:
cause of problem is ,if your SD card saved many data ,and if you connect your device to PC using MTF (media transfer files) it's took more time until the device read from PC
[Xperia Play Android Development] CosmicDan:
What the hell does that mean? And it's called MTP.

If you are using an MTP Kernel/ROM (e.g. KXP or CM10), make sure your PC has MTP support. I've found the implementation buggy myself and it does sometimes simply not work - so I'm keeping my ROM's and Kernel on UMS.
[Xperia Play Android Development] Shilvenrha:
Doesn´t work for me.

Was tried differents 00userinits with the first line, changing the number 2 with the 3 etc...

When I type "fdisk -l dev/block/mmcblk1" on my terminal he don´t find nothing.

I have a 27gb for DATA.

1 GB for EXT 2

And 510 for swap.
[Xperia Play Android Development] olokos:
Just type in "free" :P
[Xperia Play Android Development] Shilvenrha:
Ehm.... thx, but that's just a command to check if it works that I already knew.

Once I changed the kernel and it worked
[Xperia Play Android Development] gegode:
hi hello ..

i really want to have this on xperia J ,,

anyone from xperia j user ever done this?

and can u guys make it clear

sd card external

fat32 - primary

ext2 - primary

swap - primary

this mean last number its '3" on script ryt?

should i set it all as a primary?

its this work on CM 10.0 ROM?

since i try it on my stock ics rom , got no luck..

should i add "#! ... bin" on the first line?

the script place at init.d folder on system/etc ryt? rwxrwxrw permission [i used script manager]

the script will work even there is another script (diff mod) running at init.d folder?

your guys help would be great..

thanks
[Xperia Play Android Development] shardeep:
Will this for me...
[Xperia Play Android Development] TechExhibeo:
Can I try this in Xperia Mini Pro???

I think roms n kernels dont matter which m using on it...
[Xperia Play Android Development] DiamondBond:
How can I disable it for mounting SDCard???

---------- Post added at 07:43 AM ---------- Previous post was at 07:24 AM ----------

Yea,u can! I did it on my mini pro,C:

---EDIT---

Found out that partitions dont Get mounted,C:
[Xperia Play Android Development] DiamondBond:
No,because this is running of another partition,so android recognises this and only mount the main SD Storage for files partition but not any other ones like ext2 and Swap!,C:
[Xperia Play Android Development] DiamondBond:
I frowned upon swap because i heard it would degrade SD Life performance because i just got my 32 GB MicroSD Like 3 months ago and i dident want to make it bad, but i did LOTS of research and thanks to ur guide i felt as if i might try it out, i placed a 1 GB partition, and I see no performance boost but the thing i do see is Apps i have used like 3 mins ago are still in memory which is Great!!!

NOTE This works great with the V6 SuperCharger on Balanced 512HP!

C:
[Xperia Play Android Development] ch3mn3y:
I think that 1gb is a lot too much. I made 512Mb swap partition but phone newer uses more than 100mb

Sent using tf300t - stock 4.2.1
[Xperia Play Android Development] zaku2s:
will this work if I am already using ZRAM?
[Xperia Play Android Development] zaku2s:
I don't know what I'm doing wrong but I cant set the permission to rwxrwxrwx. it reverts everytime I reboot my phone
[Xperia Play Android Development] olokos:
As long as your Rom supports init.d it will work.

Google swap and see what it's doing. It only helps with multitasking and when your device is running out of ram, it won't make your fps go higher ;)

Sent from my own planet using ion cannon :D
[Xperia Play Android Development] DiamondBond:
Tnx,man I will google,C:
[Xperia Play Android Development] kedar512:
I have Munjeni's stock jelly bean on my xperia sola.Will it work on my phone?Thanks:)
[Xperia Play Android Development] ch3mn3y:
It will work on every phone or tablet with micro sd, init.d support and root

Sent using tf300t - stock 4.2.1
[Xperia Play Android Development] kedar512:
Can i use ROM manager for partitoning sd card and swap.I have in built sd card and micro sd support also.Can i use in built sd card for partitoning?Thanks:)
[Xperia Play Android Development] ch3mn3y:
No. U can partition only external sdcard as internal is just normal flash memory named /sdcard for android.

However u can make swapfile (not partition) on internal sdcard if u want.

Sent using tf300t - stock 4.2.1
[Xperia Play Android Development] Kevinkdc:
Can you do this without a card reader?
[Xperia Play Android Development] DiamondBond:
Yes, but enter recovery and mount USB,C;, thats what I did and worked fine with mini tool partition wizard!
[Xperia Play Android Development] Prem_remy:
if [ -n /dev/block/mmcblk1p2 ];
then mkswap /dev/block/mmcblk1p2;
fi;

if [ -e /dev/block/mmcblk1p2 ];
then echo 60 > /proc/sys/vm/swappiness;
swapon /dev/block/mmcblk1p2;
fi;

i edited the script as above as the original script doesnt worked for me and result was i got bricked :( ... no flash mode, fastboot, no charging, no led.

can any one help me....

Device: LT25i

bootloader : unlocked

rom: cm10.1 rc 2

kernel: fxp
[Xperia Play Android Development] SShadowXX:
Thanks for sharing your idea, mine is working finally.

Venom's ViperZ 2.0 Sense4.1

My script below:
[Xperia Play Android Development] bamsbamx:
Hello people! I come here again! I just wanted to recommend this app for all that people who has low memory problems!!!

http://xdaforums.com/showthread.php?t=2297948
[Xperia Play Android Development] TheDynamiteGuy:
you can partition the sdcard in CWM recovery if you have one ;)
[Xperia Play Android Development] abdel12345:
Does this actually give you more ram and dies it help with heavy games a lot?

Edit: by mite ram I mean does it work as if you have more ram not actually make your device have more and is a claas 4 sd card fast enough?

Sent from my Xperia Play (r800x)
[Xperia Play Android Development] ch3mn3y:
Swap is slower than ram, and device sees its as swap not additional ram. Its for background app, what u see is still in ram (and many apps are always in ram - launcher if not killed, system apps or games as foreground apps).

I can say that it helps, but i used it on class 10 and now uhs1 sdcard and i heard that best is class 6+. But try. Only make copy of stuff on sdcard

Sent using tf300t - stock 4.2.1
[Xperia Play Android Development] olokos:
Swap is used when your device is running out of memory.

Ex. I'm watching xda using Chrome so the ram is close or near to full. I want to tweak build.prop with something new i saw on xda. I switch to root explorer, bam! I have to reload all the pages because android killed chrome process... Swap doesn't let it happen.

Short version: It improves multitasking a lot but I don't know about gaming. Probably it has no effect on gaming but I'm not sure actually.

Wysłane z mojego Xperia Play za pomocą Tapatalk 2
[Xperia Play Android Development] DiamondBond:
Swap is like Ram , This script essentialy pushes unused apps to the SD Card Partition thats Mounted as "Swap" whiich is a slow version of Ram, Although this will Keep apps and games in Memory for AGES (Depending on Partition size, I use 1GB, Insane right?) but It will Deteriorate the Sd Card Life, Normal SD Cards last about 5-6 Years before they start to slow down and have malfunctions but with Swap Always swapping things to sd (like copying files from pc to sd alot...) it will make it last about 3-4 Years (Depends on Parititon Size and Swap Frequency, I have my Swap Frequency on 56...) So This is GREAT for Multitasking!

But when it comes to gaming:

Its also Good, as Most apps get swapped out to SD... So then theirs more Actuall Ram Free for the Game to use and perform Better!, Therfore Boosting the Game GREATLY!

If you use Swap with some Good VM Allocation Tweaks for Dirty Ratios and a good Ram Management + A good Swap Frequency + A Good SD (or apps when you go to them they will load slowly) and A Good Sense of Knowledge for Testing this!

My Rom In V9 will feature a good Ram Management for this, Also i recommend using 56 as the Swap Frequency!

That was my Talk For It!, Also Heres a Custom Swap File with the best Things set...:

(Attachements)

Instructions in 1st post, Exactly same but Use this 00userinit instead of 1st Post One!
[Xperia Play Android Development] minipot:
Will this work on cm10 lupus v8 jb? As before it bricked it, also is there a commabd I can use in termibal emulator to find out what partitions I have on my sdcard?

Sorry if it's been asked before.
[Xperia Play Android Development] HEZAiKU:
What is the different between this script with ram manager by Juwe11 that already have swap and vm?

Please quick answer it.
[Xperia Play Android Development] Samuel IP:
CHECK OUT THIS METHOD........

I think it's quite easy...

Cick Here, Increase Swap without Partition
[Xperia Play Android Development] 404-Not Found:
Is it possible to get the SDCard RAM up to , say, 2GB? Yeah you might wonder why so much but to me 2GB is the minimum requirement for a good fast device.
[Xperia Play Android Development] ch3mn3y:
U can have as much as u want, but no more than ur sdcard has. U just need to create bigger linux-swap partition

Sent using SO-01D - P.A.C Man/LuPuS_JB
[Xperia Play Android Development] 404-Not Found:
SD Size is no problem, I have a 32GB card so 2GB is no problem.
[Xperia Play Android Development] abhi7395:
hello...i got this error...
[Xperia Play Android Development] abhi7395:
i tried to add script in rom toolbox...
[Xperia Play Android Development] yuzzzyuzzz:
i think this mod only work for rom that the kernel supports Swap partition

isnt it ?

---------- Post added at 06:32 PM ---------- Previous post was at 06:28 PM ----------

i think this mod only work for kernel that support swap partition, isnt it , mr bamsbamx ?
[Xperia Play Android Development] bamsbamx:
Yes, you are right mr yuzzzyuzzz :fingers-crossed:
[Xperia Play Android Development] yuzzzyuzzz:
well, just a hope then to get this ram swapper,

Can u gift me a clue, where i can find ICS ROM for MTK device that support swap partitions

thanks be 4
[Xperia Play Android Development] bamsbamx:
Ibwas thinking about it right now. Have you tried it with a kernel that supports init.d???

Theorically swap should be supported by any kernel...
[Xperia Play Android Development] yuzzzyuzzz:
My rom support initd, n fyi my device linux swap is @ the /dev/block /mmcblk1p3 but when i try tohe command "swapon /dev/block/mmcblk1p3" it always said the function not implemented (see attach), can u help me?
[Xperia Play Android Development] bamsbamx:
Its said in the OP, INSTALL THE LATEST BUSYBOX
[Xperia Play Android Development] yuzzzyuzzz:
i had install the latest busybox, my busybox is1.21.0-stericson, (please see my attachment)

what kind of info that i can provide to u about my android, so u can help me then :)

@ the other forum said that its because the kernel doesnt support swapon, so the command come to "Function Not Implemented"

What do u thing mr bamsbamx

Thank u
[Xperia Play Android Development] 404-Not Found:
Does this works with Virtual SDcards? For example my Kindle Fire has 2 partitions : Internal Storage(1.09 GB) and Internal Storage (SDCard[5.69 GB]), could I use one partition or make another one and use it as swap?
[Xperia Play Android Development] ch3mn3y:
U probably cant edit partitions, so u cant make new.

Even if u will use intetnal storage as swap u will loose possibility to install anything (its paetition for apks)

sdcard is storage fo data files so some apps wont work without it.

Easier for will be using swap file on sdcard partition (however u will need to unmount it before mountig tablet to pc) or on internal storage (however it need to be small file.

Sent using SO-01D - AuroraPlay/LuPuS_GB
[Xperia Play Android Development] ngvhoang96:
how can i check if the phone has more ram? i test in terminal control and i has no "0" value like you say, but my my ram is still in 414Mb ram
[Xperia Play Android Development] ch3mn3y:
If u habe no 0 u have sswap. But swap isnt ram so its not counting by system as ram.

Only possibility to found out how muslch seap u have is "free" in terminal or app which do it for u (setxperia has this feature, swap apps should too)

Sent using tf300t - CROMI-X/Hundsbuah
[Xperia Play Android Development] gius321:
2011 Xperias (ARC S)

could u tell me if this works for other xperias?
[Xperia Play Android Development] CriGiu:
As long as it is an android device (or even a different linux-based-software device) it'll work.
[Xperia Play Android Development] gius321:
I Mean How To Revert SD (if were created partitions)...

Have swapping activated in your phone permanently, or until you remove that script or change of ROM

if i reupdate my stock rom using pc comp. the script will be deleted and i wonder if SD has ext partitions or something like will be remain? will it reset SD card like it was when bought?
[Xperia Play Android Development] CriGiu:
As I remember, PC Companion does not format the /sdcard, but if you want to be sure, you should remove your sd when you're upgrading.

Obviously you'll lose the script as your /system will be erased, and busybox
[Xperia Play Android Development] gius321:
Standart SD card

Could u tell me if i can use class 4 sd card? u said that we must use high class, was it advice or it must be higher class?
[Xperia Play Android Development] TheDynamiteGuy:
i have use this on my class 4 sdcard and it was just okay,but its recommended to use class 6 or higher
[Xperia Play Android Development] gius321:
okay but

how can i control this new swap memory? any program that shows usage of new RAM ?

---------- Post added at 12:13 PM ---------- Previous post was at 11:20 AM ----------

when i click partition it say ext size 512 mb , and then swap ... how many for swap ? it isn't mentioned in instuctions...

---------- Post added at 12:17 PM ---------- Previous post was at 12:13 PM ----------

You need to turn off swap before you mount SD via USB, if you don't you will not be able to mount sd as swapfile is active and set to read only which will deny request to mount USB Storage. do we need it?

---------- Post added at 01:01 PM ---------- Previous post was at 12:17 PM ----------

i haven't activated this already but when i partitioned sd card and run free in TE there was swap with numbers not "0" so is it active or what?
[Xperia Play Android Development] bugsheee:
Script on the OP doesnt work, so i decided to edit script with simple way..

First of all make sure you have swap partition in your SDcard,

Run terminal emulator and type:

su

fdisk -l /dev/block/mmcblk0

You should get output like this:

root@10.168.211.55:/ # fdisk -l /dev/block/mmcblk0

Disk /dev/block/mmcblk0: 16.0 GB, 16021192704 bytes

255 heads, 63 sectors/track, 1947 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System

/dev/block/mmcblk0p1 1 1619 13000704 b Win95 FAT32

/dev/block/mmcblk0p2 1619 1816 1580032 83 Linux

/dev/block/mmcblk0p3 1816 1947 1056768 82 Linux swap

root@10.168.211.55:/ #

I have 3 partition, where swap partition at the block 3, I just put 1 line in the script :)

so in the file 00userinit look like this:

mkswap /dev/block/mmcblk0p3 && echo 60 > /proc/sys/vm/swappiness && swapon /dev/block/mmcblk0p3

Save it and put under /system/etc/init.d

Dont forget to chmod that file with rwxrx-xr-x permission.

Test it first.. go back to terminal and enter to directory, type

Cd /system/etc/init.d

./00userinit

free

It should work now:

root@10.168.211.55:/ # free total used free shared buffers

Mem: 353936 335360 18576 0 84

-/+ buffers: 335276 18660

Swap: 1056760 89232 967528

root@10.168.211.55:/ #

Now reboot your device to make sure it autorun on boot..

Hope this help..

Thanks!
[Xperia Play Android Development] MgudFrn:
[MENTION=4199537]bamsbamx[/MENTION] How can I activate hard gaming option in V6 supercharger?
[Xperia Play Android Development] clfdhq:
01userinit ?, I have error, can u help me ?

thank
[Xperia Play Android Development] Prajeeth Anand:
where is 01userinit file?

where is 01userinit file to download?

Will it work for android 4.1.1
[Xperia Play Android Development] twistedumbrella:
It was just 00userinit slightly modified to:

#!/system/bin/sh

if [ -n /dev/block/mmcblk0p3 ];

then mkswap /dev/block/mmcblk0p3;

fi;

if [ -e /dev/block/mmcblk0p3 ];

then echo 60 > /proc/sys/vm/swappiness;

swapon /dev/block/mmcblk0p3;

fi;

And yes, it will work in 4.1.1 as long as the kernel supports init.d
[Xperia Play Android Development] nicks25:
it worked for me as terminal says no "0" values :) well, yet to test it with loading apps in ram that really swapping working or not.

first of all thanks to mr. bamsbamx (hit thanks button too ;))

i'm using busybox version v1.19.2-cm71 and v6 supercharger (update9_rc8.2).. i did not update busybox as i had read somewhere long ago that higher version of busybox doesn't work with v6 supercharger with some phone and i thought to try this swapping process with my current busybox version and it worked :)

Also i didn't changed anything in 00userinit.txt . i put it as it is ,

if [ -n /dev/block/mmcblk0p2 ];

then mkswap /dev/block/mmcblk0p2;

fi;

if [ -e /dev/block/mmcblk0p2 ];

then echo 60 > /proc/sys/vm/swappiness;

swapon /dev/block/mmcblk0p2;

fi;

I just changed mmcblk0p2 to mmcblk0p3 because I have 3 partitions, FAT32, EXT4 and Swap.

changed nothing else. even didn't edit #!/system/bin/sh

I'm using Sony ericsson xperia neo , MT15i, gingerbread 2.3.4, with stock GB ROM

my kernel is pwnKernel 1.7c

first I tried swapping with Ram Expander app because it is the easier way but app was failing to reconnect after every reboot

so i switched to this approach.. and I feel creating partition is safer in case ur sd gets corrupt as only partition will get corrupt which is swap not the entire sd card.. correct me for this point if i m wrong.

hope this info help you all. thanks again :)
[Xperia Play Android Development] twistedumbrella:
A swap partition decreases the lifespan while a swap image does not, but neither corrupts the card. The image is mounted as a partition so it is still a "partition" that gets corrupted. The image can be deleted and remade, but the partition needs to be reformatted.
[Xperia Play Android Development] nicks25:
what is swap image now? :confused:

and this method is safe to use than Ram Expander app coz it uses ur sd partition for swap file but this uses separate partition, correct?

---------- Post added at 04:18 PM ---------- Previous post was at 03:28 PM ----------

when I check my swappiness using terminal emulator as,

cat /proc/sys/vm/swappiness

it shows 30 everytime instead of 60 :crying:

I checked all the files in init.d and found to files namely S99Supercharger and SS98KickAssKernel having line as,

kernel.swappiness=30 and kernel.swappiness=20 respectively.

I changed it to 60 but still no success. it show as 30 only in terminal emulator..

what can be the cause? where else i need to change? pls help :confused:
[Xperia Play Android Development] twistedumbrella:
Swap images are files on the sdcard a lot like the backups for a ROM that are mounted as virtual partitions. I don't know what RAM Explorer uses, but if it isn't a physical partition, it is probably the image.

As for your swappiness, there may be another script that was missed or it is set in the kernel init (although I have never seen a kernel predefine it). If you still have a swap app installed, that could also be setting it.
[Xperia Play Android Development] ch3mn3y:
Ram explorer is creating swapfile and using partition is safer coz u dont need to remember to turn off swap when u connect phone to pc etc as the partition wont be unmounted

@up

I think LuPuS kernel can predefine swappiness using lupus menu.

Sent using TF300T - CyanogenMod 11.0/GEASS (F2FS)
[Xperia Play Android Development] nicks25:
i had already checked this files in init.d folder and found two files namely 99SuperCharger and 98KickAssKernel setting swappiness 30 and 20. i changed it to 60. Also i am having .sh script running on boot in that also I set 60 but no success. it shows 30 only.

i created another script having below code,

#!/system/bim/sh
echo 60 > /proc/sys/vm/swappiness

i named it as 99swappiness hence it at last in alphabetically order and will execute in last. put it in init.d folder.

also created 99swappiness.sh script and running it on boot with Script manager.

so theoratically my swappiness should be 60 but it is set to 30 or sometimes to 20.

and i manually have to run 99swappiness.sh script again to set it to 60.

can anybody pls explain this to me? thanks :confused:
[Xperia Play Android Development] twistedumbrella:
It's probably an app setting it then. They would run after init.d
[Xperia Play Android Development] nicks25:
i do not have such apps which set swappiness. i had Ram Expander earlier before trying this method but not now.

i have apps installed like link2sd plus, sd maid pro, no-frills cpu, root explorer which talk with system. but i do not think that they might set swappiness.

so no point blaming any app, isn't it?

:confused: