mirror of
https://github.com/revanced/Apktool.git
synced 2025-01-08 11:05:52 +01:00
ApkDecoder.writeMetaFile(): don't write isFrameworkApk and usesFramework if apk doesn't contain resources.
This commit is contained in:
parent
18c3f0cf7b
commit
517877c665
@ -150,7 +150,8 @@ public class Androlib {
|
|||||||
public void build(ExtFile appDir, boolean forceBuildAll, boolean debug)
|
public void build(ExtFile appDir, boolean forceBuildAll, boolean debug)
|
||||||
throws AndrolibException {
|
throws AndrolibException {
|
||||||
Map<String, Object> meta = readMetaFile(appDir);
|
Map<String, Object> meta = readMetaFile(appDir);
|
||||||
boolean framework = (Boolean) meta.get("isFrameworkApk");
|
Object t1 = meta.get("isFrameworkApk");
|
||||||
|
boolean framework = t1 == null ? false : (Boolean) t1;
|
||||||
|
|
||||||
new File(appDir, APK_DIRNAME).mkdirs();
|
new File(appDir, APK_DIRNAME).mkdirs();
|
||||||
buildSources(appDir, forceBuildAll, debug);
|
buildSources(appDir, forceBuildAll, debug);
|
||||||
|
@ -174,9 +174,13 @@ public class ApkDecoder {
|
|||||||
private void writeMetaFile() throws AndrolibException {
|
private void writeMetaFile() throws AndrolibException {
|
||||||
Map<String, Object> meta = new LinkedHashMap<String, Object>();
|
Map<String, Object> meta = new LinkedHashMap<String, Object>();
|
||||||
meta.put("version", Androlib.getVersion());
|
meta.put("version", Androlib.getVersion());
|
||||||
|
|
||||||
|
if (hasResources()) {
|
||||||
meta.put("isFrameworkApk",
|
meta.put("isFrameworkApk",
|
||||||
Boolean.valueOf(mAndrolib.isFrameworkApk(getResTable())));
|
Boolean.valueOf(mAndrolib.isFrameworkApk(getResTable())));
|
||||||
putUsesFramework(meta);
|
putUsesFramework(meta);
|
||||||
|
}
|
||||||
|
|
||||||
mAndrolib.writeMetaFile(mOutDir, meta);
|
mAndrolib.writeMetaFile(mOutDir, meta);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user