sireum / archived-v2-amandroid

34 stars 16 forks source link

java.lang.AssertionError: assertion failed #15

Closed maqsoodahmadjan closed 9 years ago

maqsoodahmadjan commented 9 years ago

I developed some simple apps in Android Studio and when I tried to analyze them with Amandroid taintAnalysis cli, I got the following error. I still can analyze other apps, but not those which I developed in Android Studio.

java.lang.AssertionError: assertion failed at scala.Predef$.assert(Predef.scala:151) at org.sireum.amandroid.parser.ARSCFileParser.readResourceHeader(ARSCFileParser.scala:901) at org.sireum.amandroid.parser.ARSCFileParser.doParse(ARSCFileParser.scala:761) at org.sireum.amandroid.parser.ARSCFileParser$$anon$1.handleXMLFile(ARSCFileParser.scala:749) at org.sireum.amandroid.parser.AbstractAndroidXMLParser.handleAndroidXMLFiles(AbstractAndroidXMLParser.scala:52) at org.sireum.amandroid.parser.ARSCFileParser.parse(ARSCFileParser.scala:743) at org.sireum.amandroid.appInfo.AppInfoCollector$.analyzeARSC(AppInfoCollector.scala:197) at org.sireum.amandroid.appInfo.AppInfoCollector.collectInfo(AppInfoCollector.scala:153) at org.sireum.amandroid.security.AmandroidSocket.loadApk(AmandroidSocket.scala:86) at org.sireum.amandroid.cli.TanitAnalysis$$anonfun$taintAnalyze$1.apply(TaintAnalysis.scala:162) at org.sireum.amandroid.cli.TanitAnalysis$$anonfun$taintAnalyze$1.apply(TaintAnalysis.scala:157) at scala.collection.immutable.Set$Set1.foreach(Set.scala:79) at org.sireum.amandroid.cli.TanitAnalysis$.taintAnalyze(TaintAnalysis.scala:156) at org.sireum.amandroid.cli.TanitAnalysis$.main(TaintAnalysis.scala:137) at org.sireum.amandroid.cli.TanitAnalysis.main(TaintAnalysis.scala)

fgwei commented 9 years ago

This is an ARSC file parse error, caused by the new version of android. I will find a way to adjust those new changes.

maqsoodahmadjan commented 9 years ago

Do you plan to fix it soon?

maqsoodahmadjan commented 9 years ago

The work around with the new SDK is to build the app using an older version of the build-tool. For example, I modified the gradle script and changed the build-tool to '19.1' and Amandroid properly analyzed the generated APK.

fgwei commented 9 years ago

I see. Thanks for the information. I'm now doing internship at Samsung R&D, so some times response little late. :P

fgwei commented 9 years ago

I've updated the ARSC parser in the develop branch. You can try it and now it should works fine for the new version of SDK.