Jump to content


Photo

[ROMs with init.d support] Using swap in the /cache partition (modified version of kedazo's topic)

- - - - -

  • Please log in to reply
No replies to this topic

#1
shadowprince94

shadowprince94

    Newbie

  • Members
  • Pip
  • 7 posts
  • Gender:Male
  • Location:Budapest
  • Devices:ZTE Blade III

So, kedazo put the swapfile in /data, but I read other topics and forums, and decided to put swap into /cache, because it's unused. Here's the way:

 

Connect your phone to PC (debug on), open a cmd window and navigate to the folder, where the adb.exe file is. Then type:

 

adb shell [enter]

su [enter]

 

You have to see a '#', type:

 

# dd if=/dev/zero of=/cache/swapfile bs=1048576 count=200 [enter] (I use 200 mb of swap, it can be modified)

# mkswap /cache/swapfile [enter]

 

Then you have to extract and push the script I attached to /system/etc/init.d with adb push.

Finally, you have to set permissions and start the script. It can be done manually with a root explorer eg. ES File Manager, or from adb shell typing this:

 

adb shell [enter]

 

su [enter]

# chmod 0777 /system/etc/init.d/userinit.sh [enter]

# /system/etc/init.d/userinit.sh [enter]

 

And then you can check what you did:

 

adb shell [enter]

su [enter]

#free [enter]

 

In swap, you have to see the size of swap you created. It has to work on every rom supporting init.d

Attached Files


Edited by shadowprince94, 03 November 2013 - 10:46 AM.

  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users