[Soot-list] Possible issue with dex files
Gianluca Mezzetti
mezzetti at cs.au.dk
Wed Sep 3 07:56:08 EDT 2014
Dear sooters,
i'm new to this community, and, first of all, i would like to say thanks to you for developing this cool tool.
However i have some problems that I would like to discuss with you.
I have a setting where i need to instrument single dex files, because of this I modified src/soot/SourceLocator.java
switch( Options.v().src_prec() ) {
case Options.src_prec_class:
classProviders.add(classFileClassProvider);
+ classProviders.add(new DexClassProvider());
classProviders.add(new JimpleClassProvider());
classProviders.add(new JavaClassProvider());
break;
With this setting i'm able to read and write dex files without the need of an android.jar, relaying on the phantom-ref feature.
However, when I try to install the dex i have problems with dexopt, that seems to be originated exactly from the missing jar.
It is the android.jar really needed to compile to dex files ?
The detail of the dexopt error are the following:
Invalid name : 'Ljava/lang/annotation/ElementType;'
raised in DexSwapVerify.cpp
s = dexStringById(state->pDexFile, item->nameIdx);
if (!dexIsValidMemberName(s)) {
ALOGE("Invalid name: '%s'", s);
return NULL;
}
to me it seems really not a valid member name, example of member names are the following:
E/dalvikvm( 2067): Valid name example: 'plugin'
E/dalvikvm( 2067): Valid name example: 'toLink'
E/dalvikvm( 2067): Valid name example: 'this$1'
E/dalvikvm( 2067): Valid name example: 'val$classLoader'
E/dalvikvm( 2067): Valid name example: 'this$0'
E/dalvikvm( 2067): Valid name example: 'caches'
E/dalvikvm( 2067): Valid name example: 'map'
where is that spurious name coming from ?
It is an annotation....is it that relevant ?
If you give me some hints about where I could take a look, i could investigate the issue deeper.
Thanks a lot.
Gianluca Mezzetti
Post-doc at Aarhus University, Aarhus, Denmark
More information about the Soot-list
mailing list