Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

个别情况下, string 看起来不会被fog,字面量?编译器优化将常量直接带入? #111

Open
phoenixsky opened this issue May 15, 2023 · 3 comments
Labels

Comments

@phoenixsky
Copy link

phoenixsky commented May 15, 2023

image

@phoenixsky phoenixsky changed the title kotlin 中的const string 看起来不会被fog 个别情况下, string 看起来不会被fog,字面量?编译器优化将常量直接带入? May 15, 2023
@MegatronKing
Copy link
Owner

stringfog库用的是哪个版本?如果是5.0.0,有可能,已经不直接依赖ASM库了而是依赖AGP的接口,有可能行为出现了变更。

@phoenixsky
Copy link
Author

v4.0.1 ,不知道我的项目哪里的东西影响了。我重新搞了demo工程,是可以被混淆的

@HolenZhou
Copy link

HolenZhou commented Jun 28, 2023

我也有类似的问题。是编译器优化,将常量直接替换为硬编码字符串了。
比如我在我的类Utils中引用了android.provider包下的MediaStore类中的一个常量,这个常量预期是不要进行加密,也没有对其包名进行配置,但打包后还是加密了,因为打包后这个常量已经被替换为硬编码字符串了。
想请教下有办法能避免这种情况吗?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants