1. Check out our app, Forums for Android! Download and leave feedback here!

Root Dalvik Cache question

Discussion in 'Android Devices' started by prj, Sep 26, 2010.

  1. prj

    prj Well-Known Member
    Thread Starter
    43

    May 26, 2010
    267
    42
    43
    Why are there two of them on the phone?

    In the root I have...

    /cache/dalvik-cache/

    and

    /data/dalvik-cache/

    Which one gets wiped when you do a wipe in Amon's?
     

    Advertisement

  2. kobel1up

    kobel1up Well-Known Member
    38

    Jan 18, 2010
    310
    16
    38
    student
    Miamisburg, ohio
    I was looking for the last post that I saw on what and why you wipe. I will tell you that if you are changing roms you should wipe both, and you can wipe battery stats as well. The batter stats will reset your battery so that it is calibrated, just have your phone fully charged when you flash a new rom and doing all the wipes. When I flash a new rom I will wipe cache and data and the battery, then flash the rom. Wiping will keep things like your log in info from interfering with the fresh flash. If you are flashing an update of the rom you are running then they will tell you to wipe or not. When they say to wipe they always mean data and the cache. Hope this kinda answers your question if not scary alien will be by to help.
     
  3. prj

    prj Well-Known Member
    Thread Starter
    43

    May 26, 2010
    267
    42
    43
    Does Amons recovery wipe both locations or do you have to do it manually?
     
  4. kobel1up

    kobel1up Well-Known Member
    38

    Jan 18, 2010
    310
    16
    38
    student
    Miamisburg, ohio
    You need to do it manually in amons recovery.
     
  5. scary alien

    scary alien not really so scary
    Moderator
    2,138

    Mar 5, 2010
    22,050
    22,995
    2,138
    Male
    space alien ;)
    Indy
    prj,

    The "normal" dalvik-cache is located in /data/dalvik-cache. I'm pretty sure that the presence of a dalvik-cache directory under the /cache directory is a result of flashing a ROM (like xtrSense) that has moved dalvik-cache from /data to /cache (giving you more room for apps by freeing-up /data).

    I believe that a "Wipe Dalvik-cache" in Amon_RA's custom recovery will only wipe the /data/dalvik-cache and would suspect that the ROMs that have supported moving dalvik-cache from /data to /cache would have to have a process for managing this.
     
  6. erisuser1

    erisuser1 Well-Known Member
    223

    Nov 11, 2009
    1,644
    759
    223
    The Tazz (2.0) ROM that I have been using lately has a "split personality" - BOTH caches are used by the ROM:

    /data/dalvik-cache <== Used by market apps (stored in /data/app)
    /cache/dalvik-cache <== Used by pre-installed System apps (stored in /system/app)

    I don't know if that is something which is specific to Tazz or is in every CyanogenMod 6 ROM, but the point is that it appears that both of them are in use for that ROM.

    As far as I know, the "Wipe dalvik-cache" menu entry in Amon_RA ONLY wipes /data/dalvik-cache.

    OTOH, the "Wipe data/factory reset" menu entry in Amon_RA appears to wipe BOTH the /data and /cache partitions. (It sure says that it is doing just that). Note that this also means that nonsense such as "double wiping" or performing "both a data/factory reset wipe and a Dalvik cache wipe" are merely vodoo operations.

    I interpret those facts to mean that it is always better to simply use the "Wipe data/factory reset" when installing a new ROM - and completely ignore the "Wipe dalvik cache" menu entry, unless you are sure of the specifics of the ROMs you are dealing with.

    eu1
     
    scary alien likes this.
  7. doogald

    doogald Well-Known Member
    443

    Jan 7, 2010
    6,666
    1,910
    443
    I just looked, and Nonsensikal 7.0 also has both data/dalvik-cache and /cache/dalvik-cache, and I know that Kaos had it as well when I was running that.
     
  8. zach.xtr

    zach.xtr Member
    6

    Jun 16, 2010
    6
    2
    6
    Happen to see this post and all CyanogenMod based ROMs (i.e. all 2.2 Eris ROMs) and the ROMs I have worked on (xtrROM, xtrSENSE, Vanilla2.0) have split dalvik-cache in both the /data/ folder and the /cache/ folder.

    My understanding is that amons recovery wipes both...

    Also both above post are correct:

    My ROMs move dalvik-cache from /data to /cache (giving you more room for apps by freeing-up /data). Both folder exist but the /data/dalvik-cache is a symlink to the actuall physical location on /cache/dalvik-cache.

    All CyanogenMod ROMs use BOTH
    /data/dalvik-cache <== Used by market apps (stored in /data/app)
    /cache/dalvik-cache <== Used by pre-installed System apps (stored in /system/app).

    Hope this helps!
     
  9. erisuser1

    erisuser1 Well-Known Member
    223

    Nov 11, 2009
    1,644
    759
    223
    Hi zach.xtr!

    Thanks for chiming in and even more so - thank you for setting the bar in the 2.1 dev ROM space. I hope you are going to be around for a while doing dev work on the Eris (is the screen on your old Eris still functional after the mishap?).

    Just now I was running some other experiments so I tried the "Wipe Dalvik-cache" menu item in Amon_RA. It only cleared /data/dalvik-cache, but not /cache/dalvik-cache. Makes you wonder about some of those bug reports on CM6 ROMs where the folks reporting did an overlay install, eh?

    I guess Android has some sort of detection method for rebuilding cache entries from the .apk on each boot that is supposed to prevent version mis-match between the .apk and the .dex files in the cache, but I'm not exactly sure what that check is. The package file /data/system/packages.xml seems to store a "key" value as an attribute of < cert > tag within a < package > tag:

    Code (Text):
    1.  
    2. <package name="com.android.voicedialer" codePath="/system/app/VoiceDialer.apk" f
    3. lags="1" ts="1217592000000" version="8" userId="10042">
    4. <sigs count="1">
    5. <cert index="1" [B]key=[/B]"308204a830820390a003020102020900936eacbe07f201df300d06092a8
    6. 64886f70d0101050500308194310b3009060355040613025553311330110603550408130a43616c6
    7. ...
    ... so maybe it is impossible for mismatch to occur even if it doesn't get wiped???

    Well, in any event, doing a "Wipe data/factory reset" in Amon_RA v1.6.2 (Eris) wipes everything in both /data and /cache - including any dalvik-cache directories.

    eu1
     

Share This Page

Loading...