[Soot-list] How to inject a class to Android app via Soot?
Wontae Choi
wtchoi at berkeley.edu
Wed Oct 14 03:10:22 EDT 2015
Thanks. It works.
Although, it seems that setApplicationClass() method has to be invoked from a transformer method
inheriting BodyTransformer method. I initially tried to invoke it from the main method. But this gave me
an exception.
> On Oct 10, 2015, at 12:06 PM, Saswat Anand <saswat78 at gmail.com> wrote:
>
> I guess you have to call setApplicationClass() on the SootClass'es
> that you want to inject?
>
> On Fri, Oct 9, 2015 at 6:22 PM, Wontae Choi <wtchoi at berkeley.edu> wrote:
>> Hi all,
>>
>> I am trying to instrument Android application using Soot. Is there a good way to inject content of class files (or Jar file) into the target application? I’ve written a module providing static methods performing actual tasks, and want to invoke those methods from the application via instrumentation.
>>
>> So far, I’ve tried followings:
>> - Adding the module's jar file to the soot class path
>> - Invoking Scene,v().addBasicClass(“<fully qualified classname>”, SootClass.BODIES) to load the module.
>> - Instrument the application to invoke the desired method in the module.
>>
>> It seems that this configuration does not inject the actual module classes into the application, and I am getting following error message during the execution of the instrumented application:
>>
>> java.lang.NoClassDefFoundError: <fully qualified class name>
>>
>> Can somebody explain what am I missing?
>>
>> Best,
>> Wontae Choi
>> _______________________________________________
>> Soot-list mailing list
>> Soot-list at CS.McGill.CA
>> https://mailman.CS.McGill.CA/mailman/listinfo/soot-list
More information about the Soot-list
mailing list