shwenzhang / AndResGuard

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

App not installed #417

Closed mukswilly closed 4 years ago

mukswilly commented 4 years ago

Screenshot_20200525-011013_1590358347858

There's a problem with the tool. when I compile my app release with Android studio without using the Andresguard tool, my app installs well on devices. however, when I use andResguard, I can't install the app on the same devices. the "App not installed" message shows up even after uninstalling the app previously.

simpleton commented 4 years ago

what kinda error you get during adb installing?

mukswilly commented 4 years ago

well, I am not using adb to push the app to the device. rather, I obtain the generated signed apk by Andresguard and install it manually. ie sending the app to my phone via mtp and then installing it. however, I think the problem is with signing because when I use android studio and sign my app with v1 or v2 not both, I encounter the same scenario, it's only after signing with both v1 and v2 that my app can then be installed. My thinking is that during the signing process, andResguard uses only one signing version ie v2 or v1 but not both thus reproducing the same error. Is there a way andResguard can be configured to use both v1 and v2 at the same time. thanks for your reply.

mukswilly commented 4 years ago

UPDATE: I have experimented with the signing. it seems not to be the problem, either v1 or v2 works perfectly. However now when it comes to using Andresguard, I don't know the cause of the problem. Any ideas please

zhaobozhen commented 4 years ago

Same problem after upgrading AGP to 4.0.0 and AndResGuard to 1.2.18.

whoze commented 4 years ago

Same problem after upgrading AGP to 4.0.0 and AndResGuard to 1.2.18.

+1

simpleton commented 4 years ago

can you guys share a sample apk that could reproduce this issue?

zhaobozhen commented 4 years ago

can you guys share a sample apk that could reproduce this issue?

App1 This is my app built with v1 and v2 signature. App2 This is my app built with AndResGuard.

fengxin0210fx commented 4 years ago

我也是啊

fengxin0210fx commented 4 years ago

提示: 1:安装包无效或不完整 2:该安装包与操作系统不兼容。 华为手机上安装的。

xDragonZ commented 4 years ago

:/ $ su :/ # pm install -R /sdcard/test.apk

Failure [-124: Failed parse during installPackageLI: Targeting R+ (version 30 and above) requires the resources.arsc of installed APKs to be stored uncompressed and aligned on a 4-byte boundary]

xDragonZ commented 4 years ago

@shwenzhang @simpleton any update on this to support android SDK target 30?

1794208519 commented 4 years ago

android 11使用v1和v2签名必现无法安装。

simpleton commented 4 years ago

Addressed Android R+ issue in https://github.com/shwenzhang/AndResGuard/commit/a6a955b040b0267af6f12871fc7cc9fd96448221

yj82871002 commented 4 years ago

使用as 4.0.1新建一个工程集成AndResGuard后,minSdkVersion 如果小于等于22则生成的APK可正常安装。如果minSdkVersion大于等于23则安装失败。这该如何解决?

simpleton commented 4 years ago

使用as 4.0.1新建一个工程集成AndResGuard后,minSdkVersion 如果小于等于22则生成的APK可正常安装。如果minSdkVersion大于等于23则安装失败。这该如何解决?

你使用的什么版本?

zhaobozhen commented 4 years ago

使用as 4.0.1新建一个工程集成AndResGuard后,minSdkVersion 如果小于等于22则生成的APK可正常安装。如果minSdkVersion大于等于23则安装失败。这该如何解决?

你使用的什么版本?

我使用 1.2.18 版本,也存在这个问题

yj82871002 commented 4 years ago

使用as 4.0.1新建一个工程集成AndResGuard后,minSdkVersion如果小于等于22则生成的APK可正常安装。如果minSdkVersion大于等于23则安装失败。这该如何解决?

你使用的什么版本?

1.2.18

simpleton commented 4 years ago

target sdk是多少呢?可否试下1.2.19?

On Mon, Sep 14, 2020 at 10:39 PM yj82871002 notifications@github.com wrote:

使用as 4.0.1新建一个工程集成AndResGuard后,minSdkVersion如果小于等于22则生成的APK可正常安装。如果minSdkVersion大于等于23则安装失败。这该如何解决?

你使用的什么版本?

1.2.18

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/shwenzhang/AndResGuard/issues/417#issuecomment-692476945, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADO6YTTVOLLQ4SPLBSW5WDSF342BANCNFSM4NJCFWFA .

yj82871002 commented 4 years ago

target sdk是多少呢?可否试下1.2.19? On Mon, Sep 14, 2020 at 10:39 PM yj82871002 @.***> wrote: 使用as 4.0.1新建一个工程集成AndResGuard后,minSdkVersion如果小于等于22则生成的APK可正常安装。如果minSdkVersion大于等于23则安装失败。这该如何解决? 你使用的什么版本? 1.2.18 — You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub <#417 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADO6YTTVOLLQ4SPLBSW5WDSF342BANCNFSM4NJCFWFA .

我试了最新版1.2.19 依然存在同样的问题 buildToolsVersion "30.0.2" targetSdkVersion 30

lwj1994 commented 3 years ago

1.2.20 has same bug,minsdk 23