mirror of
https://github.com/revanced/Apktool.git
synced 2025-01-21 09:17:35 +01:00
Prevent frameworks from modifying sharedLibrary
Since all frameworks are decoded the same via readPackage(), reading a framework that was a sharedLibrary would throw the sharedLibrary flag for the apk. Since packageName isn't set until after the first decode, we check the values to make sure we only set this variable on the first apk decoded. Refs #936
This commit is contained in:
parent
1fb87e3e4c
commit
48285bde03
@ -90,7 +90,9 @@ public class ARSCDecoder {
|
||||
// for Apktool's use we need a non-zero packageId.
|
||||
// AOSP indicates 0x02 is next, as 0x01 is system and 0x7F is private.
|
||||
id = 2;
|
||||
mResTable.setSharedLibrary(true);
|
||||
if (mResTable.getPackageOriginal() == null && mResTable.getPackageRenamed() == null) {
|
||||
mResTable.setSharedLibrary(true);
|
||||
}
|
||||
}
|
||||
|
||||
String name = mIn.readNullEndedString(128, true);
|
||||
|
Loading…
x
Reference in New Issue
Block a user