yuanchun-li/androcov

java.lang.NullPointerException on soot.dexpler.DexAnnotation.handleClassAnnotation(DexAnnotation.java:157)

Opened this issue · 0 comments

I cloned the project and built (with mvn install). The variable ANDROVOV points to the "target/androcov-1.0.jar" file. Here is what I get when trying to instrument the apk of the 2048 game. I tried this on the android.jar for APIs 23 and 28.

wahoo:~/Android/Sdk/platforms/android-23> java -jar ${ANDROCOV} -o com.uberspot.a2048_25.mod.apk -i com.uberspot.a2048_25.apk -sdk android.jar
Apr 10, 2019 2:38:22 PM xyz.ylimit.androcov.Config parseArgs
INFO: finish parsing arguments
Apr 10, 2019 2:38:22 PM xyz.ylimit.androcov.Config parseArgs
INFO: [inputAPK]com.uberspot.a2048_25.apk, [outputDir]/home/damorim/Android/Sdk/platforms/android-23/com.uberspot.a2048_25.mod.apk
Apr 10, 2019 2:38:22 PM xyz.ylimit.androcov.Main main
INFO: OK let's start!
Apr 10, 2019 2:38:22 PM xyz.ylimit.androcov.Instrumenter instrument
INFO: Start instrumenting...
Using 'android.jar' as android.jar
get type from 'I'
get type from 'D'
get type from 'Z'
get type from 'D'
get type from 'Z'
get type from 'Z'
get type from 'J'
get type from 'J'
get type from 'Z'
get type from 'I'
get type from 'I'
Exception in thread "main" java.lang.NullPointerException
at soot.dexpler.DexAnnotation.handleClassAnnotation(DexAnnotation.java:157)
at soot.dexpler.DexClass.makeSootClass(DexClass.java:151)
at soot.dexpler.DexlibWrapper.makeSootClass(DexlibWrapper.java:137)
at soot.dexpler.DexResolver.resolveFromFile(DexResolver.java:60)
at soot.DexClassSource.resolve(DexClassSource.java:52)
at soot.SootResolver.bringToHierarchy(SootResolver.java:237)
at soot.SootResolver.bringToSignatures(SootResolver.java:264)
at soot.SootResolver.processResolveWorklist(SootResolver.java:168)
at soot.SootResolver.resolveClass(SootResolver.java:129)
at soot.dexpler.DexlibWrapper.initialize(DexlibWrapper.java:121)
at soot.dexpler.DexResolver.resolveFromFile(DexResolver.java:57)
at soot.DexClassSource.resolve(DexClassSource.java:52)
at soot.SootResolver.bringToHierarchy(SootResolver.java:237)
at soot.SootResolver.bringToSignatures(SootResolver.java:264)
at soot.SootResolver.processResolveWorklist(SootResolver.java:168)
at soot.SootResolver.resolveClass(SootResolver.java:129)
at soot.Scene.loadClass(Scene.java:694)
at soot.Scene.loadClassAndSupport(Scene.java:679)
at soot.Scene.loadNecessaryClasses(Scene.java:1353)
at xyz.ylimit.androcov.Instrumenter.instrument(Instrumenter.java:53)
at xyz.ylimit.androcov.Main.main(Main.java:15)