A problem I came across while making my Rom was that while using a Data2SD (Sibere's) partition on ext, clearing the dalvik-cache in recovery would result in a bootloop. The logcat showed that system was searching for the dalvik-cache and looping.
To solve this, a solution would be clear dalvik-cache and recreate an optimized dex file. Or another way that comes to mind is to odex the system altogether. While searching for resources on these, I found that a full collection of resources esp description with scripts was not available.
Some information that I've managed to glean about dexes/odexes so far..
Generic script to odex an apk:
dexopt-wrapper appname.apk[or jar] appname.odex $BOOTCLASSPATH
For the HTC Desire running a Froyo Sense build,
for i in /system/framework/*.jar do odex=`echo $i | sed -e 's/.jar/.odex/g'` echo "dexopt-wrapper $i $odex" dexopt-wrapper $i $odex done
for i in /system/app/*.apk do odex=`echo $i | sed -e 's/.apk/.odex/g'` echo "dexopt-wrapper $i $odex" dexopt-wrapper $i $odex done for i in /data/app/*.apk do odex=`echo $i | sed -e 's/.apk/.odex/g'` echo "dexopt-wrapper $i $odex" dexopt-wrapper $i $odex done
- dsixda (Android Kitchen author), for his deodexing script (do_deodex) included below
- What is the difference between a Dex and Odex file (I know dex is optimized odex, but what actual steps are being done to the odex file to make it a dex, and can we script those steps to execute in recovery?)
- At what step in Rom install are the dexes created? If it's init.rc that creates these, can we redo these steps in recovery?
- Can anyone provide the code to make a Dex file (Not an odex file)