LightBlog

samedi 28 mars 2015

[Q] Why would this Smali have so many random getClass() calls?

I've been poking around the Service Mode app from my T-Mobile Note 4. Most of it's pretty straightforward, but I've found a bunch of places that have seemingly useless chunks of getClass() calls. Here's an example: http://ift.tt/1BGj2Mf.



It's a call that should always succeed, that should have no side effects (since the class will already have been loaded), and whose return value is being ignored. Oh, and is being called 5 times at the start of a line, if the debug info is to be trusted. I don't see any check-cast ops, and I can't think of any reason you'd want to try casting constant integers to a class, anyway.



Am I missing something here? Did Samsung write some really weird code? Or is this a side effect of something gone wrong with the deodexing or baksmali process?





from xda-developers http://ift.tt/1D2LgVR

via IFTTT

Aucun commentaire:

Enregistrer un commentaire