简体   繁体   English

逆向工程Android应用程序时Smali代码与Java源代码

[英]Smali code vs Java source code when reverse engineering an android app

I'm just looking at android reverse engineering tutorials and I notice that most of them are modifying the smali code instead of the actual java source code after apk has been decompiled, is there a reason for this? 我只是看看android逆向工程教程,我注意到他们中的大多数都是在修改apk后修改smali代码而不是实际的java源代码,这有什么原因吗?

Any help is appreciated. 任何帮助表示赞赏。

Thanks 谢谢

Most of the time, what you get from decompiling is not complete/correct/compilable Java source. 大多数情况下,您从反编译中获得的不是完整/正确/可编译的Java源代码。

It's just a hard problem to infer (Java) sourcecode from bytecode. 这只是一个很难的问题,以推断字节码(Java)的源代码。 Also, certain information from the sourcecode may just be missing from the compiled form, eg names of local variables or parameters, so there's no way to restore them through decompiling. 此外,源代码中的某些信息可能只是从编译的表单中丢失,例如局部变量或参数的名称,因此无法通过反编译来恢复它们。

In comparison, translating byte codes to low level (smali) instructions (and vice versa) is trivial. 相比之下,将字节代码转换为低级(smali)指令(反之亦然)是微不足道的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM