Thanks!
Looks like Android has change a bit over the years, because last I dug into it, it wasn't even JIT.
One more question about security...
I understand that any app (iOS/Android/WP) can be decompiled/cracked, but as I understand it with iOS you don't get very readable code and it's near worthless to use.
I remember Android apps getting hacked and Google removed some 50 apps because they were rebadged by someone other than the original programmer.
Is this still the case, or is Android more secure now?
I'm not talking about malware, I understand that's a whole different issue.
Thanks again.
Decompiling and security have nothing to do with each other. OpenSSL is open source, so the source code is readily available (even better than decompiling), but that doesn't make it insecure. Windows is closed source, but that doesn't make it secure. All decompiling will ever do is revert compiled code to source code, so it doesn't have anything to do with security.
The following is my understanding of how different languages are compiled/decompiled (I'm by no means an authoritative source on the matter and I defer to anyone who says I'm wrong here)
- Compiled code in most languages removes all of the comments - this is true for all of the languages you mentioned in your post. This means the comments from the original source code can't come back. (Python does not do this... some comments are kept as DocStrings so that you can inspect the code at run time. Other comments are discarded.)
- In C and C++, all symbol names are removed and replaced with numeric identifiers. In Obj-C and Java, this happens with some variables, but method names are left intact. This helps Obj-C be a dynamic language. Java does it to facilitate Reflection and so that you can write plugins for compiled java applications without needing the source code of the application. So local variable names can't be brought back during decompilation, but public methods and package names can be brought back.
- All type checking in Java is done prior to compilation - during compilation, types are thrown out. None of the other languages keep types around in the compiled code, either. Based on which publicly available libraries are being called with each variable, it's possible to come up with some of the types during decompilation.
- Functions and loops and whatnot are replaced with what amounts to GOTOs. What was originally a for loop may become a while loop during decompilation and vice-versa.
Any code in any language can be decompiled, modified, and recompiled. I wouldn't worry about it, though.