diff --git a/src/brut/androlib/Androlib.java b/src/brut/androlib/Androlib.java index 94a3f320..b8eac992 100644 --- a/src/brut/androlib/Androlib.java +++ b/src/brut/androlib/Androlib.java @@ -150,7 +150,8 @@ public class Androlib { public void build(ExtFile appDir, boolean forceBuildAll, boolean debug) throws AndrolibException { Map 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); diff --git a/src/brut/androlib/ApkDecoder.java b/src/brut/androlib/ApkDecoder.java index 477d6a66..b6de62bc 100644 --- a/src/brut/androlib/ApkDecoder.java +++ b/src/brut/androlib/ApkDecoder.java @@ -174,9 +174,13 @@ public class ApkDecoder { private void writeMetaFile() throws AndrolibException { Map meta = new LinkedHashMap(); 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); }