diff --git a/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/ResID.java b/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/ResID.java index 338090b1..38fe93fc 100644 --- a/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/ResID.java +++ b/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/ResID.java @@ -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) { diff --git a/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/decoder/ARSCDecoder.java b/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/decoder/ARSCDecoder.java index f98a34aa..290a6615 100644 --- a/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/decoder/ARSCDecoder.java +++ b/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/decoder/ARSCDecoder.java @@ -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