[Soot-list] Possible issue with dex files

Steven Arzt Steven.Arzt at cased.de
Wed Sep 10 08:18:33 EDT 2014


Hi Gianluca,

I'm not really sure why you don't want to specify an android.jar file. This has nothing to do with whether you instrument apk files or single dex files. Unless the same issue also occurs when using a proper android. jar file, I would not call it a bug.

Best regards,
Steven

Gianluca Mezzetti <mezzetti at cs.au.dk> wrote:

>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
>_______________________________________________
>Soot-list mailing list
>Soot-list at CS.McGill.CA
>https://mailman.CS.McGill.CA/mailman/listinfo/soot-list


More information about the Soot-list mailing list