[Soot-list] Use Soot to parse annotations stored in bytecodes

Xinxin Jin xinxinjin89 at gmail.com
Wed Oct 5 12:22:53 EDT 2016


Hi !

I need to parse the java annotation from Android application and generate
bytecode according to the parsed annotation.

In the android source code, the annotation is defined like this.
RetentionPolicy.RUNTIME
means the annotation will be preserved in bytecode.




*@Retention(RetentionPolicy.RUNTIME)public @interface MyAnnotation {}*

Then I use Soot to transform the android APK to Jimple using this command:
*java -classpath ${JAVA_CLASSPATH} soot.Main -android-jars
$ANDROID_JARS_PATH -allow-phantom-refs -src-prec apk -ire -f J MyTest.apk*

I checked the generated Jimple files, but found no code annotated with @
*MyAnnotation*

Can anyone tell me if Soot can't read the annotation in the bytecode or I
applied incorrect command?

Thank you very much !!!

​​

-- 
Xinxin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://mailman.CS.McGill.CA/pipermail/soot-list/attachments/20161005/34e2a9c6/attachment.html 


More information about the Soot-list mailing list