Need to move dalvik-cache folder to SD


  1. fightingirish

    fightingirish Well-Known Member

    Been having some issues with the dreaded Market "invalid file" error. First, I moved the 01mdalvik file to the sd-ext folder. It cleared up my market issues, but now I have two huge dalvik-cache folders hogging up my internal memory. I can't move these.

    Is there a way to move these without reformatting and partitioning my SD card (currently there are no additional partitions)? I am running the latest CM7 build.

    Advertisement
    :
  2. AndyOpie150

    AndyOpie150 <strong> <a href="http://androidforums.com/optimus Contributor

    Try downloading a fresh BACKside ROM and Gapps and then go to the market and download and install Link2SD. Go to the Guide in the All Things Root Guide sticky," Link2SD a tutorial"
    I drug my feet for months. Why! I don't know. After installing it and partitioning the SD card I now have 151 downloaded apps and a little app cache built up. I still have 122.94MB left out of the 178.87MB of internal memory I started with. I still have 241MB of RAM.
    Since doing the Link2SD, I have no longer had any problem with downloading from the market. Downloaded and linked to the SD card an app that was over 22MB with no problem.
    I am now wondering what took me so long? Duh!
  3. fightingirish

    fightingirish Well-Known Member

    The only thing is I've got a 16GB SD card to back up. Lots of pics and music files (which I converted to lower bitrate ogg to put on the phone). Well, I'm gearing up for it. After my dalvik tinkering, I went from 93MB internal to 22MB. Not sure why the dalvik-cache folders were moved to user internal memory. It appears partitioning the SD is my best bet.

    Sent from my LG-VM670 using Tapatalk
  4. AndyOpie150

    AndyOpie150 <strong> <a href="http://androidforums.com/optimus Contributor

    Your starting to sound like I did. I could always come up with a reason why I couldn't do it right then.
    Jump in there and Get-r-done. You will then be like I am right now. Scratching my head wondering what took me so long.
  5. fightingirish

    fightingirish Well-Known Member

    Installed Link2SD, partitioned SD card (FAT32 and ext2). Booted phone. Got L2SD going. Moved many of my non-system apps to the ext2 partition. Then, I decided to wipe the dalvik cache with another app. Rebooted, and now neither the phone or L2SD recognize the ext partition. And it's as if all the apps that I moved there don't even exist. Running the latest BACKside CM7 ROM.

    EDIT: Went into recovery, wiped dalvik one more time, rebooted. Now it seems as if everything's working. And I think I lost some more of my hair.
  6. AndyOpie150

    AndyOpie150 <strong> <a href="http://androidforums.com/optimus Contributor

    Most apps that allow you to wipe the cache partition and the dalvik cache do more harm then good.
    When I first installed Link2SD it was on a clean ROM install. I made sure I rebooted the ROM twice and made sure everything was functioning properly before downloading and installing Link2SD. I downloaded all the apps from the Google play store/my apps section, so I would get fresh apk's.
    I'm not sure why you felt the need to wipe the cache and dalvik. Unless you couldn't get into the google play store, it's not necessary. If you feel the need to do it it should have been done so before installing Link2SD and linking all your apps.
    With the BACKside ROM I deleted the browser, launcher, tips, Gallery (sometimes it will make things worse, but not this time), live wallpaper and picker, and a couple of other things just to make room for a few apps a wanted to move to the system. This is just what I like to do, you don't have to, but it will keep the internal memory space up in the 100MB range,
  7. fightingirish

    fightingirish Well-Known Member

    Not sure what possessed me to wipe the dalvik one last time. Habit I guess. I have since uninstalled cache fixer and droid tweaker. Don't need them anymore.

    After moving most of my apps (save for a few vital ones I left internal just in case) I have about 130MB available internal, and have a 1GB ext2 partition on my 16GB card. Now comes the long task of returning 10GB of music back to the SD card!
  8. AndyOpie150

    AndyOpie150 <strong> <a href="http://androidforums.com/optimus Contributor

    Ext. 2, 3, and 4 will not work with all ROM's, FAT32 will. If you don't plan on ever using a Froyo ROM then you should be OK with the cm-7 ROM's. I don't know what is needed with the cm-9. Also: Most CWMod recovery's format to ext. 3, so if you ever accidentally erase/format your SD card (happened to me) then you can still partition the SD card with the recovery if you can't get to a PC.
  9. tvall

    tvall Active Member

    What are you talking about? The first partition of the sdcard has to be fat for android to recognize it (any version of android, even cm) the second partition needs to be a Linux fs (variations of the ext fs are most common, but i ran with reiser4 once just for fun) for the apps or dalvik or whatever moving. If its fat, it won't work for anything (besides being a useless second partition with no meaning to its life). And no rom recognizes this space or uses it for anything unless it has built-in app, data, or dalvik moving.
  10. Michael323

    Michael323 Well-Known Member


    I use a Harmonia ROM and the 2nd SD card partition is FAT32. Apps are linked to there and work fine.
  11. AndyOpie150

    AndyOpie150 <strong> <a href="http://androidforums.com/optimus Contributor

    Sorry, I have to disagree with you on several points. I know that you have started developing apps and tweaking kernels (I'm currently using your tweaked BobZohme kernel), put on this subject I have personal experience.
    I have formatted my Primary and Secondary partitions both to FAT32 and link 2SD works just fine (151 apps that are linked and running fine). The older amend scripting ROM's can be a major problem as can the rest of the Froyo ROM's. The first time I tried to use Link2SD I had the secondary partition formatted to ext.3 and it didn't work on the BACKside build I was/am running. Reformatted it to FAT32 and everything was just peachy. It might have worked with a different ext. but did not have the time to play around, so I went with the FAT32.
    Maybe you can let use know what ext work on the ROM's you have tried? We could work up a thread with the info. I could put out the info on the Froyo ROM's and you could do the CM-7 and CM-9 ROM's. This would sure help clear up all the confusion and become a source for other members to turn to.
  12. fightingirish

    fightingirish Well-Known Member

    Alright guys, enough with the 'slap it on the table and see who's bigger' nonsense. What the L2SD people and users are vague about is what format the second partition should be. The main one should be FAT32, we all know that. But I've read so many different things about whether to use FAT32, ext2, ext3 or ext4 for the second app storage partition. I went with a 1GB ext2 partition on my 16GB card, and after a few screwups on my part (as documented earlier), got it to work perfectly. I'm currently running the latest BACKside ROM. So far, I've freed up a ton of space, moved most of my apps there from internal and SD (though I kept the system apps and a few 'vital' ones in internal) and have noticed much faster performance and no memory issues. And I have no problem installing bigger apps (like Angry Birds Space and Instagram) that I couldn't do before.
  13. AndyOpie150

    AndyOpie150 <strong> <a href="http://androidforums.com/optimus Contributor

    This discussion is about presenting the facts, that tvall was unaware of. Nothing more.
    Fat32 for the 2nd partition is a good overall partition as it will allow you to use Link2SD with any ROM no matter if it's Froyo (amend scripting or edify scripting), CM-7, or CM-9. As previously stated, ext.3 didn't work for me on the BACKside Build that I am using. It would appear that ext.2 does work though, thanks for the info.
    Maybe we could get more info on what partition format works on which ROMS. This would allow a member to chose the proper partition format for the ROM they chose.

    So with all the info submitted I hope that the members will be able to determine some truths and also submit what partition format their using and with what ROM so we all can make an informed choice based on just the facts.
  14. tvall

    tvall Active Member

    So.. I am almost entirely certain apps, dalvik, and pretty much everything else android has to be on a Unix fs. (Even Google's built in app moving puts apps in a loop device I think)

    How are you guys formatting the second partition?

    (Also, I've been working with android since the g1 days)
  15. tvall

    tvall Active Member

    Hmm... just read the description of link2sd. It works with fat somehow... now I have the urge to do all kinds of crazy tests to see how it works, but I don't want to mess up my ext partition (the two roms I switch between use it, my iho rom has apps2ext built in)
  16. AndyOpie150

    AndyOpie150 <strong> <a href="http://androidforums.com/optimus Contributor

    You can use "Mini Tool Partitioning Wizard". I actually tried using the recovery, which worked. It gave me the 2GB partition I wanted, but it formatted it to ext.3 which was giving me fits with the BACKside build I was on. So, I wound up installing the utility mentioned above to reformat the 2GB partition to something I knew would work, FAT32. I could have tried something other than ext.3, just didn't have the time to allow my phone to be down to long.

    EDIT:I will be trying out different partition formats as the FAT32 will not let me see the contents of the partition (unless I missed something in the details). I will also be experimenting with different methods to get an update of a ROM and still have Links2SD working flawlessly on reboot.

    Your ROM has some real merit, and has been looked at by quit a few other Devs thinking of integrating the linking of apps on the SD card to the system, and still have it working flawlessly after updating the ROM.
  17. MacFett

    MacFett Well-Known Member

    Froyo ROMs use only FAT32 for the 2nd partition. GB+ ROMs can use FAT32 as well as Ext# partitions. I was running BACKside with a FAT32 partition no problem. It wasn't until I did some experimenting with ROM Tools (or ROM manager) for AndyOpie that I started using Ext2 I think it was.
    AndyOpie150 likes this.
  18. AndyOpie150

    AndyOpie150 <strong> <a href="http://androidforums.com/optimus Contributor

    Hey MacFett. Does ext.2 allow you to see the contents of the partition in a file manager.
    Is there something else I'm missing?
  19. tvall

    tvall Active Member

    It shouldn't.. android uses the first partition for data. If you have a root file manager and know where the second partition is mounted (/sd-ext in most cases I've seen, on roms that mount it automatically) then you could see it
    AndyOpie150 likes this.
  20. tvall

    tvall Active Member

    If I could add in magpie, any other experienced dev could probably get it done in minutes. (Took me 30. Not including build time and figuring out an issue with the 10mountsd script in iho)

    In the G1 dev scene there are several people who criticize any method of apps2ext besides magpie due to lack of compatibility or integration with roms and for the messiness of most of the scripts.
  21. MacFett

    MacFett Well-Known Member

    I don't currently have an SD card with an ext partition (or any partition other than the main). I'll see if I can dig up one of my old 2gb cards and test it out for you. I know I've seen sd-ext in explorers, but I never explored them. I had a pretty shaky hand with Android stuff when I was using Link2SD. Now I've seen how resilient the Optimus is and mess with stuff a lot more than I used to do.
    AndyOpie150 likes this.
  22. nijel

    nijel Well-Known Member

    Link2SD sd-ext is mounted to /data/sdext2/
    AndyOpie150 likes this.
Loading...

Share This Page