[Soot-list] Basic question

Eric Bodden eric.bodden at ec-spride.de
Sun Oct 14 04:55:55 EDT 2012


Hello.

Setting an explicit classpath in Soot is really easy. Just provide it
after the -cp flag and do NOT use the -pp option. In this case Soot
will be looking on the provided classpath only, which means that it
has to be complete. As an alternative you can also call
Options.v().set_soot_classpath(...). I don't think you would be
needing anything else.

Eric

On 13 October 2012 18:46, Henddher Pedroza <hpedro2 at uic.edu> wrote:
> Thank you again Eric!
>
> (apologies ahead of time for the long posting)
>
> In my case, "myandroidapp.jar" only contains the classes defined in my app -
> nothing else. None of the android classes are included in my jar. Imagine I
> was modifying android-maven-plugin with an intermediate Soot step right
> after myandroidapp.jar is built but right before Dex is executed.
>
> During the discussion of the issue I'm experiencing (the FastHierarchy
> issue), you suggested to use prepend option  (-pp) and avoid setting
> soot-class-path. However, given that my setup uses Maven, using -pp would
> not be straight forward. That point you brought up made wonder if my Soot
> configuration is flat out wrong ?! ...
> Therefore, I am trying to understand what the correct way is to use an
> alternative java classes (android.jar) instead of standard JDK classes
> (rt.jar et al). I would imagine that such configuration would instruct Soot
> to resolve all classes in the given classpath just like it does with rt.jar
> and the others. I would also imagine that such configuration would do the
> same trick for "j2me" (though I haven't looked at the code to see how j2me
> option affects the soot configuration).
> Hence, I am trying to understand the fundamentals of soot-classpath,
> process-dir, include and exclude options (via Options.v()) expecting that
> this will allow me to utilize all the classes found in android.jar and other
> classes available in Android.
>
> Is my expectation correct about specifying alternative classpath for Soot
> 2.5.0?
> If so, would you suggest some reading, tutorial, documentation or alike that
> explains the details?
>
> I don't want to jump to the latest source-code but stick to an officially
> release version or Soot.
>
> Again, thank you very much for all the help :)
>
> (I should be able to move forward if I see more details/examples)
>
>
> On 10/13/2012 11:03 AM, Eric Bodden wrote:
>>
>> Hello.
>>
>> If you converted your apk to a jar then it should be included just
>> like any other jar file. The android support in Soot is for analyzing
>> apk files directly. (but to do this you need a plugin called dexpler,
>> which we have yet to release)
>>
>> Eric
>>
>> On 13 October 2012 00:54, Henddher Pedroza <hpedro2 at uic.edu> wrote:
>>>
>>> Hello all,
>>>
>>> I am using Soot 2.5.0
>>>
>>> I am trying to do analysis of Android apps (technically .jar before
>>> kicking dex).
>>>
>>> Can someone explain how to configure soot (soot-classpath, include,
>>> exclude, process-dir, phantoms, etc, etc.) to load classes in
>>> myandroidapp.jar?
>>> I suppose that I will need to specify the path to "android.jar" and any
>>> other .jar the myandroidapp.jar refers to (i.e. maps.jar, etc).
>>>
>>> Thanks in advance.
>>>
>>> - Henddher
>>> _______________________________________________
>>> Soot-list mailing list
>>> Soot-list at sable.mcgill.ca
>>> http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list
>>
>>
>>
>



-- 
Eric Bodden, Ph.D., http://sse.ec-spride.de/ http://bodden.de/
Head of Secure Software Engineering Group at EC SPRIDE
Tel: +49 6151 16-75422    Fax: +49 6151 16-72051
Room 3.2.14, Mornewegstr. 30, 64293 Darmstadt


More information about the Soot-list mailing list