• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Root How to reset swap partition under JB

RBEmerson

Android Enthusiast
Jun 12, 2011
546
29
SE PA
Sigh... I know there's a "magic spell" to reset the swap partition (effectively do an epic garbage collection). I can get into Recovery but it's the button pushes after that which escape me. I've done the job a couple of times but I've forgotten the trick to get past recovery mode.

I found one description of how to do the job: push up, down, and power to get to the boot menu, use down to get to Recovery, push up to go there, and see the Droid on its back, door open, and a triangle ! sign in the door. Pushing up and down at the same time does not get me to the menu to do the swap repair. The how-to specifically says "Does not work with Jelly Bean". Which, of course, is what I have in this phone. And, surprise, surprise, doing the up and down push doesn't do anything useful.

Googling the topic produces any number of "why the swap partition is evil" and "move the swap partition to your SD" threads but no how-to on rebuilding the swap partition.

- - - -

Uh, from what little I know about Linux and other OS', it seems to me that life with the swap partition, unless the machine in question has tons of RAM, is ...ah... difficult at best. And given the MAXX's miserable door which won't stay closed after a few open/close cycles, if the SD (and SIM) slides out of place (bye, bye swap partition - hello brick), moving to the SD doesn't strike me as a winner, either. Or...?
 
I'm not rooted, but I found this at XDA, good luck.

hunff said:
You dont need to use an app to get swap. I prefer three lines of code in /system/etc/hw_config.sh

mkswap /dev/block/mmcblk0p2
echo 30 > /proc/sys/vm/swappiness
swapon /dev/block/mmcblk0p2

Try this to see if works
biggrin.gif
but if rom/kernel doesn't support then gonna use swapper2 from the market.

or else follow hunff instruction and open terminal emulator
-type free
-swap 0 0 0 = not active use swapper2
tongue.gif

-swap any value other than 0 = active
biggrin.gif
 
  • Like
Reactions: RBEmerson
Upvote 0
Thanks - I recognize the steps from Linux-land. Unfortunately, it's not what I'm looking for. There are a set of button pushes that lead to completely wiping and rebuilding the swap partition. I can get as far recovery mode (android on its back with a door open) but can't get past that to the menu that includes rebuilding the swap partition.

Step one is to power the phone off and, when it's off, push the down, up, and enter buttons at the same time. Step two, use the down button to get to the recovery menu entry and press the up button to accept the choice. Prior to Jelly Bean, there's one set of steps but the rules changed with Jelley Bean, and that's where I'm stuck. I've trying to get Google to turn up the how-to posts I've seen before, but instead I get "why swap is evil" posts. [/head shake]
 
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones