What exactly is the Dalvik Cache and when do I need to clear it? Is it something that should be done when you replace one rom with another or is a data wipe all you need to do? Any clarity on what a Dalvik cache is would be greatly appreciated. I just want to know the basics of what it is and when I do or do not need to use it.
In cm roms, dalvik cache of system apps are generated in /cache but those data/apps are generated in /data. Is there any way to disable this behaviour? Cache partition in our phones is too small. In AOSP and AOKP and stock roms, dalvik cache is always generated in /data no matter whether its a system app. any way to achieve this in cm roms?
I was flashing CM9 from CM7 on my Motorola Defy, botched it up intially due to a slip of my finger which led to me to Clear the cache first. But then I restarted the entire process by Clearing Data -> Installing -> Flashing Kernel and so on...
But when I tried to clear the Dalvik Cache, the phone didn't delete it. It didn't give me a message that it wiped the cache, but it didn't say otherwise either. This led me to believe that the cache just didn't exist anymore.
As a result, I'm unable to install apps - Says there is no memory and I need to make more. Also, everytime the phone comes on is treated as the first time. It takes me through the whole process of Setting up an account and everything. This has rendered my phone obsolete.
I was just flashing a new ROM for my gio, and made sure that i did a factory reset, wiped cache partition and wipe dalvik cache. but when i went to wipe the dalvik, CWM froze for a bit, then showed the yes/no part for like half a second, then kicked me back to the main menu. It does this every time. What to do? or should i just reflash it?
I am wondering if it is possible to limit the size of the dalvik-cache. I am looking for an alternative to putting it on the sdcard. Maybe I could create a partition on the internal storage for the cache?
It looks like ics automatically runs the "Android is Upgrading" thing whenever it senses some "change" in boot.img? It happens everytime i flash a kernel, without wiping dalvik cache. It will continue to run regardless of whether the dalvik cache files are present or not. This is actually a good feature.
But i noticed that if i simply do a nandroid backup of /boot, and restore it without doing anything else, or flash the same kernel again, it will boot up with the "Android is Upgrading" thing again from the start.
is there a way to disable this, or at least prevent dalvik cache generation if they are already present? im using amon Ra recovery
1. I have a c lib which will send & receive multicast package, if I lauch it in native ap, everything is OK, but if lauched through jni ,so it run in dalvik env, it can not receive multicast, i think is may be disabled by dalvik, is there any permission can enable this feature?
2. In this lib i will make some callback of function in dalvik class. according to tranditional method which can run under JDK1.5 & 1.6 as follow: (I make it under source code env not NDK)
In some initialization method save jvm pointer
it seems AttachCurrentThread not failed but env not correct.
This question has been asked(and answered) many times about dynamically generating and loading java bytecodes at runtime into a running Dalvik VM, but is there any way to load dex files/bytecodes into an app at runtime?
I have a question for any out there in Eris-land. I have the stock browser cache set to the 6mb max that the app settings allows--but it sometimes ends up larger than that when I go to clear it in the Application settings. How is that so? Also, how exactly does the cache work? Does it store visited pages then keep adding to it until it's at the max storage? Do older cached pages get bumped for newer ones? Does the browser get sluggish if the cache is full? (I haven't noticed any issues myself.) Finally, if I set the max cache setting for less than the 6mb cap, (say, 3mb), will that make the browser less efficient at loading pages? I'm curious since the stock browser doesn't use SD card for storage and cuts into the main phone memory.
I opened ASTRO file manager Menu>More>Preferences and there is a setting to clear the internal caches. I already cleared mine manually through the settings>manage applications so I am not sure if ASTRO clears all the caches on the Eris or not.
I synced up with my computer after uninstalling unused apps and clearing the browser cache and a few others, just general clean up to keep the phone running smooth. After roaming around my sd card, I came across this. A total of 84 cache files totaling 3.24mb. What is this from and is it ok to delete them? I'm assuming it is since it is just cache, which you can delete any of theme xcept for google nav (force close issues).
I'm implementing an image cache system for caching downloaded image.
My strategy is based upon two-level cache: Memory-level and disk-level.
My class is very similar to the class used in the droidfu project
My downloaded images are put into an hashmap and the Bitmap objet is wrapped inside a SoftRererence object.
Also every image is saved permanently to the disk. If a requested image is not found into the Hashmap<String,SoftReference<Bitmap>> it will be searched on the disk, readed, and then pushed back into the hashmap. Otherwise the image will be downloaded from the network.
Since I store the images into the phisical device momery, I have added a check for preserve the device space and stay under a 1M of occupied space:
This method is called sometime afte a disk writing:
What I'd like to add is the same check on the HashMap size to prevent it will grow too much. Something like this:
My question is: What could be a right MAX_MEMORY_SIZE value? Also, Is it a good approach? A good answer also could be: "Don't do it! SoftReference is already enough"
Through out of my Java projects I've got used to TDD with the help of this basic tools
JUnit (http://www.junit.org/) as Unit testing Framework Mockito (http://mockito.org/) as tool for Stubs and Mock objects EclEmma (http://www.eclemma.org/) as Java Code Coverage for Eclips
As far as I understand none of them I can use fully when I do coding for Dalvik:
JUnit -- android.jar has its own junit.jar and my assumption is you're supposed to use it, not the latest version from junit.org Mockito -- read this one http://code.google.com/p/mockito/issues/detail?id=57 EclEmma -- doesn't support Android JUnit tests
I implemented a runtime bytecoder for Java apps based on Javassist. The idea is to introduce code to execute code remotely based on current context. Since the context is not the same at every moment, I need to perform the bytecoding at every execution (if needed). I tried to port my code to Android in order to test it on mobile devices (I already tested it on win mobile and iphone using phoneme and jamvm respectively). However, I could not find any bytecoding tool available for Dalvik. Is there any Dalvik bytecoder available or an ongoing project that I can join/check that is working on this issue? If not, is there any other alternative beside running a decompiler for dex files, and modifying it manually?