[Soot-list] Android App Contrrol Flow Graph

arashalavi29m at gmail.com arashalavi29m at gmail.com
Tue Jun 14 17:12:21 EDT 2016


Hi all,

I am new to soot. I want to construct the control flow graph for an app. 
Here is the code I'm using:

import java.io.IOException;

import java.util.Collections;

import org.xmlpull.v1.XmlPullParserException;

import soot.PackManager;

import soot.Scene;

import soot.SootMethod;

import soot.jimple.infoflow.android.SetupApplication;

import soot.options.Options;

public class CFG {

public CFG() {

// TODO Auto-generated constructor stub

}

public static void main(String[] args) {

// TODO Auto-generated method stub

SetupApplication app = new 
SetupApplication("/home/arash/Desktop/adt-bundle-linux-x86_64-20140702/sdk/platforms","/home/arash/Desktop/apps/app.easytoken_909.apk");

try {

app.calculateSourcesSinksEntrypoints("./AndroidCallbacks.txt");

} catch (IOException e) {

// TODO Auto-generated catch block

e.printStackTrace();

} catch (XmlPullParserException e) {

// TODO Auto-generated catch block

e.printStackTrace();

}

soot.G.reset();

Options.v().set_src_prec(Options.src_prec_apk);

Options.v().set_process_dir(Collections.singletonList("/home/arash/Desktop/apps/app.easytoken_909.apk"));

Options.v().set_android_jars("/home/arash/Desktop/adt-bundle-linux-x86_64-20140702/sdk/platforms");

Options.v().set_whole_program(true);

Options.v().set_allow_phantom_refs(true);

Options.v().set_output_format(Options.output_format_none);

Options.v().setPhaseOption("cg.spark", "on");

Scene.v().loadNecessaryClasses();

*SootMethod entryPoint = app.getEntryPointCreator().createDummyMain();*

Options.v().set_main_class(entryPoint.getSignature());

Scene.v().setEntryPoints(Collections.singletonList(entryPoint));

System.out.println(entryPoint.getActiveBody());

PackManager.v().runPacks();

System.out.println(Scene.v().getCallGraph().size());

}

}


I get the following error for the above bold line:

Exception in thread "main" java.lang.Error: Unresolved compilation 
problems: 
    The type 
soot.jimple.infoflow.entryPointCreators.AndroidEntryPointCreator cannot be 
resolved. It is indirectly referenced from required .class files
    The method getEntryPointCreator() from the type SetupApplication refers 
to the missing type AndroidEntryPointCreator

Any idea how can I fix this?

Thanks




-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://mailman.CS.McGill.CA/pipermail/soot-list/attachments/20160614/396437b7/attachment-0001.html 


More information about the Soot-list mailing list