mirror of
https://github.com/revanced/smali.git
synced 2025-05-09 02:44:29 +02:00
Set the oat version based on the api level in AnalysisArguments
This ensures the oat version is set to NOT_ART for api 19 and lower, and fixes deodexing for those api levels.
This commit is contained in:
parent
210e36dc19
commit
8eb2595f87
@ -34,6 +34,7 @@ package org.jf.baksmali;
|
||||
import com.beust.jcommander.Parameter;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.google.common.collect.Lists;
|
||||
import org.jf.dexlib2.VersionMap;
|
||||
import org.jf.dexlib2.analysis.ClassPath;
|
||||
import org.jf.dexlib2.analysis.ClassPathResolver;
|
||||
import org.jf.dexlib2.dexbacked.DexBackedDexFile;
|
||||
@ -101,6 +102,8 @@ public class AnalysisArguments {
|
||||
if (container instanceof OatFile) {
|
||||
checkPackagePrivateAccess = true;
|
||||
oatVersion = ((OatFile) container).getOatVersion();
|
||||
} else {
|
||||
oatVersion = VersionMap.mapApiToArtVersion(dexEntry.getDexFile().getOpcodes().api);
|
||||
}
|
||||
} else {
|
||||
// this should always be true for ART
|
||||
|
Loading…
x
Reference in New Issue
Block a user