according to dalvik docs, optimization is always performed. the
controls are just for verification.
if build time optimization is not done, it will occur at install time.
On Feb 21, 3:19 pm, Mattia Campana <
bytec...@gmail.com> wrote:
> If it is required, why in $ANDROID_SOURCE/dalvik/docs/embedded-vm-control.html is explained how to disable it?
> Btw, the commands recommended in the documentation do not seem to work.
>
> Il giorno 19/feb/2011, alle ore 03.03, Dianne Hackborn ha scritto:
>
> > It is required. This isn't just optional optimization; this does the final linking of the .dex file for the target device before it can be run.
>
> > On Fri, Feb 18, 2011 at 5:21 AM, Bytec0d3 <
bytec...@gmail.com> wrote:
> > Hi all,
> > i'm trying to disable dexopt on the emulator to test the execution of
> > a corrupted dex file.
> > I've tried this:
>
> > adb shell setprop dalvik.vm.dexopt-flags v=n
> > adb shell stop; adb shell start
>
> > adb shell getprop | grep dalvik
> > [dalvik.vm.dexopt-flags]: [v=n]
>
> > but when i lunch the .jar file with
>
> > adb shell dalvikvm -cp /mnt/sdcard/Test.jar Test ,dexopt seems still
> > to be launched:
>
> > D/dalvikvm( 337): DexOpt: incorrect opt magic number (0xff ff ff ff)
> > D/dalvikvm( 337): ODEX file is stale or bad; removing and retrying (/
> > data/dalvik-cache/mnt@sdc...@Test.jar@classes.dex)
> > D/dalvikvm( 337): DexOpt: --- BEGIN 'Test.jar' (bootstrap=0) ---
> > E/dalvikvm( 338): Bogus size for section: got 0xe; expected 0x16ac
> > E/dalvikvm( 338): Swap of section type 0001 failed
> > E/dalvikvm( 338): ERROR: Byte swap + verify failed
> > E/dalvikvm( 338): Optimization failed
> > W/dalvikvm( 337): DexOpt: --- END 'Test.jar' --- status=0xff00,
> > process failed
> > E/dalvikvm( 337): Unable to extract+optimize DEX from 'Test.jar'
> > W/dalvikvm( 337): threadid=1: thread exiting with uncaught exception
> > (group=0x40015560)
>
> > I get the same error if i launch the command:
>
> > adb shell dalvikvm -Xverify:none -Xdexopt:none -cp /mnt/sdcard/
> > Test.jar Test
>
> > so how can i disable dexopt?
>
> > Thanks in advance.
>
> > --
> > You received this message because you are subscribed to the Google Groups "android-platform" group.
> > To post to this group, send email to
android-...@googlegroups.com.
> > To unsubscribe from this group, send email to
android-platfo...@googlegroups.com.
> > For more options, visit this group athttp://
groups.google.com/group/android-platform?hl=en.
>
> > --
> > Dianne Hackborn
> > Android framework engineer
> >
hack...@android.com