Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,11 @@ public void setSootOptions(Options options, InfoflowConfiguration config) {
options.set_no_bodies_for_excluded(true);
options.set_allow_phantom_refs(true);
options.set_include(includeList);
options.set_output_format(Options.output_format_none);
if (summaryConfig.getWriteOutputFiles())
options.set_output_format(Options.output_format_jimple);
else
options.set_output_format(Options.output_format_none);

options.setPhaseOption("jb", "use-original-names:true");
options.set_ignore_classpath_errors(true);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ class Main {
private static final String OPTION_CLASS_TIMEOUT = "ct";
private static final String OPTION_ANALYZE_HASHCODE_EQUALS = "he";
private static final String OPTION_ANDROID_PLATFORMS = "p";
private static final String OPTION_WRITE_JIMPLE_FILES = "wj";

public static void main(final String[] args) throws FileNotFoundException, XMLStreamException {
Main main = new Main();
Expand Down Expand Up @@ -79,6 +80,7 @@ private void initializeCommandLineOptions() {
"Also analyze hashCode() and equals() methods");
options.addOption(OPTION_ANDROID_PLATFORMS, "platformsdir", true,
"Path to the platforms directory from the Android SDK");
options.addOption(OPTION_WRITE_JIMPLE_FILES, "writejimplefiles", false, "Write out the Jimple files");
}

public void run(final String[] args) throws FileNotFoundException, XMLStreamException {
Expand Down Expand Up @@ -201,6 +203,11 @@ protected void configureOptionalSettings(CommandLine cmd, SummaryGenerator gener
String platformsDir = cmd.getOptionValue(OPTION_ANDROID_PLATFORMS);
generator.getConfig().setAndroidPlatformDir(platformsDir);
}
{
boolean writeJimpleFiles = cmd.hasOption(OPTION_WRITE_JIMPLE_FILES);
if (writeJimpleFiles)
generator.getConfig().setWriteOutputFiles(true);
}
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,10 @@ public ClassSummaries createMethodSummaries(String classpath, Collection<String>
}
}

Options.v().set_output_format(Options.output_format_none);
if (config.getWriteOutputFiles())
Options.v().set_output_format(Options.output_format_jimple);
else
Options.v().set_output_format(Options.output_format_none);
if (hasWildcard || config.getLoadFullJAR() || config.getSummarizeFullJAR())
Options.v().set_process_dir(Arrays.asList(classpath.split(File.pathSeparator)));
else
Expand Down