[Soot-list] Accepting APK files

Steven Arzt Steven.Arzt at cased.de
Fri Jun 26 11:51:52 EDT 2015


Hi Marianna,

 

The APK does not need to be on the Soot classpath. Putting it into the process-dir parameter is totally sufficient. You, however, forgot to specify the Android platform libraries that Soot shall use. You need to provide either the –android-jars or the –force-android-jar parameter.

 

Soot should give you a corresponding error message. Did you double-check your console output?

 

Best regards,

  Steven

 

Von: soot-list-bounces at CS.McGill.CA [mailto:soot-list-bounces at CS.McGill.CA] Im Auftrag von Marianna Rapoport
Gesendet: Freitag, 19. Juni 2015 02:31
An: soot-list at CS.McGill.CA
Betreff: [Soot-list] Accepting APK files

 

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/20150626/dd751694/attachment.html 


More information about the Soot-list mailing list