[Soot-list] Instrumenting Android library classes

Peter Kim chpkim at gmail.com
Tue Sep 16 13:38:36 EDT 2014


Hi Gianluca,

Thank you for your message. I wasn't sure what to do with your config, but
I am interested in how you were even able to instrument android.os and
android.app classes. I am doing the following:

- Using "-include-all" flag to pull in library classes
- Using "-include" flag to specify package to pull in (but this seems to be
redundant to the option above)
- Using "-dynamic-package" flag to specify package to pull in

Using these options, I am able to pull in some classes of a library
package, but not all. Do you know how to ensure that *ALL* classes of a
package are pulled in? I also tried calling
"Scene.v().addBasicClass("android.library.LibraryClass",
SootClass.SIGNATURES);" and "SootClass.setApplicationClass()" on the
classes that were not being transformed to see if this would pull them in,
but it does not. The ones that are not being pulled in are marked as
phantom.

Thank you.

On Tue, Sep 16, 2014 at 12:04 AM, Gianluca Mezzetti <mezzetti at cs.au.dk>
wrote:

>  Peter,
> i'm on that too, and it seems not very easy.
> I suggest you to look at my config
> https://github.com/algobardo/sootReproduce to start making some
> experiments.
>
>
>  So far i'm able to run an instrumented framework, but only instrumenting
> android.os, android.app, excluding annotation classes (
> https://github.com/Sable/soot/issues/264) and the package andoid.util
> (that makes soot crash) https://github.com/Sable/soot/issues/262, and
> circumventing some bad behavior https://github.com/Sable/soot/issues/263.
>
>  To do that I needed to work on class files because i can instrument
> class files individually, keeping untouched the others.
>
>
>
>  If you want to experiment with dex to dex  instrumentation instead (i
> was unable to do that)...take a look at this little modification to the
> SourceLocator
>
> https://github.com/algobardo/soot/commit/afcf833efa424218a84bd6a48cfed845968d934c
>
>  even though Steven suggests
>
> "I'm not really sure why you don't want to specify an android.jar file.
> This has nothing to do with whether you instrument apk files or single dex
> files. Unless the same issue also occurs when using a proper android. jar
> file, I would not call it a bug."
>
>  Best regards,
> Gianluca
>
>
>  Il giorno 15/set/2014, alle ore 22:56, Peter Kim <chpkim at gmail.com> ha
> scritto:
>
>  Hi,
>
>  I'm trying to get Soot to instrument Android library classes, such as
> those in android.* packages, but such classes are not being picked up by
> Soot. I tried including "android.jar" and "uiautomator.jar" in "soot-classpath"
> option, but the library classes are still being skipped. Could you please
> tell me how to instrument them? Thank you.
>  _______________________________________________
> Soot-list mailing list
> Soot-list at CS.McGill.CA
> https://mailman.CS.McGill.CA/mailman/listinfo/soot-list
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.CS.McGill.CA/pipermail/soot-list/attachments/20140916/fc4b348a/attachment.html 


More information about the Soot-list mailing list