hpsaturn

Auto Mount Swap Partition in Android

May 24th, 2011
1,463
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.35 KB | None | 0 0
  1. #!/system/bin/sh
  2. # put in /etc/init.d/
  3. # chmod settings: -rwxr-x--- rootshell  21swapon
  4.  
  5. partition=3 #partition number of swap partition. Change if swap is not partition 3.
  6. swappy=30 #swappiness. larger number = more likely to swap, smaller number = less likely to swap
  7.  
  8. swapon /dev/block/mmcblk0p$partition;
  9. sysctl -w vm.swappiness=$swappy;
  10.  
  11. exit 0;
Advertisement
Add Comment
Please, Sign In to add comment