[Q] Question about Dalvik Cache - General Questions and Answers

I posted this on rootzwiki a couple of days ago and have had absolutely no takers, so I'm posting it here (not sure who has a bigger active community).
Hi all, I have a question about the Dalvik cache:
I found this definition of what the Dalvik cache is:
http://www.shahz.net...lvik-cache.html
But...
I see this as an answer very often on all forums for all ROMs: wipe the dalvik cache, fixes everything. But why should we have to do this? Is android so broken as an OS that it can't manage its own cache properly? If I understand correctly, the dalvik cache is not something that is unique to custom ROMs, it's something that Google developed as part of the native android OS. Why would they develop something that needs to be micromanaged like this into an OS that is used by techies and non-techies alike across the world? If I understand correctly also, you can't even wipe the dalvik cache if you're not rooted. The majority of android devices running in the wild are NOT rooted, and I don't think Google intended android to be run rooted. So I can't imagine they'd ever intend anyone to have to wipe the dalvik cache in the first place.
That being said, it appears that wiping the dalvik cache does fix some issues for some people. maybe not the root cause of the issue, but at least the symptoms. so, is there an app that will automatically wipe the dalvik cache in the background at regular intervals so that you never have to do it yourself?
Thanks!

the wipe-dalvik-cache things is a long and old story that not true anymore. as some CM dev said, the cache got invalid after you flash a new ROM and the OS will recreate automatically.
Even if you have to wipe, it's not Android fault, why are you flash ROM from the start? My friend have a LG P500, she never root it, never know what recovery or flash is, the OS is not broken, it's your fault to hack it, and if you love to hack, learn to live with it.

Please understand, I'm not bashing android (trust me, I'm an avid android fan), I just want to understand why this is the first answer people give when others are having issues.
What I don't understand or agree with is the fact that people seem to indiscriminately resort to wiping the dalvik cache as a FIRST resort. It's like telling someone to reinstall their OS everytime they have an issue (yeah I know, it's not as much work, but you get my meaning). Well, no **** a total reinstall will probably fix it, but I'd rather not have to do it. I want to know what the root cause is and try to prevent it in the future.
So is wiping the dalvik cache something that people do on a regular basis? Or is it usually just a one-time fix for certain issues? Or something you do only once when flashing a new ROM? Or like you say, is it not even a valid fix anymore?
Funnnny said:
it's your fault to hack it, and if you love to hack, learn to live with it.
Click to expand...
Click to collapse
So are you implying that the "need" to wipe the dalvik cache is directly related to "hacking" (i assume you mean rooting/flashing) your device?
My wife and I both have the same phone, Droid X. She is running stock unrooted ROM, and I am the "tinkerer" who likes to try different ROMs. I've only tried 2 ROMs so far and I don't plan to flash anymore (currently using Vortex 2.9, which is not too far from stock). I notice that both of our phones have issues with random reboots, among other things, so I don't think the issues I'm having are directly related to my phone being flashed and rooted, since hers is not and she's having the same issues. I'm thinking this is something with android itself, or with certain apps. Should I root her phone too and try wiping the dalvik cache? Does the dalvik cache get rebuilt everytime you reboot your phone? I just want to understand.
And it would be nice to hear from someone who is an actual developer who understands the inner workings of android, rather than a "hacker" like me who only has anecdotal evidence to share.
Thanks!

Very good, logical nad brief answer found here:
http://www.shahz.net/android/what-is-dalvik-cache.html
According to the article, it should be safe to delete. Has anysone tried it?
It makes sense that it sould be wiped if you install/uninstall a lot of apps, since their classes.dex will be in cache and probably remain there.
Can anyone shed a light?

The Dalvik Cache is completely safe to wipe. You will only find this as an available option if you have installed CWM on your Android Device.
Think of it sort of as you would think of the Windows Temp Folder in Windows. It is completely fine to Wipe the Windows Temp folder, and in some cases, completely necessary to resolve an issue.
The same is true with the Dalvik Cache. When an APK is launched, it is extracted to the Dalvik Cache and run from there. It is a temporary file location.
The reason for clearing the Dalvik Cache after flashing a new ROM, is to clean up the Cache so that no temp files from the previous ROM Build are in there as clutter. There are some instances in which an App might not function or authenticate properly after flashng to a new ROM because some of the temp files in the Dalvik Cache are used, rather than a fresh copy that was extracted after the new build was installed on the device.
There is much more to the Dalvik Cache than I have described in this post, but what I have mentioned is a basic overview of the major functionality of the Dalvik Cache.
Cheers!

Great, so who knows where to find an app that auto deletes that meddling troublesome dalvik folder? I believe it is the culprit responsible for not allowing the phone at reboot to find a signal

You can only wipe the dalvik cache from recovery. For an apk to work it first has to be pushed onto the cache, so it can't delete the folder the apk itself is using.

syung said:
You can only wipe the dalvik cache from recovery. For an apk to work it first has to be pushed onto the cache, so it can't delete the folder the apk itself is using.
Click to expand...
Click to collapse
Not true. Titanium backup can delete the dalvik cache. You can also delete dalvik cache folder manually using a root file explorer.
However when you delete the dalvik cache it will rebuild itself upon the next boot.

Dalvik who?
So, can anyone really explain to me what the dalvik cache does, exactly?

It takes about 2.8 GB of my internal memory and i'm about to run out of free space. Is there a limit of dalvik-cache or will it grow bigger till forever?

Now I have Dalvik Cache folder with 3.13 GB in my Galaxy S4. Is its size unlimited and constantly growing?
Can I safely wipe it using TWRP?

clearing dalvik cache without root
pchoi94 said:
If I understand correctly also, you can't even wipe the dalvik cache if you're not rooted. The majority of android devices running in the wild are NOT rooted, and I don't think Google intended android to be run rooted. So I can't imagine they'd ever intend anyone to have to wipe the dalvik cache in the first place.
Thanks!
Click to expand...
Click to collapse
You can clear dalvik cache with stock recovery, just boot into recovery (the sequence varies for different phones), then choose the option that says "wipe dalvik cache" or "clear dalvik cache" or something like that. I don't remember how it's worded, but the option is there. On my phone it's the second option right below factory reset. I am curious whether it's safe to clear without root & with the factory ROM. I'm running low on storage, & thought of that as a way to recover some space. Is that safe & will it benefit me any?

Related

when to wipe data and cache?

Hey guys,
Question from a noob here. When exactly should you wipe data and cache?
I noticed that when I recently installed the gala x theme from rom manager before the install I was given 2 options. Make a back up and wipe data and cache. I went ahead and of course made a back up but chose not to wipe data and cache.
What is the right thing to do?
Thanks in advance
no one???? Some one must know.
If you are on a clean rom with no themes and your installing a new theme then no. The only time you need to wipe date and cache is if you are going from one rom to another. The reason for that is because of conflicting info.
So yes you are good if just adding a new theme
Sent from my DROIDX using XDA App
Thank you good sir. that makes sense and is what i thought/hoped.
No prob. Any other questions just email me. I don't get to the post to often. [email protected] gmail.com
Sent from my DROIDX using XDA App
Just a side note here; I wipe my cache weekly. I noticed my phone getting slow after the 2.2 OTA. Also, I got all kinds of FC's and other problems. I wiped my cache ONLY and it fixed all of my problems. Your system will rebuild the cache again as needed, so the first load may take a little longer, but there is less junk to sort through, so it's quicker to load on the next request. Oh, and as long as you do NOT wipe the data you won't lose anything.
Would it be advisable to wipe data and cache before restoring a back up?
What kind data is deleted with "Wipe data" ?
I come from fixed sbf, because of black screen and white led.
After that I had internal memory 128mb.
Tried Factory reset and Wipe data, nothing.
I tried to do according to the Beginners guide.
But after installing CM7, and kernel Froyo and Gapps, there is not said, that wipe data is needed (in cm7 instructions).
So I got stuck on the Google logo screen.
Once again, from the beginning with fixed sbf.
Does it make difference, because I have 128mb internal memory or is Cache somewhere else? In ram ?

Some questions from a root beginner

Hey guys,
Yesterday i rooted my TF101 for the first time, because i wanted to test some 4.2. Roms on the Transformer. No i have some questions:
1.) How can i do a full wipe in TWRP before i flash a new Custom Rom ?? I cant find it there. So i had done a factory reset, wipe system, Format internal storage. Is this OK or should i do it in a different way?
2.) Can i change the "inverted scrolling" when i'm using the Dock? I like the normal scrolling much more. I'm using the EOS4 Rom with the KAT kernel.
I hope you can help me...
Sry guys for some mistakes. My english is not the best
Felix
To do a full wipe. Wipe the System, then do a factory reset (wipes cache, Davlik cache and /data/ excluding /data/media/). The only unwiped part is the data/media (internal /sdcard/)
If you want to wipe that, there is an internal storage wipe option.
For the touchpad, open the EOS Settings. Top right change from Interface to System
Device Settings
Touchpad Mode
Trackpad
AW: Some questions from a root beginner
Okay thank you. So when i flash a rom its better to wipe the internal storage?
Overclocked my tab to 1,4 Ghz and its pretty fast now.
But why is my score for the 3d graphics so low ?
Wiping the entire internal is not always necessary, but you definitely want to do a factory reset (uninstall all the apps) when flashing different ROMs. If not, remannts of one ROM can lead over into another and cause app crashes and force closes that are annoying.
When upgrading to a newer version of the same ROM it is not necessary, you can just wipe the caches and install the ROM.
I personally do not worry about benchmarks. Does it feel fast to you? If so, then it is all good.
frederuco said:
Wiping the entire internal is not always necessary, but you definitely want to do a factory reset (uninstall all the apps) when flashing different ROMs. If not, remannts of one ROM can lead over into another and cause app crashes and force closes that are annoying.
When upgrading to a newer version of the same ROM it is not necessary, you can just wipe the caches and install the ROM.
I personally do not worry about benchmarks. Does it feel fast to you? If so, then it is all good.
Click to expand...
Click to collapse
I also prefer to wipe the system as well when switching roms. I even like to upon updating the same rom. I ususally wipe system and cache for that. I also wipe dalvik cache when changing kernels.

Right way to install new ROM: what to format/wipe

I have been asking this for a while and now I decide to go through experts opinion and thoughts. I use TWRP in my Moto G (and also in my N6 and without hijacking the post this cover both devices) and sometimes install a new ROM give me a lot of issues. There are several ways to install a new ROM and most of them explain the "how to" others doesn't and many cases are unclear for newbies. So, I took some pictures on my device (attached) and I want to ask, what is the best method to clear all the device in order to install a new ROM
Common Factory Reset (IMG_20150527_095149)?
Advanced Wipe and check Dalvik Cache, Cache and System (IMG_20150527_095202)?
Advanced Wipe and check Dalvik Cache, Cache, Data and System (IMG_20150527_095212)?
If I format data can I lose something important? Can I break my phone? Would this be a hard brick?
Of course always before do that I, personally, make a backup and copy to my PC, just in case, so answers?

Kindle fire HD 2012 model can't connect to wifi after wiping with TWRP

I have just recently rooted my old Kindle Fire HD 2012 7" model and after making a backup before getting android on it, I wiped it due to slow performance and only 21mb of data remaining.
When I was greeted with the setup screen I got to the " Choose a wifi network " screen and was confused to find that it said that there were no nearby wifi networks to connect to. I knew
something was up with the device because on all my other devices, the wifi was working just fine. I skipped the setup and tried getting wifi but saw that tapping the wifi on button was greyed out
for an unknown reason. Also, I did this all on the kindle without a computer. I'm very new to rooting kindles and android devices and to these forums so could someone please help me resolve this issue?
MSD615 said:
I have just recently rooted my old Kindle Fire HD 2012 7" model and after making a backup before getting android on it, I wiped it due to slow performance and only 21mb of data remaining.
When I was greeted with the setup screen I got to the " Choose a wifi network " screen and was confused to find that it said that there were no nearby wifi networks to connect to. I knew
something was up with the device because on all my other devices, the wifi was working just fine. I skipped the setup and tried getting wifi but saw that tapping the wifi on button was greyed out
for an unknown reason. Also, I did this all on the kindle without a computer. I'm very new to rooting kindles and android devices and to these forums so could someone please help me resolve this issue?
Click to expand...
Click to collapse
Boot to TWRP and choose the advanced wipes, then select cache partition and Dalvik/ART cache, do not select any other partitions listed. Then swipe the slider at the bottom, let it finish wiping then reboot the device.
***NOTE***Do not factory reset, that's not what you want. It would work also but it will wipe your user data and settings, you only want to wipe the cache partitions. Wiping just Dalvik/ART cache would probably fix it but for safe measure, wipe the regular cache also. You will not lose any data doing this, it only clears cache so that when you reboot it loads all your apps from a fresh start with no cached data from things that aren't there anymore.
Sent from my SM-S903VL using Tapatalk
Droidriven said:
Boot to TWRP and choose the advanced wipes, then select cache partition and Dalvik/ART cache, do not select any other partitions listed. Then swipe the slider at the bottom, let it finish wiping then reboot the device.
***NOTE***Do not factory reset, that's not what you want. It would work also but it will wipe your user data and settings, you only want to wipe the cache partitions. Wiping just Dalvik/ART cache would probably fix it but for safe measure, wipe the regular cache also. You will not lose any data doing this, it only clears cache so that when you reboot it loads all your apps from a fresh start with no cached data from things that aren't there anymore.
Sent from my SM-S903VL using Tapatalk
Click to expand...
Click to collapse
I followed your instructions but the wifi is still greyed out. I should also mention that I may have messed something up before making this thread, I made the mistake of doing the equivalent of picking at a wound by clearing everything ( the dalvik cache, data, internal storage, cache, and system ) however I did restore the system from a backup but I couldn't restore the data because the backup failed previously.
MSD615 said:
I followed your instructions but the wifi is still greyed out. I should also mention that I may have messed something up before making this thread, I made the mistake of doing the equivalent of picking at a wound by clearing everything ( the dalvik cache, data, internal storage, cache, and system ) however I did restore the system from a backup but I couldn't restore the data because the backup failed previously.
Click to expand...
Click to collapse
If you messed something up before this then you need to take your question/issue to the Kindle Fire HD forum here. The Kindle forum here covers different models of kindle so make sure you're getting the right information for your specific version of kindle.
Sent from my SM-S903VL using Tapatalk

I thinkI have deep embeded malware question about formating etc

Hi everyone. so my android phone is a midrange oppo. so I recently saw I was getting really bad performance . so I did a reset. and out of habit I remove my SIM and SD card
now when I restarted back to my clean UI. I was sent an SMS asking me to pickup my package and had a .IR country. which is wrong for me.
so I concluded I was infected with some pretty full on malware. because without a sim it still sent me a fake SMS. which means its in there.
So how can I do a full format to get rid of it? I tried the encrypt and reset to all factory but it still did it.
Any ideas. ?
can I d/l the full OS from Oppo and do a full wipe manually. or do I restart to the root mode and clear the delvic cache etc and try that?
interested on your thoughts... or should I burn the phone LOL
Clearing Dalvik Cache will only help you if you have serious problems with an app and all other solutions have failed. Take note that if Dalvik Cache gets wiped then when the Android smartphone is restarted, the Dalvik Cache is rebuilt.
FYI:
The Dalvik Cache contains - simply put - the directory tree of all installed apps on your Android.
This is comparable to the MFT (Master File Table) of Windows.
In addition, the Dalvik Cache serves as a temporary buffer for apps that require a lot of resources.
so what should I do. is there a way I can wipe the phone to nothing then reinstall it from my PC via a program or something?

Categories

Resources