mirror of
https://github.com/revanced/Apktool.git
synced 2025-01-20 16:57:34 +01:00
Some APKs are reporting wrong pkgId
- fallback to renamed package to find that pkgId
This commit is contained in:
parent
579d7c561e
commit
e8ad159438
@ -18,6 +18,7 @@ package brut.androlib;
|
||||
|
||||
import brut.androlib.err.InFileNotFoundException;
|
||||
import brut.androlib.err.OutDirExistsException;
|
||||
import brut.androlib.err.UndefinedResObject;
|
||||
import brut.androlib.res.AndrolibResources;
|
||||
import brut.androlib.res.data.ResPackage;
|
||||
import brut.androlib.res.data.ResTable;
|
||||
@ -347,7 +348,11 @@ public class ApkDecoder {
|
||||
private void putPackageInfo(Map<String, Object> meta) throws AndrolibException {
|
||||
String renamed = getResTable().getPackageRenamed();
|
||||
String original = getResTable().getPackageOriginal();
|
||||
|
||||
int id = getResTable().getPackageId();
|
||||
try {
|
||||
id = getResTable().getPackage(renamed).getId();
|
||||
} catch (UndefinedResObject ignored) {}
|
||||
|
||||
HashMap<String, String> packages = new HashMap<String, String>();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user