i'm trying to disable dexopt on the emulator to test the execution of a corrupted dex file.
I've tried this:
- Code: Select all
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
- Code: Select all
adb shell dalvikvm -cp /mnt/sdcard/Test.jar Test
dexopt seems still to be launched:
- Code: Select all
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@sdcard@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:
- Code: Select all
adb shell dalvikvm -Xverify:none -Xdexopt:none -cp /mnt/sdcard/Test.jar Test
so how can i disable dexopt / dex verification process?
Thanks in advance.


