[prev in list] [next in list] [prev in thread] [next in thread] 

List:       soot-list
Subject:    Re: [Soot-list] Issues with Android Instrumentation Tutorial
From:       "Steven Arzt" <Steven.Arzt () cased ! de>
Date:       2016-05-17 21:35:27
Message-ID: 004801d1b084$083556a0$18a003e0$ () cased ! de
[Download RAW message or body]

-pp only works if you explicitly specify a classpath. It is not compatible with the \
default classpath.

-----Ursprüngliche Nachricht-----
Von: kuza55 [mailto:kuza55@gmail.com] 
Gesendet: Dienstag, 17. Mai 2016 22:33
An: Steven Arzt
Cc: soot-list@cs.mcgill.ca
Betreff: Re: [Soot-list] Issues with Android Instrumentation Tutorial

Does the -pp behaviour look correct to you as well? I couldn't manage to use it to \
prepend a jar or directory without modifying the classpath.

On 17 May 2016 at 16:20, Steven Arzt <Steven.Arzt@cased.de> wrote:
> Hi Alex,
> 
> This behavior is debatable, but it's not a bug. The -android-jars 
> parameter is used to set the default classpath, i.e., the classpath 
> that is used if you do not explicitly specify one. We should maybe 
> clarify this in the documentation.
> 
> Best regards,
> Steven
> 
> -----Ursprüngliche Nachricht-----
> Von: soot-list-bounces@CS.McGill.CA 
> [mailto:soot-list-bounces@CS.McGill.CA]
> Im Auftrag von kuza55
> Gesendet: Dienstag, 17. Mai 2016 22:02
> An: soot-list@CS.McGill.CA
> Betreff: Re: [Soot-list] Issues with Android Instrumentation Tutorial
> 
> Well, I worked this out in the end.
> 
> When using -cp, it seems to override the -android-jars parameter, so I 
> need to provide the specific android jar on the class path.
> This seems like a bug.
> 
> When I use setSootClassPath, it seems to also remove the apk from the 
> classpath.
> 
> It would be nice if there was an API that added to the classpath 
> without messing with the other options.
> 
> In the end I set -cp
> "C:\\Users\\Alex\\Development\\analyzer\\lib\\android-platforms\\andro
> id-17\
> \android.jar;C:\\Program
> Files\\Java\\jdk1.8.0_91\\jre\\lib\\rt.jar" and it didn't complain.
> 
> On 17 May 2016 at 09:40, kuza55 <kuza55@gmail.com> wrote:
> > Hi,
> > 
> > I'm trying to get the android instrumentation tutorial working:
> > https://github.com/Sable/soot/wiki/Instrumenting-Android-Apps-with-So
> > o
> > t
> > 
> > I'm using nightly builds I download yesterday.
> > 
> > The first thing that happens when I try to run that example is that I 
> > get an error about loading java.lang.Object, so I've followed the 
> > advice to try and added rt.jar to the soot class path, which seems to 
> > resolve that error, however I have not been able to fix the 
> > subsequent errors, and I'm not sure if those errors are related to 
> > how I resolved the java.lang.Object loading error.
> > 
> > If I add this to the AndroidInstrument.java file:
> > 
> > Scene.v().setSootClassPath("C:\\Program
> > Files\\Java\\jdk1.8.0_31\\jre\\lib\\");
> > 
> > Then I get errors loading class files on every apk I try and I'm 
> > pretty confident they're in there since apktool finds them:
> > 
> > soot.SootResolver$SootClassNotFoundException: couldn't find class:
> > com.cps.service.Tools.ExecuteAsRoot (is your soot-class-path set
> > properly?)
> > at soot.SootResolver.bringToHierarchy(SootResolver.java:228)
> > at soot.SootResolver.bringToSignatures(SootResolver.java:266)
> > at soot.SootResolver.processResolveWorklist(SootResolver.java:170)
> > at soot.SootResolver.resolveClass(SootResolver.java:131)
> > at soot.Scene.loadClass(Scene.java:725)
> > at soot.Scene.loadClassAndSupport(Scene.java:710)
> > at soot.Scene.loadNecessaryClasses(Scene.java:1448)
> > at soot.Main.run(Main.java:243)
> > at soot.Main.main(Main.java:147)
> > at 
> > com.blah.analyzer.AndroidInstrument.main(AndroidInstrument.java:98)
> > at
> > com.blah.analyzer.AndroidInstrument.instrument(AndroidInstrument.java:
> > 35) at com.blah.analyzer.App.main(App.java:32)
> > 
> > If I try to set a -cp parameter, I get
> > 
> > soot.SootResolver$SootClassNotFoundException: couldn't find class:
> > android.app.Activity (is your soot-class-path set properly?)
> > 
> > If I try to use -pp I get an odd error that seems to indicate the 
> > docs are wrong about what -pp does:
> > 
> > soot.SootResolver$SootClassNotFoundException: couldn't find class:
> > C:\Program Files\Java\jdk1.8.0_31\jre\lib\ (is your soot-class-path 
> > set properly?)
> > 
> > I'd appreciate any assistance in figuring out what I need to do to 
> > get that example working.
> > 
> > - Alex
> _______________________________________________
> Soot-list mailing list
> Soot-list@CS.McGill.CA
> https://mailman.CS.McGill.CA/mailman/listinfo/soot-list
> 

_______________________________________________
Soot-list mailing list
Soot-list@CS.McGill.CA
https://mailman.CS.McGill.CA/mailman/listinfo/soot-list


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic