Jump to content


Photo

Putting dalvik-cache on /cache

- - - - -

  • Please log in to reply
5 replies to this topic

#1
Master_T

Master_T

    Addict

  • Members
  • PipPipPipPipPip
  • 590 posts
Hi everyone

I'm running MIUI 2.3.16 on the A1, but I guess this applies to any GB rom, so I'm opening a new thread.

I've always been annoyed at how the free space on /data just seems to get filled up on it's own, even if I'm not installing new apps. So I decided to have a look around with root explorer, and what I found out is that the culprit is the dalvik-cache, that resides on /data/dalvik-cache. The annoying thing is that while /data gets filled up with apps and dalvik cache, the /cache partition is EMPTY. It has only 1.44 mb occupied out of 75mb!

So I tried to move the dalvik-cache to /cache, but I'm having trouble. I tried to use Darktremor's A2sdGUI that has a function to move dalvik-cache to /cache, but it doesn't work, after the phone restarts the dalvik-cache is still on /data.
So I then tried to just create a symlink manually: I deleted the /data/dalvik-cache folder, and replaced it with a symlink to /cache/dalvik-cache.
But this doesn't work either, because when you reboot the system resets these folders and links, by re-creating /data/dalvik-cache folder and creating a link from /cache/dalvik-cache to that folder (while what I would like to do is the opposite!).

Can anyone help me figure this out? (if it is even possible?)

  • 0

#2
thepasto

thepasto

    Diehard

  • Members
  • PipPipPipPip
  • 430 posts
  • Gender:Male
  • Devices:Acer Liquid E
  • Twitter:@thepasto
remove this line from your build.prop

dalvik.vm.dexopt-data-only=1

  • 1

Posted Image


Don't want to change phone yet? Support the devs!! :)


Posted Image


#3
Master_T

Master_T

    Addict

  • Members
  • PipPipPipPipPip
  • 590 posts

remove this line from your build.prop

dalvik.vm.dexopt-data-only=1


That line is not present :(
I tried adding it and setting it to "0", but to no avail, it still re-creates. the data/dalvik-cache and re-links /cache/dalvik-cache to it at reboot :(

  • 0

#4
thepasto

thepasto

    Diehard

  • Members
  • PipPipPipPip
  • 430 posts
  • Gender:Male
  • Devices:Acer Liquid E
  • Twitter:@thepasto

That line is not present data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAMAAAC6V+0/AAAABGdBTUEAANbY1E9YMgAAAiJQTFRFV0AI////V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szvKo/zAgnK+rTNWAkSWbFi6fTWgig3aaCgiG1t97zlK1YsW7Z0bmdVWqiZIFCQVy+jsWu6Ohg0ZEb66/CAHC9unVWt3jlxYkdLpXp0oKkYK8ibHMqOqflllZWleSnhgQ6K7LAAMQyOTUyIjQjxNYAFCCjoNM1dggKcTTTgQQcOZH4pNTUpfnggYwEA/sNn5TkB34oAAAAASUVORK5CYII=
I tried adding it and setting it to "0", but to no avail, it still re-creates. the data/dalvik-cache and re-links /cache/dalvik-cache to it at reboot data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAMAAAC6V+0/AAAABGdBTUEAANbY1E9YMgAAAiJQTFRFV0AI////V0AIV0AIV0AIV0AIV0AIV0AIV0AIV0AIV0AIV0AIV0AIV0AIV0AIV0AIV0AIV0AIV0AIV0AIV0AIV0AIV0AIV0AIV0AIV0AIV0AIV0AIV0AIV0AIV0AIW0IIV0AIW0IIW0QJW0IIV0AIV0AIV0AIQzQQa0oJbEwKbVELbk4Kb0wJb1QMcVILc1cNlF8Ll2oOmXERnn8Wo2gMpGgNpGoNpW8OpXEPp3YRq4MWrH0Sro0Zr4QVsI4ZsZAauXQOwIkUwI0WyIAQyocSyqcgy4QRzosU1Koe1rIi3ZMT3ZUV3a8e3o4S3rci4ZET5JUT5ZYU5ZgU5aIY55wV554W6Kkb6qQY6qUY6qYZ6qcZ66gZ7Lsi7a0a7a8b7bEd7rAb7rEb7rMd7rMe77Eb77Mc77Qc77cg77of8bke8boe8b4i8cUj8skl87we870f874g88Ii88kn89Iq9Mwo9cMg9cMh9cQh9cck9sUh9sYh9sci9sgj9skk9swm9swn98ki98ok988n99Mq+c0k+c8k+dMn+dYq+9Ml+9Mm+9Un+9Yo+9cp+9gp+9or+9os+9sr/NUl/Ncn/Ngo/Noq/Nsr/N0s/doo/d0p/d4r/eAs/eAt/eEt/tso/twp/t4p/uAr/uAt/uIu/uMt/uMu/94p/98p/98q/+Aq/+Ar/+Er/+Ir/+Is/+It/+Ms/+Mt/+Mu/+Qt/+Qu/+Qv/+Uu/+UvXMuEvgAAACd0Uk5TAAABCQoLHCYnMDY4OjuCg4WHiImKm56fx8jJys3P1Ofp6enq7/DyAdnyKAAAAU5JREFUGNNjYMQCGBgZgICZi09CRUWCj4sZxIMIsgnr2niWFHlYaQmzQQWZOOWMi/unTetrr48xkuNkAguyK7n2zVHfunnJLPWmbCd5dpAgq5j9hEXqW7ds2bJhoXpduqUoC1CQR795tvqWLZs2bdy4dqZ6YZg2N1BQyK5v8aZN6hvXr1+nvqCnIt5CACgo4zd1/cb16uvWrVmjvmpybbK7JFBQJXfK2nXr1NesWb1KfeWkmiRvBaCgak7vApDIqlUrVszvKo/zAgnK+rTNWAkSWbFi6fTWgig3aaCgiG1t97zlK1YsW7Z0bmdVWqiZIFCQVy+jsWu6Ohg0ZEb66/CAHC9unVWt3jlxYkdLpXp0oKkYK8ibHMqOqflllZWleSnhgQ6K7LAAMQyOTUyIjQjxNYAFCCjoNM1dggKcTTTgQQcOZH4pNTUpfnggYwEA/sNn5TkB34oAAAAASUVORK5CYII=


Ok a dirty fix :) Symlink /data/dalvik-cache to /cache/

  • 0

Posted Image


Don't want to change phone yet? Support the devs!! :)


Posted Image


#5
Master_T

Master_T

    Addict

  • Members
  • PipPipPipPipPip
  • 590 posts

Ok a dirty fix data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAMAAAC6V+0/AAAABGdBTUEAANbY1E9YMgAAAiJQTFRFV0AI////V0AIV0AIV0AIV0AIV0AIV0AIV0AIV0AIV0AIV0AIV0AIV0AIV0AIV0AIV0AIV0AIV0AIV0AIV0AIV0AIV0AIV0AIV0AIV0AIV0AIV0AIV0AIV0AIV0AIW0IIV0AIW0IIW0QJW0IIV0AIV0AIV0AIQzQQa0oJbEwJbVELbk4Kb0wJb1QMcVILc1cMlF8Ll2oNmXEQnn8Vo2gLpGgLpGoMpW8NpXEOp3YQq4MUrH0Rro0Xr4QUsI4XsZAYuXQNwIkSwI0VyIAOyocQyqcdy4QQzosS1Kod1rIf3ZMS3ZUT3a8c3o4Q3rcf4ZER5JUR5ZYS5ZgS5aIW55wT554U6KkZ6qQV6qUW6qYW6qcX66gW7Lsf7a0X7a0Y7a8Z7bEb7rAY7rEY7rMa7rMb77EY77Ma77QZ77cd77oc8bgb8bkb8bob8b4f8cUh8skh87wb870c88If88kk89Im9Mwl9cMd9cch9sUe9scf9sgg9skh9swi9swk98og988k99Mm+c8h+dMk+dYm+9Mh+9Mi+9Uj+9Yk+9cl+9gl+9kn+9on+9oo+9op+9so/Ncl/Ngl/Non/Nso/N0o/N0p/dkk/dok/d4o/eAp/eEp/tsk/twk/t0k/t4l/uAn/uAp/uIq/uMp/uMq/uQq/94l/94m/98l/98m/+Am/+An/+En/+Eo/+Io/+Ip/+Mo/+Mp/+Mq/+Qp/+Qq/+Qr/+Uq/+UrX/9jcQAAACd0Uk5TAAABCQoLHCYnMDY4OjuCg4WHiImKm56fx8jJys3P1Ofp6enq7/DyAdnyKAAAAUZJREFUGNNt0b9Kw1AYhvH3OzlJ2qRpiiVCIxUUdXIRdFd0cfQOvA4HF3UWr0Fw83J0VEQpaLX/myY5Od/n0FGfS/g9RPibhgBwfB00MMuqwgIgDQBelMbRLj9NRp/TEgCRKD9Jjjq+FIvy9fm7XzA5BC/dPuu00tjx0EhsubCk4Mbd03Z6DVq5TcJ4J21qaPido6BNsACaeR50J1mm4cVhXQTCAPmeG0QuFIKWH4sFiwVHNa3jOjRqG2KV3FjgikVEtA8FkvzCMphZeLZ4rARQyF8KWGZhFlsYmMpAYTEuzi8ti3A1Hz4cmlEGh5x64u3fHSjJsp/7k1H+NTBEemVrL6o9AACOx9nH27Aiktra+nboKnA5n5TDt15BGih7ZrQZaqlMVbwP+gYgEsCLVptRk6fjWX9aAkS0RHbDBmZzs0Sm/3b8Apz1nhT0ICJTAAAAAElFTkSuQmCC Symlink /data/dalvik-cache to /cache/


Tried it. SOME of the dalvic-cache files started being put in /cache but then, some time during boot, some script or application removes the link and re-creates the /data/dalvik-cache folder... any idea what could it be?

  • 0

#6
Master_T

Master_T

    Addict

  • Members
  • PipPipPipPipPip
  • 590 posts
Well, I've written this script:

rm -f -r /cache/dalvik
mkdir /cache/dalvik
cp /data/dalvik-cache/* /cache/dalvik
rm -f -r /data/dalvik-cache
rm -f -r /cache/dalvik-cache
cd /data
ln -s /cache/dalvik dalvik-cache

I use SManager set to run the script at startup with root access. Probably very "primitive", but I'm a linux noob, so I'm not so used to bash scripts. But it seems to work, tho it would be better to find out why it gets reset at each boot.
Still, I now have 40 extra mbytes on /data, so I'm happy.

Edited by Master_T, 29 September 2012 - 09:35 PM.

  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users