mirror of
https://github.com/revanced/Apktool.git
synced 2025-05-02 15:04:24 +02:00
fix: load type spec if no TYPE_SPEC chunks (#3325)
This commit is contained in:
parent
dd32a3c301
commit
c07e4a92e6
@ -260,10 +260,16 @@ public class ARSCDecoder {
|
|||||||
private ResType readTableType() throws IOException, AndrolibException {
|
private ResType readTableType() throws IOException, AndrolibException {
|
||||||
checkChunkType(ARSCHeader.XML_TYPE_TYPE);
|
checkChunkType(ARSCHeader.XML_TYPE_TYPE);
|
||||||
int typeId = mIn.readUnsignedByte() - mTypeIdOffset;
|
int typeId = mIn.readUnsignedByte() - mTypeIdOffset;
|
||||||
|
|
||||||
|
// #3311 - Some older applications have no TYPE_SPEC chunks, but still define TYPE chunks.
|
||||||
if (mResTypeSpecs.containsKey(typeId)) {
|
if (mResTypeSpecs.containsKey(typeId)) {
|
||||||
mResId = (0xff000000 & mResId) | mResTypeSpecs.get(typeId).getId() << 16;
|
|
||||||
mTypeSpec = mResTypeSpecs.get(typeId);
|
mTypeSpec = mResTypeSpecs.get(typeId);
|
||||||
|
} else {
|
||||||
|
mTypeSpec = new ResTypeSpec(mTypeNames.getString(typeId - 1), typeId);
|
||||||
|
addTypeSpec(mTypeSpec);
|
||||||
|
mPkg.addType(mTypeSpec);
|
||||||
}
|
}
|
||||||
|
mResId = (0xff000000 & mResId) | mTypeSpec.getId() << 16;
|
||||||
|
|
||||||
int typeFlags = mIn.readByte();
|
int typeFlags = mIn.readByte();
|
||||||
mIn.skipBytes(2); // reserved
|
mIn.skipBytes(2); // reserved
|
||||||
|
Loading…
x
Reference in New Issue
Block a user