[Soot-list] Accepting APK files

Marianna Rapoport mgrapoport at gmail.com
Thu Jun 18 20:30:41 EDT 2015


Hello!

I would like to use the Java String Analyzer (http://www.brics.dk/JSA/) on
Android applications.

I have been trying to get Soot to accept an apk file as follows:

String apkDir = "path/to/apk/directory";


Scene.v().setSootClassPath(Scene.v().getSootClassPath() +
File.pathSeparator + apkDir);

Options.v().set_android_jars("/usr/local/Cellar/android-sdk/24.2/platforms");
Options.v().set_src_prec(Options.src_prec_apk);
Options.v().set_output_format(Options.output_format_dex);

soot.Main.main(new String[] { "-process-dir", apkDir, "--app",
"cgeo.geocaching.MainActivity" });

Chain<SootClass> applicationClasses = Scene.v().getApplicationClasses();
Chain<SootClass> classes = Scene.v().getClasses();

When I debug this program I see that the classes chain contains 130
elements and the applicationClasses chain is empty. The MainActivity
class is not part of classes either (as are no classes of the apk).

Do you know what I'm doing wrong? Thanks!

Marianna
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://mailman.CS.McGill.CA/pipermail/soot-list/attachments/20150618/f9e64c34/attachment.html 


More information about the Soot-list mailing list