<div dir="ltr">Hello Xinxin and Bernhard, how are you? It is not working for me; I have included the calls:<br><br><div style="background-color: rgb(250, 250, 250); border-color: rgb(187, 187, 187); border-style: solid; border-width: 1px; overflow-wrap: break-word;" class="prettyprint"><code class="prettyprint"><div class="subprettyprint"><span style="color: #000;" class="styled-by-prettify"><br>sootOpt</span><span style="color: #660;" class="styled-by-prettify">.</span><span style="color: #000;" class="styled-by-prettify">set_xml_attributes</span><span style="color: #660;" class="styled-by-prettify">(</span><span style="color: #008;" class="styled-by-prettify">true</span><span style="color: #660;" class="styled-by-prettify">);</span><span style="color: #000;" class="styled-by-prettify"><br>sootOpt</span><span style="color: #660;" class="styled-by-prettify">.</span><span style="color: #000;" class="styled-by-prettify">print_tags_in_output</span><span style="color: #660;" class="styled-by-prettify">();</span></div></code></div><br>before calling soot, but when I try getting the tags of a method they don't appear. Does anyone of you have a minimal working example by any chance?<br>Thanks!<br>Billy<br><br>El miércoles, 5 de octubre de 2016, 22:30:06 (UTC-3), Xinxin Jin  escribió:<blockquote class="gmail_quote" style="margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir="ltr"><div style="font-family:arial,helvetica,sans-serif">Thank you very much, Bernhard ! It works !</div></div><div><br><div class="gmail_quote">On Wed, Oct 5, 2016 at 10:48 AM, Bernhard Berger <span dir="ltr"><<a href="javascript:" target="_blank" gdf-obfuscated-mailto="OuSZ86EvBAAJ" rel="nofollow" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">ber...@tzi.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">Hi Xinxin,<div><br></div><div>as far as I remember Jimple has no equivalent of annotations. They can be stored using the -xml-attributes or the -print-tags command line parameters. Within Soot you have to query the tags [1] to find the annotations you are interested in.</div><div><br></div><div>Regards, Bernhard</div><div><br></div><div>[1] <a href="https://www.google.com/url?q=https%3A%2F%2Fssebuild.cased.de%2Fnightly%2Fsoot%2Fjavadoc%2Fsoot%2Ftagkit%2FHost.html&sa=D&sntz=1&usg=AFQjCNGUld03hFxh2cqa4pQ45L4bhMnrGw" target="_blank" rel="nofollow" onmousedown="this.href='https://www.google.com/url?q\x3dhttps%3A%2F%2Fssebuild.cased.de%2Fnightly%2Fsoot%2Fjavadoc%2Fsoot%2Ftagkit%2FHost.html\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGUld03hFxh2cqa4pQ45L4bhMnrGw';return true;" onclick="this.href='https://www.google.com/url?q\x3dhttps%3A%2F%2Fssebuild.cased.de%2Fnightly%2Fsoot%2Fjavadoc%2Fsoot%2Ftagkit%2FHost.html\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGUld03hFxh2cqa4pQ45L4bhMnrGw';return true;">https://ssebuild.cased.de/<wbr>nightly/soot/javadoc/soot/<wbr>tagkit/Host.html</a><br><div><blockquote type="cite"><div><div><div>Am 05.10.2016 um 18:22 schrieb Xinxin Jin <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="OuSZ86EvBAAJ" rel="nofollow" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">xinxi...@gmail.com</a>>:</div><br></div></div><div><div><div><div dir="ltr"><div style="font-family:arial,helvetica,sans-serif">Hi !</div><div style="font-family:arial,helvetica,sans-serif"><br></div><div style="font-family:arial,helvetica,sans-serif">I need to parse the java annotation from Android application and generate bytecode according to the parsed annotation.</div><div style="font-family:arial,helvetica,sans-serif"><br></div><div style="font-family:arial,helvetica,sans-serif">In the android source code, the annotation is defined like this. <span style="font-family:arial,sans-serif">RetentionPolicy.RUNTIME means the annotation will be preserved in bytecode. </span></div><div style="font-family:arial,helvetica,sans-serif"><br></div><font face="monospace, monospace"><b>@Retention(RetentionPolicy.<wbr>RUNTIME)<br>public @interface<div style="font-family:arial,helvetica,sans-serif;display:inline"> </div><div style="display:inline">MyAnnotation</div> {<br><br>}</b></font><div style="font-family:arial,helvetica,sans-serif"><br></div><div style="font-family:arial,helvetica,sans-serif">Then I use Soot to transform the android APK to Jimple using this command: <br></div><div><div><font face="monospace, monospace"><b>java -classpath ${JAVA_CLASSPATH} soot.Main -android-jars $ANDROID_JARS_PATH -allow-phantom-refs -src-prec apk -ire -f J MyTest.apk</b></font></div></div><div><br></div><div><div style="font-family:arial,helvetica,sans-serif">I checked the generated Jimple files, but found no code annotated with @<b style="font-family:monospace,monospace"><div style="display:inline">MyAnnotation</div></b></div><br></div><div><div style="font-family:arial,helvetica,sans-serif">Can anyone tell me if Soot can't read the annotation in the bytecode or I applied incorrect command?</div><div style="font-family:arial,helvetica,sans-serif"><br></div><div style="font-family:arial,helvetica,sans-serif">Thank you very much !!!</div><br></div><div><div style="font-family:arial,helvetica,sans-serif;display:inline">​​<br clear="all"><div><br></div>-- <br><div><font face="arial, helvetica, sans-serif">Xinxin</font></div>
<br></div><div><br></div></div>
</div></div></div>
______________________________<wbr>_________________<br>Soot-list mailing list<br><a href="javascript:" target="_blank" gdf-obfuscated-mailto="OuSZ86EvBAAJ" rel="nofollow" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">Soot...@CS.McGill.CA</a><br><a href="https://mailman.CS.McGill.CA/mailman/listinfo/soot-list" target="_blank" rel="nofollow" onmousedown="this.href='https://www.google.com/url?q\x3dhttps%3A%2F%2Fmailman.CS.McGill.CA%2Fmailman%2Flistinfo%2Fsoot-list\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNESpIFG08DX_QShQ4aH7soZrrlBBw';return true;" onclick="this.href='https://www.google.com/url?q\x3dhttps%3A%2F%2Fmailman.CS.McGill.CA%2Fmailman%2Flistinfo%2Fsoot-list\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNESpIFG08DX_QShQ4aH7soZrrlBBw';return true;">https://mailman.CS.McGill.CA/<wbr>mailman/listinfo/soot-list</a><br></div></blockquote></div><br></div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div><font face="arial, helvetica, sans-serif">Xinxin</font></div>
</div>
</blockquote></div>