[Soot-list] Using JBCO on Android app - problem with entry points

Marc-André Laverdière-Papineau marc-andre.laverdiere-papineau at polymtl.ca
Wed Jul 3 13:25:17 EDT 2013


Hello,

This is a common problem for anything that doesn't start with a main.
Flowdroid has an entry point creator you could use, otherwise you'll
have to write your own.

Marc-André Laverdière-Papineau
Doctorant - PhD Candidate

On 02/07/13 01:34 PM, Jan Dubina wrote:
> Hello,
> I am trying to use the Soot framework and JBCO to obfuscate code of an
> Android application. I am currently stuck on exception:
> Exception in thread "main" java.lang.RuntimeException: Main-class has no
> main method!
> I know I have to set EntryPoints, but I am not really sure how to do
> that. I tried to follow several advices found here (like
> http://www.sable.mcgill.ca/pipermail/soot-list/2011-January/003434.html), but
> had no luck so far.
>  
> Source code:
> package jbcotest;
>  
> importjava.util.ArrayList;
> import soot.options.Options;
>  
> public class JBCOtest {
>  
>        public static void main(String[] args) {
>              Options.v().set_whole_program(true);
>              Options.v().set_app(true);
>              Options.v().set_src_prec(Options.src_prec_apk);
>              Options.v().set_output_format(Options.output_format_dex);
>              Options.v().set_main_class("package.MainClass");
>             
> Options.v().set_android_jars("path\\to\\android-sdk\\platforms");
>  
>              ArrayList<String> processDir = new ArrayList<String>();
>              processDir.add("path\\to\\apk");
>              Options.v().set_process_dir(processDir);
>  
>              ArrayList<String> newArgs = new ArrayList<String>();
>  
>              newArgs.add("-t:wjtp.jbco_cr");
>  
>              soot.jbco.Main.main(newArgs.toArray(new
> String[newArgs.size()]));
>             
>        }
>  
> }
>  
> Thank you for your help.
>  
> Jan
> 
> 
> _______________________________________________
> Soot-list mailing list
> Soot-list at sable.mcgill.ca
> http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list
> 


More information about the Soot-list mailing list