[MOD] native swap

does this help?

  • yes (yay!!)

    Votes: 43 91.5%
  • no (oops!!)

    Votes: 4 8.5%

  • Total voters
    47
Search This thread

vita94

Member
Apr 19, 2011
39
4
Niš

I've copied it to system/etc/init.d/ rebooted the device, but again when I type free in the console it does not work? It shows swap 0.

Do I need to set some permissions (777) to the file, or do something with the script manager?

---------- Post added at 01:47 PM ---------- Previous post was at 01:38 PM ----------

I've copied it to system/etc/init.d/ rebooted the device, but again when I type free in the console it does not work? It shows swap 0.

Do I need to set some permissions (777) to the file, or do something with the script manager?

I forgot to set the execute permission chmod 777 did the trick :)

Thank you all for your help :)
 
Last edited:

lars1216

Senior Member
Oct 13, 2011
2,014
184
Gorredijk
is it possible to have my sd card used for 3 seperate things? link2sd, swap and data? or cant link2sd and swap work on the same sd card?
 

ham4ever

Senior Member
May 2, 2012
116
22
i did same steps , and i checked free in terminal and comes swap with 0

anyhelp?

i use [ROM] AOKP (4.0.4) b40 | KERNEL 2.6.35.10
 
Last edited:

thenexor

Senior Member
May 4, 2009
124
25
i did same steps , and i checked free in terminal and comes swap with 0

anyhelp?

i use [ROM] AOKP (4.0.4) b40 | KERNEL 2.6.35.10

3 things could be wrong:
-permissions: try with chmod 755 /etc/init.d/07swapon (777 is OK too)
-group: chgrp shell /etc/init.d/11link2sd
-interpreter path: change the first line of 07swapon from #!/system/bin/sh to #!/system/xbin/ash (only good for AOKP)

But I believe only the first is really relevant. If it still doesn't work (after rebooting, obviously) make sure you do have a swap partition in the SD, and it's a primary one, not logical.

lars1216 said:
is it possible to have my sd card used for 3 seperate things? link2sd, swap and data? or cant link2sd and swap work on the same sd card?

Make 3 primary partitions, and make sure the fat16/32 one for data is first and the one for link2sd is the SECOND one, either of type ext2 or ext3, ext4 is not recommended for now.
 
  • Like
Reactions: ham4ever

Top Liked Posts

  • There are no posts matching your filters.
  • 9
    hey guys im making this thread cus androidboss dint know how to do this and im mkaing it easier for him(might help others too so :p)

    I AM NOT RESPONSIBLE FOR ANY DEAD SDCRADS PHONES LAPTOPS DESKTOPS AND ANYTHING ELSE
    requirements
    -windows computer
    -phone with swiftdroid or any rom that supports inti.d boot scripts
    -recovery 5.0.2.3

    1. backup all sdcard stuff to computer.

    2. wipe all data from the sdcard. after that use this to remove all partitions from sdcard( if you do not have any other partitions on sdcard skip to the end bellow the last picture)

    http://www.partition-tool.com/personal.htm

    the pics will look may look different cus im using a older version

    mine looks like this
    1st.png


    to remove all the other partitions
    2nd.png


    3rd.png


    4th.png


    5th.png


    6th.png


    when all is done click apply at the top lefthand corner. at the end after it refreshes make sure there is only one partition left . the FAT32 partition.

    so now the card has no data put it in the phone and boot into recovery(5.0.2.3). there go to advance>partition sdcard>EXT size 2M(2M if you dont want a ext partition but if you want then the size is up to you:) )>swap size 256m

    power down the phone and put back data into the sdcard. now enjoy swap :D



    well this is my first thread so hope it helps!!
    3
    Here you go.
    1
    Just tried it, works like a charm :)
    1
    I'm running CM9 Android 4.0.3
    http://mikegapinski.androidus.pl/android-4-0-ice-cream-sandwich-aosp/

    I've done everything like the tutorial says, but I had older clockwork recovery 2.5 I guess something like that, and I've done the same thing in recovery selected advance>partition sdcard> EXT3 and selected 2gb then selected 256MB Swap, but when I run the OS and enter free in terminal it says swap 0.

    What could have caused the problem?

    Thanks in advance!

    look in root explorer (or any root file manager), in folder etc/init.d

    if there isnt script called 07swapon, the swap wont active. and afaik, mike's ics doesnt have this script. u must add it manually.
    1
    Yes take 1 from any rom