mirror of
https://github.com/revanced/Apktool.git
synced 2025-01-05 17:45: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)
|
||||
throws AndrolibException {
|
||||
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();
|
||||
buildSources(appDir, forceBuildAll, debug);
|
||||
|
@ -174,9 +174,13 @@ public class ApkDecoder {
|
||||
private void writeMetaFile() throws AndrolibException {
|
||||
Map<String, Object> meta = new LinkedHashMap<String, Object>();
|
||||
meta.put("version", Androlib.getVersion());
|
||||
meta.put("isFrameworkApk",
|
||||
Boolean.valueOf(mAndrolib.isFrameworkApk(getResTable())));
|
||||
putUsesFramework(meta);
|
||||
|
||||
if (hasResources()) {
|
||||
meta.put("isFrameworkApk",
|
||||
Boolean.valueOf(mAndrolib.isFrameworkApk(getResTable())));
|
||||
putUsesFramework(meta);
|
||||
}
|
||||
|
||||
mAndrolib.writeMetaFile(mOutDir, meta);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user