use of jadx.core.xmlgen.ResTableParser in project jadx by skylot.
the class RootNode method loadResources.
public void loadResources(List<ResourceFile> resources) {
ResourceFile arsc = null;
for (ResourceFile rf : resources) {
if (rf.getType() == ResourceType.ARSC) {
arsc = rf;
break;
}
}
if (arsc == null) {
LOG.debug("'.arsc' file not found");
return;
}
final ResTableParser parser = new ResTableParser();
try {
ResourcesLoader.decodeStream(arsc, new ResourcesLoader.ResourceDecoder() {
@Override
public ResContainer decode(long size, InputStream is) throws IOException {
parser.decode(is);
return null;
}
});
} catch (JadxException e) {
LOG.error("Failed to parse '.arsc' file", e);
return;
}
ResourceStorage resStorage = parser.getResStorage();
constValues.setResourcesNames(resStorage.getResourcesNames());
appPackage = resStorage.getAppPackage();
}
Aggregations