1. 2015 is going to be a great year for Android! Why wait??
    Samsung Galaxy Note 5 | Samsung Galaxy S6 | HTC One M9
  2. New Forum Created: Samsung Gear VR!

link2sd not re-linking dalvik-cache at boot


  1. divinebovine

    divinebovine Well-Known Member Contributor

    My Venture, with its puny /data internal storage, benefits greatly from using link2sd. However, when I reboot, the dalvik cache is full of real files, not symlinks, and link2sd doesn't automatically re-link the files. I'm not sure if it's wiping and re-creating the dalvik cache or just doing something with those files. It takes a long time to boot and I can repeatedly use df in an ADB shell and watch as /data fills up.

    Once booted, I have to open link2sd, go to its menu, and choose "Link dalvik-cache files".

    Not only does this mean that my /data is full after rebooting, but it also means that if I have too many apps to fit in /data then some will end up broken (presumably the ones it attempts to cache after /data is already full).

    So, my questions are...

    1. Is it normal behavior for the system to un-link dalvik cache on boot (either the individual files, or wiping/re-creating the whole thing)? Could this be happening because of some setting I dumbly changed/utility app I monkeyed with?

    2. Is it reasonable to expect link2sd to automatically re-link dalvik-cache files on boot? I do have "Relink dex files at boot" enabled.

    I'm thinking I could chmod the symlinks in /data/dalvik-cache so they're not writable and that might prevent those from being wiped and re-created or whatever, but I don't know if that would break anything (other than having to fix file permissions before uninstalling apps). I guess it couldn't hurt to try on some non-essential apps...could it?

    Advertisement
    :
  2. Andima

    Andima Well-Known Member

    I use Link2SD, but i never face this type of issue. But after i clean dalvik-cache using recovery, all the dalvik cache symbolic links lost. So that i have to re-link them. But if i clear dalvik cache using Link2SD, there's no issue.
  3. holocoz

    holocoz Member

    If you can read my previous posts here, you'd find that I too experience the same with my Link2SD, but it's the lib file that keeps on unlinking each time I reboot. In the end, I have to get used to manually relinking the lib files while dodging app crashes at the same time.

    As for the dalvik, you can try getting Titanium Backup Pro so you can integrate dalvik files into your ROM, which might greatly reduce space. Someone correct me if I'm wrong, though.
  4. divinebovine

    divinebovine Well-Known Member Contributor

    I just checked your thread...it does sound very similar, just as you describe.

    If I end up trying different permissions on the dalvik symlinks and that helps, I'll help you try it on your libs. Should be as simple as chmod 0555 filename I think.
  5. holocoz

    holocoz Member

    Sure, thanks.
  6. divinebovine

    divinebovine Well-Known Member Contributor

    Negatory. In all my years as a part-time linux administrator I don't think I've ever had reason to chmod a symlink, so that'd be why I didn't realize that chmod doesn't work on symlinks.

    Is there a way to prevent a symlink from being deleted/overwritten? It appears that the answer is a qualified no:
    Can you make a symbolic link read only?
    One can prevent symlinks being deleted/overwritten by changing permissions on the directory, but that would have serious consequences in this case...you probably wouldn't be able to install or uninstall ANY software.

    However, maybe there's hope...
    The ex-sysadmin: Performing a chmod on a symbolic link
    If you delete the symlink, change your umask, then create the symlink, you may get the results you desire. {a few minutes pass} Nope...tried it, symlink still has lrwxrwxrwx.

    Drat.

    Cliff's notes: Anybody have any idea how we can prevent symlinks from being removed/overwritten without changing permissions for the directory?
  7. KurianOfBorg

    KurianOfBorg Member

    I started having this problem from yesterday's CM10.1 nightly on my SGS2.
  8. divinebovine

    divinebovine Well-Known Member Contributor

Loading...

Share This Page