soot-oss / soot

Soot - A Java optimization framework
GNU Lesser General Public License v2.1
2.85k stars 705 forks source link

soot.SootResolver$SootClassNotFoundException when ... (is your soot-class-path set properly?) #1240

Open dima78442 opened 4 years ago

dima78442 commented 4 years ago

Steps to reproduce: 1.) ...

Files used to reproduce: ...

Soot version:

trunk

Command line:

-android-jars /Users/dima/Downloads/android-platforms -process-dir /Users/dima/Desktop/app-debug.apk

Max Memory:

3641MB

Stack trace:

soot.SootResolver$SootClassNotFoundException: couldn't find class: sun.misc.Unsafe (is your soot-class-path set properly?)
    at soot.SootResolver.bringToHierarchyUnchecked(SootResolver.java:232)
    at soot.SootResolver.bringToHierarchy(SootResolver.java:214)
    at soot.SootResolver.processResolveWorklist(SootResolver.java:175)
    at soot.SootResolver.resolveClass(SootResolver.java:134)
    at soot.dexpler.DexlibWrapper.initialize(DexlibWrapper.java:150)
    at soot.dexpler.DexResolver.initializeDexFile(DexResolver.java:81)
    at soot.dexpler.DexResolver.resolveFromFile(DexResolver.java:62)
    at soot.DexClassSource.resolve(DexClassSource.java:63)
    at soot.SootResolver.bringToHierarchyUnchecked(SootResolver.java:240)
    at soot.SootResolver.bringToHierarchy(SootResolver.java:214)
    at soot.SootResolver.bringToSignatures(SootResolver.java:279)
    at soot.SootResolver.processResolveWorklist(SootResolver.java:172)
    at soot.SootResolver.resolveClass(SootResolver.java:134)
    at soot.Scene.loadClass(Scene.java:968)
    at soot.Scene.loadClassAndSupport(Scene.java:953)
    at soot.Scene.loadNecessaryClasses(Scene.java:1775)
    at soot.Main.run(Main.java:241)
    at soot.Main.main(Main.java:141)
    at com.company.AndroidInstrument.main(AndroidInstrument.java:83)

can you help I used this guide: https://github.com/Sable/soot/wiki/Instrumenting-Android-Apps-with-Soot I did everything as you wrote there, can you help pls? If issue is with soot-class-path, then how to set it?

anddann commented 4 years ago

Can you please try the newest soot version https://repo1.maven.org/maven2/ca/mcgill/sable/soot/4.0.0/