mirror of
https://github.com/revanced/Apktool.git
synced 2025-05-02 15:04:24 +02:00
preventing decompile of public.xml, and aapt rebuilds it.
This commit is contained in:
parent
083fd6bee6
commit
5c7a82ab8d
@ -356,32 +356,32 @@ final public class AndrolibResources {
|
|||||||
|
|
||||||
private void generatePublicXml(ResPackage pkg, Directory out,
|
private void generatePublicXml(ResPackage pkg, Directory out,
|
||||||
XmlSerializer serial) throws AndrolibException {
|
XmlSerializer serial) throws AndrolibException {
|
||||||
try {
|
// try {
|
||||||
OutputStream outStream = out.getFileOutput("values/public.xml");
|
// OutputStream outStream = out.getFileOutput("values/public.xml");
|
||||||
serial.setOutput(outStream, null);
|
// serial.setOutput(outStream, null);
|
||||||
serial.startDocument(null, null);
|
// serial.startDocument(null, null);
|
||||||
serial.startTag(null, "resources");
|
// serial.startTag(null, "resources");
|
||||||
|
//
|
||||||
for (ResResSpec spec : pkg.listResSpecs()) {
|
// for (ResResSpec spec : pkg.listResSpecs()) {
|
||||||
serial.startTag(null, "public");
|
// serial.startTag(null, "public");
|
||||||
serial.attribute(null, "type", spec.getType().getName());
|
// serial.attribute(null, "type", spec.getType().getName());
|
||||||
serial.attribute(null, "name", spec.getName());
|
// serial.attribute(null, "name", spec.getName());
|
||||||
serial.attribute(null, "id", String.format(
|
// serial.attribute(null, "id", String.format(
|
||||||
"0x%08x", spec.getId().id));
|
// "0x%08x", spec.getId().id));
|
||||||
serial.endTag(null, "public");
|
// serial.endTag(null, "public");
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
serial.endTag(null, "resources");
|
// serial.endTag(null, "resources");
|
||||||
serial.endDocument();
|
// serial.endDocument();
|
||||||
serial.flush();
|
// serial.flush();
|
||||||
outStream.close();
|
// outStream.close();
|
||||||
} catch (IOException ex) {
|
// } catch (IOException ex) {
|
||||||
throw new AndrolibException(
|
// throw new AndrolibException(
|
||||||
"Could not generate public.xml file", ex);
|
// "Could not generate public.xml file", ex);
|
||||||
} catch (DirectoryException ex) {
|
// } catch (DirectoryException ex) {
|
||||||
throw new AndrolibException(
|
// throw new AndrolibException(
|
||||||
"Could not generate public.xml file", ex);
|
// "Could not generate public.xml file", ex);
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
private ResPackage[] getResPackagesFromApk(ExtFile apkFile,
|
private ResPackage[] getResPackagesFromApk(ExtFile apkFile,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user