[Soot-list] Using JBCO on Android app - problem with entry points
Jan Dubina
jan.dubina at yahoo.com
Tue Jul 2 13:34:41 EDT 2013
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;
publicclass JBCOtest {
publicstaticvoid
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.cs.mcgill.ca/pipermail/soot-list/attachments/20130702/c2710109/attachment.html
More information about the Soot-list
mailing list