shwenzhang / AndResGuard

proguard resource for Android by wechat team
Apache License 2.0
8.54k stars 1.54k forks source link

能否单独keep住某个模块 #144

Open fengqingxiuyi opened 7 years ago

fengqingxiuyi commented 7 years ago

能否单独keep住某个模块

比如:目前我司客服接入了智齿客服(是一个jar包),其内部几乎所有id,layout,anim等都是通过getIdentifier的方式实现的,详细代码如下:

image

image

simpleton commented 7 years ago

@fengqingxiuyi 暂时没有这个功能,但白名单是支持通配符的。

fengqingxiuyi commented 7 years ago

想问一下,像第二张图这种情况,如果出现像notReadInfo之类的非sobot开头的id,肯定要加入白名单的,如果jar包升级了,部分资源可能会发生变化(比如:新增),如果新增的资源或id非sobot开头,就还要手动加入白名单,比较麻烦,也容易遗漏,有木有好的想法

simpleton commented 7 years ago

这个库最早的设计是输入、输出都是一个apk,所以不了解模块内的资源。后续考虑会加入已模块为粒度的白名单机制,如果您有好的版本也可以随时提出。

2017-03-22 15:41 GMT+08:00 风清袖一 notifications@github.com:

想问一下,像第二张图这种情况,如果出现像notReadInfo之类的非sobot开头的id,肯定要加入白名单的,如果jar包升级了, 部分资源可能会发生变化(比如:新增),如果新增的资源或id非sobot开头,就还要手动加入白名单,比较麻烦,也容易遗漏,有木有好的想法

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/shwenzhang/AndResGuard/issues/144#issuecomment-288321351, or mute the thread https://github.com/notifications/unsubscribe-auth/AAbvYp5aeDMEs8toJHz5Ulb0KZnJDYluks5roNC7gaJpZM4MkxUz .

fengqingxiuyi commented 7 years ago

我们后来没有使用AndResGuard

2017-09-28 14:53 GMT+08:00 single-lee notifications@github.com:

我也遇到了同样的问题,也是因为sobot库导致无法使用。希望大神能早日实现这个功能啊。 不知道@fengqingxiuyi https://github.com/fengqingxiuyi 最后的解决方案是什么?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/shwenzhang/AndResGuard/issues/144#issuecomment-332745090, or mute the thread https://github.com/notifications/unsubscribe-auth/ATiw7zxOogUHB06KHrIxUNCBShJoe1Eaks5sm0J4gaJpZM4MkxUz .

simpleton commented 7 years ago

可否给example做一个加入那个会出问题的lib 的PR呢,我这边想想有没有办法除了白名单外来fix这个问题

On Oct 4, 2017 7:42 AM, "风清袖一" notifications@github.com wrote:

我们后来没有使用AndResGuard

2017-09-28 14:53 GMT+08:00 single-lee notifications@github.com:

我也遇到了同样的问题,也是因为sobot库导致无法使用。希望大神能早日实现这个功能啊。 不知道@fengqingxiuyi https://github.com/fengqingxiuyi 最后的解决方案是什么?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/shwenzhang/AndResGuard/issues/ 144#issuecomment-332745090, or mute the thread https://github.com/notifications/unsubscribe-auth/ ATiw7zxOogUHB06KHrIxUNCBShJoe1Eaks5sm0J4gaJpZM4MkxUz .

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/shwenzhang/AndResGuard/issues/144#issuecomment-334178224, or mute the thread https://github.com/notifications/unsubscribe-auth/AAbvYgmdmJ5R4op8KzEJrOhj2K7AHmwFks5so5kxgaJpZM4MkxUz .

ideav5 commented 6 years ago

现在是否可以keep 某个module 资源不被混淆了?

ideav5 commented 6 years ago

每个module 都有个R.java ,如果keep 整个R.java文件里面的static 是不是可以了,或者指定混淆的module,只获取该module R.java文件下的资源,其他均不混淆

JianGsHanz commented 5 years ago

能否单独keep住某个模块

比如:目前我司客服接入了智齿客服(是一个jar包),其内部几乎所有id,layout,anim等都是通过getIdentifier的方式实现的,详细代码如下:

image

image

一个个加的 "R.color.sobot*", "R.drawable.sobot", "R.layout.sobot_", "R.string.sobot*", "R.dimen.sobot", "R.integer.sobot_", "R.id.sobot*", "R.id.drop", "R.id.send_", "R.id.rl*", "R.id.view*", "R.id.notReadInfo",

ysbing commented 5 years ago

或者可以在Gradle Plugin运行打包的时候为置顶module的资源注入一些特殊字符,在进行资源混淆的时候,识别到有这些特殊字符,自动跳过这些资源的混淆工作。

simpleton commented 5 years ago

@shwenzhang 按模块keep有什么思路么? @dodola