mirror of
https://github.com/revanced/Apktool.git
synced 2024-09-05 05:55:29 +02:00
Skip additional payload data of TYPE chunk
Some APKs' arsc has additional payload data (like TYPE 8 chunks and/or padding) in the TYPE chunk. After the ARSCDecoder read such kind of chunk, it acts erratically. Most of the time, it just stops parsing the ARSC, therefore, some resources are not decoded because they are not in the apktool's resources' spec table.
This commit is contained in:
parent
64644a1242
commit
52a44776df
@ -154,6 +154,12 @@ public class ARSCDecoder {
|
||||
|
||||
while (type == Header.TYPE_TYPE) {
|
||||
readTableType();
|
||||
|
||||
// skip "TYPE 8 chunks" and/or padding data at the end of this chunk
|
||||
if(mCountIn.getCount() < mHeader.endPosition) {
|
||||
mCountIn.skip(mHeader.endPosition - mCountIn.getCount());
|
||||
}
|
||||
|
||||
type = nextChunk().type;
|
||||
|
||||
addMissingResSpecs();
|
||||
|
Loading…
Reference in New Issue
Block a user