shwenzhang / AndResGuard

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

混淆重打包的时候把META-INF下面的除了签名信息之后,其他都文件都删了? #322

Closed pmathticol closed 3 years ago

pmathticol commented 5 years ago

最近因为项目当中用到了协程,然后发现通过资源混淆出来的apk又遇到协程使用不正常,最后发现apk的区别是资源混淆删了META_INF中的很多文件信息。这个有遇到过么。求解决

simpleton commented 5 years ago

Meta-inf 和协程有什么联系呢?是缺少了哪些信息呢?可否提供一下LOG

On Thu, Apr 18, 2019, 11:19 PM 潘志舟 notifications@github.com wrote:

最近因为项目当中用到了协程,然后发现通过资源混淆出来的apk又遇到协程使用不正常,最后发现apk的区别是资源混淆删了META_INF中的很多文件信息。这个有遇到过么。求解决

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/shwenzhang/AndResGuard/issues/322, or mute the thread https://github.com/notifications/unsubscribe-auth/AADO6YS7FAS4CJ6YHGRTPLDPRFP7BANCNFSM4HHCGQQA .

pmathticol commented 5 years ago

之前怀疑是Meta-inf里面丢失了kotlin_module信息导致的,但是我将packageOpitions里面主动去掉kotlin_module信息之后,还是不能使用协程,所以可能和Meta-inf没有关系,具体表现是经过资源混淆之后,调用koltin协程startCorountine之后,并没有执行到内部,去掉资源混淆就没问题。

pmathticol commented 5 years ago

Meta-inf 和协程有什么联系呢?是缺少了哪些信息呢?可否提供一下LOG On Thu, Apr 18, 2019, 11:19 PM 潘志舟 @.***> wrote: 最近因为项目当中用到了协程,然后发现通过资源混淆出来的apk又遇到协程使用不正常,最后发现apk的区别是资源混淆删了META_INF中的很多文件信息。这个有遇到过么。求解决 — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#322>, or mute the thread https://github.com/notifications/unsubscribe-auth/AADO6YS7FAS4CJ6YHGRTPLDPRFP7BANCNFSM4HHCGQQA .

GlobalScope.async { val rsp=sendRequest() withContext(Dispatchers.Main) { updateUI(rsp) } } 具体来说就是上面这段代码,在经过资源混淆混淆之后,updateUi就不能执行了

simpleton commented 5 years ago

@pmathticol 你这边有简单的repo可以复现这个问题么?

pmathticol commented 5 years ago

@pmathticol 你这边有简单的repo可以复现这个问题么? demo地址在这里,必现。

https://github.com/pmathticol/resGuardAndCoroutineDemo

pmathticol commented 5 years ago

@pmathticol 你这边有简单的repo可以复现这个问题么?

我已经修复了。改了一下资源混淆重打包的流程,除了RF,SF,RSA文件重新生成,其他文件应该保留,否则协程使用会有问题。

zhaozepeng commented 5 years ago

@simpleton 这个问题现在有处理么?

simpleton commented 5 years ago

不好意思,还没有看。最近有点忙,我周末看一下这个问题

On Tue, Jun 4, 2019 at 4:19 AM Shawn_Dut notifications@github.com wrote:

@simpleton https://github.com/simpleton 这个问题现在有处理么?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/shwenzhang/AndResGuard/issues/322?email_source=notifications&email_token=AADO6YXD3JUPHQJ46QTVAALPYZFT3A5CNFSM4HHCGQQKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODW4HY3Q#issuecomment-498629742, or mute the thread https://github.com/notifications/unsubscribe-auth/AADO6YQ7VJPPGRIXUYEHOOTPYZFT3ANCNFSM4HHCGQQA .

zhaozepeng commented 5 years ago

不好意思,还没有看。最近有点忙,我周末看一下这个问题 On Tue, Jun 4, 2019 at 4:19 AM Shawn_Dut @.***> wrote: @simpleton https://github.com/simpleton 这个问题现在有处理么? — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#322?email_source=notifications&email_token=AADO6YXD3JUPHQJ46QTVAALPYZFT3A5CNFSM4HHCGQQKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODW4HY3Q#issuecomment-498629742>, or mute the thread https://github.com/notifications/unsubscribe-auth/AADO6YQ7VJPPGRIXUYEHOOTPYZFT3ANCNFSM4HHCGQQA .

麻烦了~

zhaozepeng commented 5 years ago

@simpleton 这里有解决么?

zhaozepeng commented 5 years ago

想问一下这里的进展

qintong91 commented 5 years ago

https://github.com/shwenzhang/AndResGuard/commit/46a24edda384769de290173dd7ab27fb381bfdd2 这个commit是已经修复这个问题了吧?

zhaozepeng commented 5 years ago

@simpleton 这里在最新版本有修复么?

zhaozepeng commented 5 years ago

@simpleton 这里能同步下进度么?或者有修改的计划么?

liangDawn commented 5 years ago

@simpleton 这里能同步下进度么?或者有修改的计划么?

liao123abc commented 5 years ago

@simpleton 这里能同步下进度么?或者有修改的计划么?

zhaozepeng commented 5 years ago

@liangDawn @liangDawn @qintong91 问题应该是已经修复了