1. 下载
开源项目:https://github.com/rover12421/ShakaApktool
下方有百度云链接
https://pan.baidu.com/s/1jIPOHZg#list/path=%2F 密码: ht4j
ShakaApktool
原网址:
https://ibotpeaches.github.io/Apktool/
2. 出现错误信息
- 重打包
I: 使用 ShakaApktool 3.0.0-master-f1e0a9f-20160905
I: 检查是否有被修改的代码...
I: 检查是否有被修改的代码...
I: 检查是否有被修改的资源...
I: 正在编译资源...
I: No resource identifier found for attribute 'roundIcon' in package 'android'
I: 正在编译apk文件...
I: No resource identifier found for attribute 'roundIcon' in package 'android'
I: 复制未知文件/目录...
Cleaning up unclosed ZipFile for archive C:\Users\ADMINI~1\AppData\Local\Temp\APKTOOL553373901732837
9178.tmp
重签名,安装
D:\tool-signapk>adb install debugsign.apk
debugsign.apk: 1 file pushed. 2.8 MB/s (28225395 bytes in 9.461s)
pkg: /data/local/tmp/debugsign.apk
Failure [INSTALL_PARSE_FAILED_UNEXPECTED_EXCEPTION]
- 圆角错误信息
错误描述:重打包时,使用原生 apktool 重打包为 apk 时出现的错误信息
问题解决:在将要重打包的应用的 android:roundIcon="@mipmap/ic_launcher_round"
属性条目删除。这里只是缓兵之策,没有完全解决。这是针对 7.0 后的 sdk 编译出现的。
注意:在更改 xml 时,不要在原生的 xml 文件内添加新的条目。要使用原生的 apktool
D:\tool-apktool>apktool.bat b bei_raw -o bei_raw_get.apk
I: Using Apktool 2.3.1
I: Checking whether sources has changed...
I: Smaling smali folder into classes.dex...
I: Checking whether sources has changed...
I: Smaling smali_classes2 folder into classes2.dex...
I: Checking whether resources has changed...
I: Building resources...
W: D:\tool-apktool\bei_raw\AndroidManifest.xml:39: error: No resource identifier found for attribute
'roundIcon' in package 'android'
W:
Exception in thread "main" brut.androlib.AndrolibException: brut.androlib.AndrolibException: brut.co
mmon.BrutException: could not exec (exit code = 1): [C:\Users\ADMINI~1\AppData\Local\Temp\brut_util_
Jar_4007735017828452559.tmp, p, --forced-package-id, 127, --min-sdk-version, 21, --target-sdk-versio
n, 22, --version-code, 1, --version-name, 1.0, --no-version-vectors, -F, C:\Users\ADMINI~1\AppData\L
ocal\Temp\APKTOOL5466170728064123694.tmp, -0, arsc, -0, txt, -0, arsc, -I, C:\Users\Administrator\Ap
pData\Local\apktool\framework\1.apk, -S, D:\tool-apktool\bei_raw\res, -M, D:\tool-apktool\bei_raw\An
droidManifest.xml]
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:492)
at brut.androlib.Androlib.buildResources(Androlib.java:426)
at brut.androlib.Androlib.build(Androlib.java:305)
at brut.androlib.Androlib.build(Androlib.java:270)
at brut.apktool.Main.cmdBuild(Main.java:227)
at brut.apktool.Main.main(Main.java:75)
Caused by: brut.androlib.AndrolibException: brut.common.BrutException: could not exec (exit code = 1
): [C:\Users\ADMINI~1\AppData\Local\Temp\brut_util_Jar_4007735017828452559.tmp, p, --forced-package-
id, 127, --min-sdk-version, 21, --target-sdk-version, 22, --version-code, 1, --version-name, 1.0, --
no-version-vectors, -F, C:\Users\ADMINI~1\AppData\Local\Temp\APKTOOL5466170728064123694.tmp, -0, ars
c, -0, txt, -0, arsc, -I, C:\Users\Administrator\AppData\Local\apktool\framework\1.apk, -S, D:\tool-
apktool\bei_raw\res, -M, D:\tool-apktool\bei_raw\AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:456)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:478)
... 5 more
Caused by: brut.common.BrutException: could not exec (exit code = 1): [C:\Users\ADMINI~1\AppData\Loc
al\Temp\brut_util_Jar_4007735017828452559.tmp, p, --forced-package-id, 127, --min-sdk-version, 21, -
-target-sdk-version, 22, --version-code, 1, --version-name, 1.0, --no-version-vectors, -F, C:\Users\
ADMINI~1\AppData\Local\Temp\APKTOOL5466170728064123694.tmp, -0, arsc, -0, txt, -0, arsc, -I, C:\User
s\Administrator\AppData\Local\apktool\framework\1.apk, -S, D:\tool-apktool\bei_raw\res, -M, D:\tool-
apktool\bei_raw\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:95)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:450)
... 6 more
网友评论