aapt2: patch system for decoding pkgId between 0x7f - 0xff

This commit is contained in:
Connor Tumbleson 2018-03-05 10:28:50 -05:00
parent 4403329e2e
commit 3f8d9fa835
2 changed files with 3 additions and 2 deletions

View File

@ -31,7 +31,7 @@ public class ResID {
}
public ResID(int id) {
this(id >> 24, (id >> 16) & 0x000000ff, id & 0x0000ffff, id);
this((id >> 24) & 0xff, (id >> 16) & 0x000000ff, id & 0x0000ffff, id);
}
public ResID(int package_, int type, int entry, int id) {

View File

@ -17,6 +17,7 @@
package brut.androlib.res.decoder;
import android.util.TypedValue;
import brut.androlib.Androlib;
import brut.androlib.AndrolibException;
import brut.androlib.res.data.*;
import brut.androlib.res.data.value.*;
@ -85,7 +86,7 @@ public class ARSCDecoder {
private ResPackage readTablePackage() throws IOException, AndrolibException {
checkChunkType(Header.TYPE_PACKAGE);
int id = (byte) mIn.readInt();
int id = mIn.readInt();
if (id == 0) {
// This means we are dealing with a Library Package, we should just temporarily