mirror of
https://github.com/revanced/Apktool.git
synced 2024-12-12 05:47:46 +01:00
Treat all manifests as RAW
This commit is contained in:
parent
de8e6d95e3
commit
749ce67c4b
@ -3,7 +3,7 @@
|
||||
|
||||
<groupId>brut.apktool</groupId>
|
||||
<artifactId>apktool-lib</artifactId>
|
||||
<version>1.4.9-SNAPSHOT</version>
|
||||
<version>1.4.10-SNAPSHOT</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<parent>
|
||||
|
@ -33,7 +33,6 @@ import java.util.Map;
|
||||
import java.util.logging.Logger;
|
||||
import org.yaml.snakeyaml.DumperOptions;
|
||||
import org.yaml.snakeyaml.Yaml;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
/**
|
||||
* @author Ryszard Wiśniewski <brut.alll@gmail.com>
|
||||
@ -95,7 +94,13 @@ public class Androlib {
|
||||
|
||||
public void decodeManifestFull(ExtFile apkFile, File outDir,
|
||||
ResTable resTable) throws AndrolibException {
|
||||
mAndRes.decodeManifest(resTable, apkFile, outDir);
|
||||
try {
|
||||
Directory apk = apkFile.getDirectory();
|
||||
LOGGER.info("Copying raw manifest...");
|
||||
apkFile.getDirectory().copyToDir(outDir, APK_MANIFEST_FILENAMES);
|
||||
} catch (DirectoryException ex) {
|
||||
throw new AndrolibException(ex);
|
||||
}
|
||||
}
|
||||
|
||||
public void decodeResourcesRaw(ExtFile apkFile, File outDir)
|
||||
|
@ -105,13 +105,14 @@ public class ApkDecoder {
|
||||
// attribute references
|
||||
if (hasManifest()) {
|
||||
switch (mDecodeResources) {
|
||||
case DECODE_RESOURCES_FULL:
|
||||
case DECODE_RESOURCES_NONE:
|
||||
mAndrolib.decodeManifestRaw(mApkFile, outDir);
|
||||
break;
|
||||
case DECODE_RESOURCES_FULL:
|
||||
mAndrolib.decodeManifestFull(mApkFile, outDir,
|
||||
getResTable());
|
||||
break;
|
||||
// case DECODE_RESOURCES_FULL:
|
||||
// mAndrolib.decodeManifestFull(mApkFile, outDir,
|
||||
// getResTable());
|
||||
// break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,36 +0,0 @@
|
||||
/**
|
||||
* Copyright 2011 Ryszard Wiśniewski <brut.alll@gmail.com>
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package brut.androlib.res.data.value;
|
||||
|
||||
import brut.androlib.AndrolibException;
|
||||
import brut.androlib.res.data.ResResource;
|
||||
import java.io.IOException;
|
||||
import org.xmlpull.v1.XmlSerializer;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author peaches
|
||||
*/
|
||||
public class ResLayoutValue {
|
||||
|
||||
public void serializeToResValuesXml(XmlSerializer serializer, ResResource res) throws IOException, AndrolibException {
|
||||
serializer.startTag(null, "item");
|
||||
serializer.attribute(null, "type", res.getResSpec().getType().getName());
|
||||
serializer.attribute(null, "name", res.getResSpec().getName());
|
||||
serializer.endTag(null, "item");
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user