[Soot-list] Fwd: analyze android app

Stefan Gommer listenbaer at gmail.com
Wed Jul 2 03:58:34 EDT 2014


Hi all, 

I set up my eclipse and imported all the libraries. I wrote this code to analyze a file and print the results for testing. But I’m getting the following error:

> Exception in thread "main" java.lang.RuntimeException: Callback definition file not found
> 	at soot.jimple.infoflow.android.AnalyzeJimpleClass.loadAndroidCallbacks(Unknown Source)
> 	at soot.jimple.infoflow.android.AnalyzeJimpleClass.<init>(Unknown Source)
> 	at soot.jimple.infoflow.android.SetupApplication.calculateCallbackMethods(Unknown Source)
> 	at soot.jimple.infoflow.android.SetupApplication.calculateSourcesSinksEntrypoints(Unknown Source)
> 	at soot.jimple.infoflow.android.SetupApplication.calculateSourcesSinksEntrypoints(Unknown Source)
> 	at test.analyzeApkFile(test.java:27)
> 	at test.main(test.java:16)
> 
> Code (is this the right way to do this?) : 
> 
> private static SetupApplication app;
> 
> 	public static void main(String[] args) throws IOException, XmlPullParserException {
> 		InfoflowResults res = analyzeApkFile();
> 		System.out.println(res.toString());
> 		writeOutput(res.toString());
> 	}
> 	
> 	public  static InfoflowResults analyzeApkFile() throws IOException, XmlPullParserException {
> 		app = new SetupApplication(
> 				"/Users/lar/Documents/android-platforms", 
> 				"/Users/lar/Desktop/app1.apk");
> 		app.setComputeResultPaths(true);
> 		app.setTaintWrapper(new EasyTaintWrapper("/Users/lar/Documents/FlowDroid/EasyTaintWrapperSource.txt"));
> 		app.calculateSourcesSinksEntrypoints("/Users/lar/Documents/FlowDroid/SourcesAndSinks.txt");
> 		return app.runInfoflow();
> 	}
> 	
> 	private static void writeOutput(String output) {
> 		File file = new File("member.txt");
> 	    FileWriter writer = null;
> 	    try {
> 	        writer = new FileWriter(file);
> 	        writer.write(output);
> 	    } catch (IOException e) {
> 	        e.printStackTrace(); // I'd rather declare method with throws IOException and omit this catch.
> 	    } finally {
> 	        if (writer != null) try { writer.close(); } catch (IOException ignore) {}
> 	    }
> 	    System.out.printf("File is located at %s%n", file.getAbsolutePath());
> 	}

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.CS.McGill.CA/pipermail/soot-list/attachments/20140702/8c39705f/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 496 bytes
Desc: Message signed with OpenPGP using GPGMail
Url : http://mailman.CS.McGill.CA/pipermail/soot-list/attachments/20140702/8c39705f/attachment-0001.bin 


More information about the Soot-list mailing list