[Soot-list] Multiple runtime exceptions when analyzing Android APKs

Alexandre Bartel alexandre.bartel at uni.lu
Fri Jul 26 10:25:42 EDT 2013


Hi Ding Sun,

Thank you for reporting this.
Could you share the apks somewhere so I can reproduce the bugs?

Thanks,
/Alexandre

On Fri, 2013-07-26 at 21:10 +0800, dingsun wrote:
> Hi all, We are recently using soot's android package to analyze Android
> apks.  We followed the online tutorial to generate jimple files from
> apks. We analyzed 40 apks (randomly picked from Google Play), average
> file size is 5 to 8 MB and the maximum is 25 MB. However we encountered
> several problems, which may be caused by soot bugs.(1) 25% apk analysis
> stopped due to java.lang.OutOfMemoryError, although we have allocated
> 8GB memory for the analysis.(2) 35% apk analysis crashed due to various
> soot internal exceptions:” java.lang.RuntimeException: Unhandled type
> bottom_type”,“soot.AbstractSootFieldRef$FieldResolutionFailedException:
> Class android.content.pm.ActivityInfo doesn't have field
> parentActivityName : java.lang.String; failed to resolve in
> superclasses and interfacesLooking in
> android.content.pm.ActivityInfo”,“java.lang.ClassCastException:
> soot.RefType cannot be cast to
> soot.ArrayType”,“java.lang.ClassCastException”,“Unexpected type
> null”,“java.lang.RuntimeException: Trying to create interface invoke
> expression for non-interface type:
> com.android.vending.billing.IMarketBillingService Use
> JVirtualInvokeExpr or JSpecialInvokeExpr instead!”soot.RefType cannot
> be cast to soot.ArrayType Our analyzing program only contains the
> following code:                             
> //////////////////////////////                       public String[]
> sootArgs={"-allow-phantom-refs", "-p", "jb"		
>             , "use-original-names:true", "-w", "-p", "cg",
> "all-reachable:true", 			             "-p", "cg",
> "verbose:true", "-include-all",			             
> "-android-jars","D:\\soot_android\\Soot_android-platforms-master",
>               "-process-dir","D:\\soot_android\\app.apk"};
>                          G.v().reset();		
> Options.v().set_src_prec(Options.src_prec_apk);		
> Options.v().set_output_format(Options.output_format_J);  //output as
> Jimple		
> Options.v().set_output_dir("D:\\soot_android\\processedResult");	
> soot.Main.main(sootArgs);                       
> //////////////////////////////The soot and android package is
> downloaded from Github (develop branch). We can share the complete
> program and the apks. We would like to cut down the error rate, likely
> say down to 15 to 20%. We would highly appreciate if you could give us
> suggestions. Best regards,Ding Sun  		 	   	
>   _______________________________________________ Soot-list mailing
> list Soot-list at sable.mcgill.ca
> http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list




More information about the Soot-list mailing list