Ghidra is a software reverse engineering (SRE) framework
Renamed and reorganized OAT classes.
lazybinding-dev25840cf121b6
diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/OatConstants.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/OatConstants.javaindex c91bcd1060..2f67840b8e 100644--- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/OatConstants.java+++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/OatConstants.java@@ -67,94 +67,94 @@ public final class OatConstants {// NOTE: we plan to only support RELEASE versions...// Upper case indicates supported version.- /** https://android.googlesource.com/platform/art/+/refs/heads/kitkat-release/runtime/oat.cc#24 */- public final static String VERSION_KITKAT_RELEASE = "007";- /** https://android.googlesource.com/platform/art/+/refs/heads/kitkat-dev/runtime/oat.cc#24 */- public final static String version_kitkat_dev = "008";- /** https://android.googlesource.com/platform/art/+/refs/heads/lollipop-release/runtime/oat.cc#25 */- public final static String VERSION_LOLLIPOP_RELEASE = "039";- /** https://android.googlesource.com/platform/art/+/refs/heads/lollipop-mr1-release/runtime/oat.cc#25 */- public final static String VERSION_LOLLIPOP_MR1_FI_RELEASE = "045";- /** https://android.googlesource.com/platform/art/+/refs/heads/lollipop-wear-release/runtime/oat.cc#27 */- public final static String VERSION_LOLLIPOP_WEAR_RELEASE = "051";- /** https://android.googlesource.com/platform/art/+/refs/heads/marshmallow-release/runtime/oat.h#34 */- public final static String VERSION_MARSHMALLOW_RELEASE = "064";- /** https://android.googlesource.com/platform/art/+/refs/heads/nougat-release/runtime/oat.h#34 */- public final static String VERSION_NOUGAT_RELEASE = "079";- /** https://android.googlesource.com/platform/art/+/refs/heads/n-iot-preview-2/runtime/oat.h#34 */- public final static String version_n_iot_preview_2 = "083";- /** https://android.googlesource.com/platform/art/+/refs/heads/nougat-mr1-release/runtime/oat.h#34 */- public final static String VERSION_NOUGAT_MR1_RELEASE = "088";- /** https://android.googlesource.com/platform/art/+/refs/heads/o-preview/runtime/oat.h#34 */- public final static String version_o_preview = "114";- /** https://android.googlesource.com/platform/art/+/refs/heads/oreo-release/runtime/oat.h#34 */- public final static String VERSION_OREO_RELEASE = "124";- /** https://android.googlesource.com/platform/art/+/refs/heads/n-iot-preview-4/runtime/oat.h#34 */- public final static String version_n_iot_preview_4 = "125";- /** https://android.googlesource.com/platform/art/+/refs/heads/oreo-dr3-release/runtime/oat.h#34 */- public final static String VERSION_OREO_DR3_RELEASE = "126";- /** https://android.googlesource.com/platform/art/+/refs/heads/oreo-m2-release/runtime/oat.h#34 */- public final static String VERSION_OREO_M2_RELEASE = "131";- /** https://android.googlesource.com/platform/art/+/refs/heads/o-iot-preview-5/runtime/oat.h#34 */- public final static String version_o_iot_preview_5 = "132";- /** https://android.googlesource.com/platform/art/+/refs/heads/o-mr1-iot-preview-6/runtime/oat.h#34 */- public final static String version_o_mr1_iot_preview_6 = "135";- /** https://android.googlesource.com/platform/art/+/refs/heads/pie-release/runtime/oat.h#34 */- public final static String VERSION_PIE_RELEASE = "138";- /** https://android.googlesource.com/platform/art/+/refs/heads/o-mr1-iot-preview-7/runtime/oat.h#34 */- public final static String version_o_mr1_iot_preview_7 = "139";- /** https://android.googlesource.com/platform/art/+/refs/heads/o-mr1-iot-preview-8/runtime/oat.h#34 */- public final static String version_o_mr1_iot_preview_8 = "140";- /** https://android.googlesource.com/platform/art/+/refs/tags/android-o-mr1-iot-release-1.0.0/runtime/oat.h#34 */- public final static String version_o_mr1_iot_release_1_0_0 = "141";- /** https://android.googlesource.com/platform/art/+/refs/tags/android-o-mr1-iot-release-1.0.1/runtime/oat.h#34 */- public final static String version_o_mr1_iot_release_1_0_1 = "146";- /** https://android.googlesource.com/platform/art/+/refs/tags/android-n-iot-release-polk-at1/runtime/oat.h#34 */- public final static String version_n_iot_release_polk_at1 = "147";- /** https://android.googlesource.com/platform/art/+/refs/tags/android-q-preview-1/runtime/oat.h#33 */- public final static String version_q_preview_1 = "166";- /** https://android.googlesource.com/platform/art/+/refs/heads/android10-release/runtime/oat.h#34 */- public final static String VERSION_10_RELEASE = "170";- /** https://android.googlesource.com/platform/art/+/refs/heads/android11-release/runtime/oat.h#34 */- public final static String VERSION_11_RELEASE = "183";- /** https://android.googlesource.com/platform/art/+/refs/heads/android12-release/runtime/oat.h#36 */- public final static String VERSION_12_RELEASE = "195";- /** https://android.googlesource.com/platform/art/+/refs/heads/android-s-beta-4/runtime/oat.h#36 */- public final static String VERSION_S_BETA4 = "197";- /** https://android.googlesource.com/platform/art/+/refs/heads/android-s-v2-preview-1/runtime/oat.h#36 */- public final static String VERSION_S_V2_PREVIEW = "199";- /** https://android.googlesource.com/platform/art/+/refs/heads/android-t-preview-1/runtime/oat.h#36 */- public final static String VERSION_T_PREVIEW_1 = "220";- /** https://android.googlesource.com/platform/art/+/refs/heads/android-s-v2-beta-3/runtime/oat.h#36 */- public final static String VERSION_S_V2_BETA2 = "223";- /** https://android.googlesource.com/platform/art/+/refs/heads/android13-release/runtime/oat.h#36 */- public final static String VERSION_13_RELEASE = "225";- /** https://android.googlesource.com/platform/art/+/master/runtime/oat.h#36 */- public final static String VERSION_227 = "227";+ /** <a href="https://android.googlesource.com/platform/art/+/refs/heads/kitkat-release/runtime/oat.cc#24">kitkat-release/runtime/oat.cc</a> */+ public final static String OAT_VERSION_007 = "007";+ /** <a href="https://android.googlesource.com/platform/art/+/refs/heads/kitkat-dev/runtime/oat.cc#24">kitkat-dev/runtime/oat.cc</a> */+ public final static String oat_version_008 = "008";+ /** <a href="https://android.googlesource.com/platform/art/+/refs/heads/lollipop-release/runtime/oat.cc#25">lollipop-release/runtime/oat.cc</a> */+ public final static String OAT_VERSION_039 = "039";+ /** <a href="https://android.googlesource.com/platform/art/+/refs/heads/lollipop-mr1-release/runtime/oat.cc#25">lollipop-mr1-release/runtime/oat.cc</a> */+ public final static String OAT_VERSION_045 = "045";+ /** <a href="https://android.googlesource.com/platform/art/+/refs/heads/lollipop-wear-release/runtime/oat.cc#27">lollipop-wear-release/runtime/oat.cc</a> */+ public final static String OAT_VERSION_051 = "051";+ /** <a href="https://android.googlesource.com/platform/art/+/refs/heads/marshmallow-release/runtime/oat.h#34">marshmallow-release/runtime/oat.h</a> */+ public final static String OAT_VERSION_064 = "064";+ /** <a href="https://android.googlesource.com/platform/art/+/refs/heads/nougat-release/runtime/oat.h#34">nougat-release/runtime/oat.h</a> */+ public final static String OAT_VERSION_079 = "079";+ /** <a href="https://android.googlesource.com/platform/art/+/refs/heads/n-iot-preview-2/runtime/oat.h#34">n-iot-preview-2/runtime/oat.h</a> */+ public final static String oat_version_083 = "083";+ /** <a href="https://android.googlesource.com/platform/art/+/refs/heads/nougat-mr1-release/runtime/oat.h#34">nougat-mr1-release/runtime/oat.h</a> */+ public final static String OAT_VERSION_088 = "088";+ /** <a href="https://android.googlesource.com/platform/art/+/refs/heads/o-preview/runtime/oat.h#34">o-preview/runtime/oat.h</a> */+ public final static String oat_version_114 = "114";+ /** <a href="https://android.googlesource.com/platform/art/+/refs/heads/oreo-release/runtime/oat.h#34">oreo-release/runtime/oat.h</a> */+ public final static String OAT_VERSION_124 = "124";+ /** <a href="https://android.googlesource.com/platform/art/+/refs/heads/n-iot-preview-4/runtime/oat.h#34">n-iot-preview-4/runtime/oat.h</a> */+ public final static String oat_version_125 = "125";+ /** <a href="https://android.googlesource.com/platform/art/+/refs/heads/oreo-dr3-release/runtime/oat.h#34">oreo-dr3-release/runtime/oat.h</a> */+ public final static String OAT_VERSION_126 = "126";+ /** <a href="https://android.googlesource.com/platform/art/+/refs/heads/oreo-m2-release/runtime/oat.h#34">oreo-m2-release/runtime/oat.h</a> */+ public final static String OAT_VERSION_131 = "131";+ /** <a href="https://android.googlesource.com/platform/art/+/refs/heads/o-iot-preview-5/runtime/oat.h#34">o-iot-preview-5/runtime/oat.h</a> */+ public final static String oat_version_132 = "132";+ /** <a href="https://android.googlesource.com/platform/art/+/refs/heads/o-mr1-iot-preview-6/runtime/oat.h#34">o-mr1-iot-preview-6/runtime/oat.h</a> */+ public final static String oat_version_135 = "135";+ /** <a href="https://android.googlesource.com/platform/art/+/refs/heads/pie-release/runtime/oat.h#34">pie-release/runtime/oat.h</a> */+ public final static String OAT_VERSION_138 = "138";+ /** <a href="https://android.googlesource.com/platform/art/+/refs/heads/o-mr1-iot-preview-7/runtime/oat.h#34">o-mr1-iot-preview-7/runtime/oat.h</a> */+ public final static String oat_version_139 = "139";+ /** <a href="https://android.googlesource.com/platform/art/+/refs/heads/o-mr1-iot-preview-8/runtime/oat.h#34">o-mr1-iot-preview-8/runtime/oat.h</a> */+ public final static String oat_version_140 = "140";+ /** <a href="https://android.googlesource.com/platform/art/+/refs/tags/android-o-mr1-iot-release-1.0.0/runtime/oat.h#34">android-o-mr1-iot-release-1.0.0/runtime/oat.h</a> */+ public final static String oat_version_141 = "141";+ /** <a href="https://android.googlesource.com/platform/art/+/refs/tags/android-o-mr1-iot-release-1.0.1/runtime/oat.h#34">android-o-mr1-iot-release-1.0.1/runtime/oat.h</a> */+ public final static String oat_version_146 = "146";+ /** <a href="https://android.googlesource.com/platform/art/+/refs/tags/android-n-iot-release-polk-at1/runtime/oat.h#34">android-n-iot-release-polk-at1/runtime/oat.h</a> */+ public final static String oat_version_147 = "147";+ /** <a href="https://android.googlesource.com/platform/art/+/refs/tags/android-q-preview-1/runtime/oat.h#33">android-q-preview-1/runtime/oat.h</a> */+ public final static String oat_version_166 = "166";+ /** <a href="https://android.googlesource.com/platform/art/+/refs/heads/android10-release/runtime/oat.h#3"4>android10-release/runtime/oat.h</a> */+ public final static String OAT_VERSION_170 = "170";+ /** <a href="https://android.googlesource.com/platform/art/+/refs/heads/android11-release/runtime/oat.h#34">android11-release/runtime/oat.h</a> */+ public final static String OAT_VERSION_183 = "183";+ /** <a href="https://android.googlesource.com/platform/art/+/refs/heads/android12-release/runtime/oat.h#3"6>android12-release/runtime/oat.h</a> */+ public final static String OAT_VERSION_195 = "195";+ /** <a href="https://android.googlesource.com/platform/art/+/refs/heads/android-s-beta-4/runtime/oat.h#36">android-s-beta-4/runtime/oat.h</a> */+ public final static String oat_version_197 = "197";+ /** <a href="https://android.googlesource.com/platform/art/+/refs/heads/android-s-v2-preview-1/runtime/oat.h#36">android-s-v2-preview-1/runtime/oat.h</a> */+ public final static String OAT_VERSION_199 = "199";+ /** <a href="https://android.googlesource.com/platform/art/+/refs/heads/android-t-preview-1/runtime/oat.h#36">android-t-preview-1/runtime/oat.h</a> */+ public final static String OAT_VERSION_220 = "220";+ /** <a href="https://android.googlesource.com/platform/art/+/refs/heads/android-s-v2-beta-3/runtime/oat.h#36">android-s-v2-beta-3/runtime/oat.h</a> */+ public final static String OAT_VERSION_223 = "223";+ /** <a href="https://android.googlesource.com/platform/art/+/refs/heads/android13-release/runtime/oat.h#36">android13-release/runtime/oat.h</a> */+ public final static String OAT_VERSION_225 = "225";+ /** <a href="https://android.googlesource.com/platform/art/+/master/runtime/oat.h#36">master/runtime/oat.h</a> */+ public final static String OAT_VERSION_227 = "227";/*** This array contains versions that have been actively tested and verified.* All other versions will be considered unsupported until tested on exemplar firmware.*/public final static String [] SUPPORTED_VERSIONS = new String [] {- VERSION_KITKAT_RELEASE,- VERSION_LOLLIPOP_RELEASE,- VERSION_LOLLIPOP_MR1_FI_RELEASE,- VERSION_LOLLIPOP_WEAR_RELEASE,- VERSION_MARSHMALLOW_RELEASE,- VERSION_NOUGAT_RELEASE,- VERSION_NOUGAT_MR1_RELEASE,- VERSION_OREO_RELEASE,- VERSION_OREO_DR3_RELEASE,- VERSION_OREO_M2_RELEASE,- VERSION_PIE_RELEASE,- VERSION_10_RELEASE,- VERSION_11_RELEASE,- VERSION_12_RELEASE,- VERSION_S_V2_PREVIEW,- VERSION_T_PREVIEW_1,- VERSION_S_V2_BETA2,- VERSION_13_RELEASE,+ OAT_VERSION_007,+ OAT_VERSION_039,+ OAT_VERSION_045,+ OAT_VERSION_051,+ OAT_VERSION_064,+ OAT_VERSION_079,+ OAT_VERSION_088,+ OAT_VERSION_124,+ OAT_VERSION_126,+ OAT_VERSION_131,+ OAT_VERSION_138,+ OAT_VERSION_170,+ OAT_VERSION_183,+ OAT_VERSION_195,+ OAT_VERSION_199,+ OAT_VERSION_220,+ OAT_VERSION_223,+ OAT_VERSION_225,};//@formatter:ondiff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/OatHeader.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/OatHeader.javaindex d949df5bcb..8f4cc00d63 100644--- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/OatHeader.java+++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/OatHeader.java@@ -23,6 +23,8 @@ import ghidra.app.util.bin.StructConverter;import ghidra.file.formats.android.oat.bundle.OatBundle;import ghidra.file.formats.android.oat.oatdexfile.OatDexFile;import ghidra.file.formats.android.oat.oatdexfile.OatDexFileFactory;+import ghidra.program.model.data.*;+import ghidra.util.exception.DuplicateNameException;/*** Base OatHeader implementations@@ -142,4 +144,13 @@ public abstract class OatHeader implements StructConverter {*/abstract public int getChecksum();+ @Override+ public DataType toDataType() throws DuplicateNameException, IOException {+ Structure structure =+ new StructureDataType(OatHeader.class.getSimpleName() + "_" + version, 0);+ structure.add(STRING, 4, "magic_", null);+ structure.add(STRING, 4, "version_", null);+ structure.setCategoryPath(new CategoryPath("/oat"));+ return structure;+ }}diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/OatHeaderAnalyzer.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/OatHeaderAnalyzer.javaindex 784e49e9f3..b042415134 100644--- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/OatHeaderAnalyzer.java+++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/OatHeaderAnalyzer.java@@ -180,7 +180,7 @@ public class OatHeaderAnalyzer extends FileFormatAnalyzer {monitor.setMessage("Annotating OAT Patches...");Memory memory = program.getMemory();- if (oatHeader.getVersion().equals(OatConstants.VERSION_LOLLIPOP_MR1_FI_RELEASE)) {+ if (oatHeader.getVersion().equals(OatConstants.OAT_VERSION_045)) {MemoryBlock oatBlock = memory.getBlock(OatConstants.DOT_OAT_PATCHES_SECTION_NAME);MemoryBlock destinationBlock = findOatPatchesDestinationBlock(program, oatBlock);if (oatBlock == null || destinationBlock == null) {@@ -207,16 +207,16 @@ public class OatHeaderAnalyzer extends FileFormatAnalyzer {}}}- else if (oatHeader.getVersion().equals(OatConstants.VERSION_MARSHMALLOW_RELEASE)) {+ else if (oatHeader.getVersion().equals(OatConstants.OAT_VERSION_064)) {//TODO}- else if (oatHeader.getVersion().equals(OatConstants.VERSION_NOUGAT_MR1_RELEASE)) {+ else if (oatHeader.getVersion().equals(OatConstants.OAT_VERSION_088)) {//TODO}- else if (oatHeader.getVersion().equals(OatConstants.VERSION_OREO_RELEASE)) {+ else if (oatHeader.getVersion().equals(OatConstants.OAT_VERSION_124)) {//TODO}- else if (oatHeader.getVersion().equals(OatConstants.VERSION_OREO_M2_RELEASE)) {+ else if (oatHeader.getVersion().equals(OatConstants.OAT_VERSION_131)) {//TODO}}diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/OatHeaderFactory.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/OatHeaderFactory.javaindex af9c410dae..63ad5b90ce 100644--- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/OatHeaderFactory.java+++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/OatHeaderFactory.java@@ -21,6 +21,7 @@ import ghidra.app.util.bin.BinaryReader;import ghidra.app.util.importer.MessageLog;import ghidra.file.formats.android.oat.bundle.OatBundle;import ghidra.file.formats.android.oat.bundle.OatBundleFactory;+import ghidra.file.formats.android.oat.headers.*;import ghidra.program.model.listing.Program;import ghidra.util.task.TaskMonitor;@@ -40,35 +41,42 @@ public final class OatHeaderFactory {if (magic.equals(OatConstants.MAGIC)) {if (OatConstants.isSupportedVersion(version)) {switch (version) {- case OatConstants.VERSION_KITKAT_RELEASE:- return new OatHeader_KitKat(reader);- case OatConstants.VERSION_LOLLIPOP_RELEASE:- case OatConstants.VERSION_LOLLIPOP_MR1_FI_RELEASE:- case OatConstants.VERSION_LOLLIPOP_WEAR_RELEASE:- return new OatHeader_Lollipop(reader);- case OatConstants.VERSION_MARSHMALLOW_RELEASE:- return new OatHeader_Marshmallow(reader);- case OatConstants.VERSION_NOUGAT_RELEASE:- case OatConstants.VERSION_NOUGAT_MR1_RELEASE:- return new OatHeader_Nougat(reader);- case OatConstants.VERSION_OREO_RELEASE:- case OatConstants.VERSION_OREO_DR3_RELEASE:- return new OatHeader_Oreo(reader);//v124 and v126 are same format- case OatConstants.VERSION_OREO_M2_RELEASE:- return new OatHeader_Oreo_M2(reader);- case OatConstants.VERSION_PIE_RELEASE:- return new OatHeader_Pie(reader);- case OatConstants.VERSION_10_RELEASE:- return new OatHeader_10(reader);- case OatConstants.VERSION_11_RELEASE:- return new OatHeader_11(reader);- case OatConstants.VERSION_12_RELEASE:- case OatConstants.VERSION_S_V2_PREVIEW:- case OatConstants.VERSION_T_PREVIEW_1:- case OatConstants.VERSION_S_V2_BETA2:- return new OatHeader_12(reader);- case OatConstants.VERSION_13_RELEASE:- return new OatHeader_13(reader);+ case OatConstants.OAT_VERSION_007:+ return new OatHeader_007(reader);+ case OatConstants.OAT_VERSION_039:+ return new OatHeader_039(reader);+ case OatConstants.OAT_VERSION_045:+ return new OatHeader_045(reader);+ case OatConstants.OAT_VERSION_051:+ return new OatHeader_051(reader);+ case OatConstants.OAT_VERSION_064:+ return new OatHeader_064(reader);+ case OatConstants.OAT_VERSION_079:+ return new OatHeader_079(reader);+ case OatConstants.OAT_VERSION_088:+ return new OatHeader_088(reader);+ case OatConstants.OAT_VERSION_124:+ return new OatHeader_124(reader);+ case OatConstants.OAT_VERSION_126:+ return new OatHeader_126(reader);+ case OatConstants.OAT_VERSION_131:+ return new OatHeader_131(reader);+ case OatConstants.OAT_VERSION_138:+ return new OatHeader_138(reader);+ case OatConstants.OAT_VERSION_170:+ return new OatHeader_170(reader);+ case OatConstants.OAT_VERSION_183:+ return new OatHeader_183(reader);+ case OatConstants.OAT_VERSION_195:+ return new OatHeader_195(reader);+ case OatConstants.OAT_VERSION_199:+ return new OatHeader_199(reader);+ case OatConstants.OAT_VERSION_220:+ return new OatHeader_220(reader);+ case OatConstants.OAT_VERSION_223:+ return new OatHeader_223(reader);+ case OatConstants.OAT_VERSION_225:+ return new OatHeader_225(reader);}}}diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/OatHeader_KitKat.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/headers/OatHeader_007.javasimilarity index 90%rename from Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/OatHeader_KitKat.javarename to Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/headers/OatHeader_007.javaindex 115b15a11a..8266a14b51 100644--- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/OatHeader_KitKat.java+++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/headers/OatHeader_007.java@@ -13,19 +13,24 @@* See the License for the specific language governing permissions and* limitations under the License.*/-package ghidra.file.formats.android.oat;+package ghidra.file.formats.android.oat.headers;import java.io.IOException;import java.util.Collections;import java.util.List;import ghidra.app.util.bin.BinaryReader;+import ghidra.file.formats.android.oat.OatHeader;+import ghidra.file.formats.android.oat.OatInstructionSet;import ghidra.file.formats.android.oat.bundle.OatBundle;import ghidra.file.formats.android.oat.oatdexfile.OatDexFile;import ghidra.program.model.data.*;import ghidra.util.exception.DuplicateNameException;-public class OatHeader_KitKat extends OatHeader {+/**+ * <a href="https://android.googlesource.com/platform/art/+/refs/heads/kitkat-release/runtime/oat.cc#24">kitkat-release/runtime/oat.cc</a>+ */+public class OatHeader_007 extends OatHeader {protected int adler32_checksum_;protected int instruction_set_;@@ -41,7 +46,7 @@ public class OatHeader_KitKat extends OatHeader {protected int image_file_location_size_;protected byte[] image_file_location_data_; // note variable width data at end- OatHeader_KitKat(BinaryReader reader) throws IOException {+ public OatHeader_007(BinaryReader reader) throws IOException {super(reader);adler32_checksum_ = reader.readNextInt();instruction_set_ = reader.readNextInt();@@ -134,9 +139,8 @@ public class OatHeader_KitKat extends OatHeader {@Overridepublic DataType toDataType() throws DuplicateNameException, IOException {- Structure structure = new StructureDataType(OatHeader_KitKat.class.getSimpleName(), 0);- structure.add(STRING, 4, "magic_", null);- structure.add(STRING, 4, "version_", null);+ Structure structure = (Structure) super.toDataType();+structure.add(DWORD, "adler32_checksum_", null);structure.add(DWORD, OatInstructionSet.DISPLAY_NAME, null);structure.add(DWORD, "dex_file_count_", null);diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/OatHeader_Lollipop.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/headers/OatHeader_039.javasimilarity index 91%rename from Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/OatHeader_Lollipop.javarename to Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/headers/OatHeader_039.javaindex ff93975c9a..c122163508 100644--- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/OatHeader_Lollipop.java+++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/headers/OatHeader_039.java@@ -13,20 +13,22 @@* See the License for the specific language governing permissions and* limitations under the License.*/-package ghidra.file.formats.android.oat;+package ghidra.file.formats.android.oat.headers;import java.io.IOException;-import java.util.*;+import java.util.List;import ghidra.app.util.bin.BinaryReader;+import ghidra.file.formats.android.oat.OatHeader;+import ghidra.file.formats.android.oat.OatInstructionSet;import ghidra.file.formats.android.oat.oatdexfile.OatDexFile;import ghidra.program.model.data.*;import ghidra.util.exception.DuplicateNameException;/**- * https://android.googlesource.com/platform/art/+/marshmallow-release/runtime/oat.h+ * <a href="https://android.googlesource.com/platform/art/+/refs/heads/lollipop-release/runtime/oat.cc#25">lollipop-release/runtime/oat.cc</a>*/-public class OatHeader_Lollipop extends OatHeader {+public class OatHeader_039 extends OatHeader {protected int adler32_checksum_;protected int instruction_set_;@@ -48,7 +50,7 @@ public class OatHeader_Lollipop extends OatHeader {protected int image_file_location_oat_data_begin_;protected int key_value_store_size_;- OatHeader_Lollipop(BinaryReader reader) throws IOException {+ public OatHeader_039(BinaryReader reader) throws IOException {super(reader);adler32_checksum_ = reader.readNextInt();instruction_set_ = reader.readNextInt();@@ -109,9 +111,8 @@ public class OatHeader_Lollipop extends OatHeader {@Overridepublic DataType toDataType() throws DuplicateNameException, IOException {- Structure structure = new StructureDataType(OatHeader_Lollipop.class.getSimpleName(), 0);- structure.add(STRING, 4, "magic_", null);- structure.add(STRING, 4, "version_", null);+ Structure structure = (Structure) super.toDataType();+structure.add(DWORD, "adler32_checksum_", null);structure.add(DWORD, OatInstructionSet.DISPLAY_NAME, null);structure.add(DWORD, "instruction_set_features_", null);diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/OatHeader_Oreo.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/headers/OatHeader_045.javasimilarity index 56%rename from Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/OatHeader_Oreo.javarename to Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/headers/OatHeader_045.javaindex 460147424b..064233b91e 100644--- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/OatHeader_Oreo.java+++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/headers/OatHeader_045.java@@ -13,29 +13,17 @@* See the License for the specific language governing permissions and* limitations under the License.*/-package ghidra.file.formats.android.oat;+package ghidra.file.formats.android.oat.headers;import java.io.IOException;import ghidra.app.util.bin.BinaryReader;-import ghidra.program.model.data.DataType;-import ghidra.util.exception.DuplicateNameException;-public class OatHeader_Oreo extends OatHeader_Marshmallow {-- OatHeader_Oreo(BinaryReader reader) throws IOException {+/**+ * <a href="https://android.googlesource.com/platform/art/+/refs/heads/lollipop-mr1-release/runtime/oat.cc#25">lollipop-mr1-release/runtime/oat.cc</a>+ */+public class OatHeader_045 extends OatHeader_039 {+ public OatHeader_045(BinaryReader reader) throws IOException {super(reader);}-- @Override- public DataType toDataType() throws DuplicateNameException, IOException {- DataType dataType = super.toDataType();- try {- dataType.setName(OatHeader_Oreo.class.getSimpleName());- }- catch (Exception e) {- //ignore- }- return dataType;- }}diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/OatHeader_Nougat.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/headers/OatHeader_051.javasimilarity index 56%rename from Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/OatHeader_Nougat.javarename to Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/headers/OatHeader_051.javaindex 89efec0cee..1e21797549 100644--- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/OatHeader_Nougat.java+++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/headers/OatHeader_051.java@@ -13,29 +13,17 @@* See the License for the specific language governing permissions and* limitations under the License.*/-package ghidra.file.formats.android.oat;+package ghidra.file.formats.android.oat.headers;import java.io.IOException;import ghidra.app.util.bin.BinaryReader;-import ghidra.program.model.data.DataType;-import ghidra.util.exception.DuplicateNameException;-public class OatHeader_Nougat extends OatHeader_Marshmallow {-- OatHeader_Nougat(BinaryReader reader) throws IOException {+/**+ * <a href="https://android.googlesource.com/platform/art/+/refs/heads/lollipop-wear-release/runtime/oat.cc#27">lollipop-wear-release/runtime/oat.cc</a>+ */+public class OatHeader_051 extends OatHeader_039 {+ public OatHeader_051(BinaryReader reader) throws IOException {super(reader);}-- @Override- public DataType toDataType() throws DuplicateNameException, IOException {- DataType dataType = super.toDataType();- try {- dataType.setName(OatHeader_Nougat.class.getSimpleName());- }- catch (Exception e) {- //ignore- }- return dataType;- }}diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/OatHeader_Marshmallow.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/headers/OatHeader_064.javasimilarity index 90%rename from Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/OatHeader_Marshmallow.javarename to Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/headers/OatHeader_064.javaindex 9222e7aa56..ab52a32d87 100644--- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/OatHeader_Marshmallow.java+++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/headers/OatHeader_064.java@@ -13,20 +13,23 @@* See the License for the specific language governing permissions and* limitations under the License.*/-package ghidra.file.formats.android.oat;+package ghidra.file.formats.android.oat.headers;import java.io.IOException;-import java.util.*;+import java.util.Collections;+import java.util.List;import ghidra.app.util.bin.BinaryReader;+import ghidra.file.formats.android.oat.OatHeader;+import ghidra.file.formats.android.oat.OatInstructionSet;import ghidra.file.formats.android.oat.oatdexfile.OatDexFile;import ghidra.program.model.data.*;import ghidra.util.exception.DuplicateNameException;/**- *+ * <a href="https://android.googlesource.com/platform/art/+/refs/heads/marshmallow-release/runtime/oat.h#34">marshmallow-release/runtime/oat.h</a>*/-class OatHeader_Marshmallow extends OatHeader {+public class OatHeader_064 extends OatHeader {protected int adler32_checksum_;protected int instruction_set_;@@ -45,7 +48,7 @@ class OatHeader_Marshmallow extends OatHeader {protected int image_file_location_oat_data_begin_;protected int key_value_store_size_;- OatHeader_Marshmallow(BinaryReader reader) throws IOException {+ public OatHeader_064(BinaryReader reader) throws IOException {super(reader);adler32_checksum_ = reader.readNextInt();@@ -69,7 +72,7 @@ class OatHeader_Marshmallow extends OatHeader {@Overridepublic int getOatDexFilesOffset(BinaryReader reader) {//the DEX offset is the current reader offset!- return (int)reader.getPointerIndex();+ return (int) reader.getPointerIndex();}@Override@@ -132,9 +135,8 @@ class OatHeader_Marshmallow extends OatHeader {@Overridepublic DataType toDataType() throws DuplicateNameException, IOException {- Structure structure = new StructureDataType(OatHeader_Marshmallow.class.getSimpleName(), 0);- structure.add(STRING, 4, "magic_", null);- structure.add(STRING, 4, "version_", null);+ Structure structure = (Structure) super.toDataType();+structure.add(DWORD, "adler32_checksum_", null);structure.add(DWORD, OatInstructionSet.DISPLAY_NAME, null);structure.add(DWORD, "instruction_set_features_bitmap_", null);diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/headers/OatHeader_079.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/headers/OatHeader_079.javanew file mode 100644index 0000000000..18a13a1513--- /dev/null+++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/headers/OatHeader_079.java@@ -0,0 +1,29 @@+/* ###+ * IP: GHIDRA+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */+package ghidra.file.formats.android.oat.headers;++import java.io.IOException;++import ghidra.app.util.bin.BinaryReader;++/**+ * <a href="https://android.googlesource.com/platform/art/+/refs/heads/nougat-release/runtime/oat.h#34">nougat-release/runtime/oat.h</a>+ */+public class OatHeader_079 extends OatHeader_064 {+ public OatHeader_079(BinaryReader reader) throws IOException {+ super(reader);+ }+}diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/headers/OatHeader_088.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/headers/OatHeader_088.javanew file mode 100644index 0000000000..2a40d03c81--- /dev/null+++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/headers/OatHeader_088.java@@ -0,0 +1,29 @@+/* ###+ * IP: GHIDRA+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */+package ghidra.file.formats.android.oat.headers;++import java.io.IOException;++import ghidra.app.util.bin.BinaryReader;++/**+ * <a href="https://android.googlesource.com/platform/art/+/refs/heads/nougat-mr1-release/runtime/oat.h#34">nougat-mr1-release/runtime/oat.h</a>+ */+public class OatHeader_088 extends OatHeader_064 {+ public OatHeader_088(BinaryReader reader) throws IOException {+ super(reader);+ }+}diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/headers/OatHeader_124.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/headers/OatHeader_124.javanew file mode 100644index 0000000000..f1b06825bb--- /dev/null+++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/headers/OatHeader_124.java@@ -0,0 +1,29 @@+/* ###+ * IP: GHIDRA+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */+package ghidra.file.formats.android.oat.headers;++import java.io.IOException;++import ghidra.app.util.bin.BinaryReader;++/**+ * <a href="https://android.googlesource.com/platform/art/+/refs/heads/oreo-release/runtime/oat.h#34">oreo-release/runtime/oat.h</a>+ */+public class OatHeader_124 extends OatHeader_064 {+ public OatHeader_124(BinaryReader reader) throws IOException {+ super(reader);+ }+}diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/headers/OatHeader_126.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/headers/OatHeader_126.javanew file mode 100644index 0000000000..a5b9b67d9b--- /dev/null+++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/headers/OatHeader_126.java@@ -0,0 +1,29 @@+/* ###+ * IP: GHIDRA+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */+package ghidra.file.formats.android.oat.headers;++import java.io.IOException;++import ghidra.app.util.bin.BinaryReader;++/**+ * <a href="https://android.googlesource.com/platform/art/+/refs/heads/oreo-dr3-release/runtime/oat.h#34">oreo-dr3-release/runtime/oat.h</a>+ */+public class OatHeader_126 extends OatHeader_064 {+ public OatHeader_126(BinaryReader reader) throws IOException {+ super(reader);+ }+}diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/OatHeader_Oreo_M2.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/headers/OatHeader_131.javasimilarity index 91%rename from Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/OatHeader_Oreo_M2.javarename to Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/headers/OatHeader_131.javaindex a04c99ad15..3e44563c7d 100644--- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/OatHeader_Oreo_M2.java+++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/headers/OatHeader_131.java@@ -13,20 +13,23 @@* See the License for the specific language governing permissions and* limitations under the License.*/-package ghidra.file.formats.android.oat;+package ghidra.file.formats.android.oat.headers;import java.io.IOException;-import java.util.*;+import java.util.Collections;+import java.util.List;import ghidra.app.util.bin.BinaryReader;+import ghidra.file.formats.android.oat.OatHeader;+import ghidra.file.formats.android.oat.OatInstructionSet;import ghidra.file.formats.android.oat.oatdexfile.OatDexFile;import ghidra.program.model.data.*;import ghidra.util.exception.DuplicateNameException;/**- *+ * <a href="https://android.googlesource.com/platform/art/+/refs/heads/oreo-m2-release/runtime/oat.h#34">oreo-m2-release/runtime/oat.h</a>*/-class OatHeader_Oreo_M2 extends OatHeader {+public class OatHeader_131 extends OatHeader {protected int adler32_checksum_;protected int instruction_set_;@@ -46,7 +49,7 @@ class OatHeader_Oreo_M2 extends OatHeader {protected int image_file_location_oat_data_begin_;protected int key_value_store_size_;- OatHeader_Oreo_M2(BinaryReader reader) throws IOException {+ public OatHeader_131(BinaryReader reader) throws IOException {super(reader);adler32_checksum_ = reader.readNextInt();@@ -133,9 +136,8 @@ class OatHeader_Oreo_M2 extends OatHeader {@Overridepublic DataType toDataType() throws DuplicateNameException, IOException {- Structure structure = new StructureDataType(OatHeader_Oreo_M2.class.getSimpleName(), 0);- structure.add(STRING, 4, "magic_", null);- structure.add(STRING, 4, "version_", null);+ Structure structure = (Structure) super.toDataType();+structure.add(DWORD, "adler32_checksum_", null);structure.add(DWORD, OatInstructionSet.DISPLAY_NAME, null);structure.add(DWORD, "instruction_set_features_bitmap_", null);diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/OatHeader_Pie.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/headers/OatHeader_138.javasimilarity index 91%rename from Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/OatHeader_Pie.javarename to Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/headers/OatHeader_138.javaindex 4b5cdf1419..8764dc801e 100644--- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/OatHeader_Pie.java+++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/headers/OatHeader_138.java@@ -13,20 +13,22 @@* See the License for the specific language governing permissions and* limitations under the License.*/-package ghidra.file.formats.android.oat;+package ghidra.file.formats.android.oat.headers;import java.io.IOException;-import java.util.*;+import java.util.List;import ghidra.app.util.bin.BinaryReader;+import ghidra.file.formats.android.oat.OatHeader;+import ghidra.file.formats.android.oat.OatInstructionSet;import ghidra.file.formats.android.oat.oatdexfile.OatDexFile;import ghidra.program.model.data.*;import ghidra.util.exception.DuplicateNameException;/**- * https://android.googlesource.com/platform/art/+/refs/heads/pie-release/runtime/oat.h+ * <a href="https://android.googlesource.com/platform/art/+/refs/heads/pie-release/runtime/oat.h#34">pie-release/runtime/oat.h</a>*/-class OatHeader_Pie extends OatHeader {+public class OatHeader_138 extends OatHeader {protected int adler32_checksum_;protected int instruction_set_;@@ -46,7 +48,7 @@ class OatHeader_Pie extends OatHeader {protected int image_file_location_oat_data_begin_;protected int key_value_store_size_;- OatHeader_Pie(BinaryReader reader) throws IOException {+ public OatHeader_138(BinaryReader reader) throws IOException {super(reader);adler32_checksum_ = reader.readNextInt();instruction_set_ = reader.readNextInt();@@ -104,9 +106,8 @@ class OatHeader_Pie extends OatHeader {@Overridepublic DataType toDataType() throws DuplicateNameException, IOException {- Structure structure = new StructureDataType(OatHeader_Pie.class.getSimpleName(), 0);- structure.add(STRING, 4, "magic_", null);- structure.add(STRING, 4, "version_", null);+ Structure structure = (Structure) super.toDataType();+structure.add(DWORD, "adler32_checksum_", null);structure.add(DWORD, OatInstructionSet.DISPLAY_NAME, null);structure.add(DWORD, "instruction_set_features_bitmap_", null);diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/OatHeader_10.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/headers/OatHeader_170.javasimilarity index 88%rename from Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/OatHeader_10.javarename to Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/headers/OatHeader_170.javaindex c59512b885..30d0d05ac7 100644--- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/OatHeader_10.java+++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/headers/OatHeader_170.java@@ -13,17 +13,22 @@* See the License for the specific language governing permissions and* limitations under the License.*/-package ghidra.file.formats.android.oat;+package ghidra.file.formats.android.oat.headers;import java.io.IOException;-import java.util.*;+import java.util.List;import ghidra.app.util.bin.BinaryReader;+import ghidra.file.formats.android.oat.OatHeader;+import ghidra.file.formats.android.oat.OatInstructionSet;import ghidra.file.formats.android.oat.oatdexfile.OatDexFile;import ghidra.program.model.data.*;import ghidra.util.exception.DuplicateNameException;-public class OatHeader_10 extends OatHeader {+/**+ * <a href="https://android.googlesource.com/platform/art/+/refs/heads/android10-release/runtime/oat.h#3"4>android10-release/runtime/oat.h</a>+ */+public class OatHeader_170 extends OatHeader {protected int oat_checksum_;protected int instruction_set_;protected int instruction_set_features_bitmap_;@@ -37,7 +42,7 @@ public class OatHeader_10 extends OatHeader {protected int quick_to_interpreter_bridge_offset_;protected int key_value_store_size_;- OatHeader_10(BinaryReader reader) throws IOException {+ public OatHeader_170(BinaryReader reader) throws IOException {super(reader);oat_checksum_ = reader.readNextInt();@@ -91,9 +96,8 @@ public class OatHeader_10 extends OatHeader {@Overridepublic DataType toDataType() throws DuplicateNameException, IOException {- Structure structure = new StructureDataType(OatHeader_10.class.getSimpleName(), 0);- structure.add(STRING, 4, "magic_", null);- structure.add(STRING, 4, "version_", null);+ Structure structure = (Structure) super.toDataType();+structure.add(DWORD, "oat_checksum_", null);structure.add(DWORD, OatInstructionSet.DISPLAY_NAME, null);structure.add(DWORD, "instruction_set_features_bitmap_", null);diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/OatHeader_11.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/headers/OatHeader_183.javasimilarity index 88%rename from Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/OatHeader_11.javarename to Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/headers/OatHeader_183.javaindex e00e1b30aa..dfb86d75be 100644--- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/OatHeader_11.java+++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/headers/OatHeader_183.java@@ -13,17 +13,22 @@* See the License for the specific language governing permissions and* limitations under the License.*/-package ghidra.file.formats.android.oat;+package ghidra.file.formats.android.oat.headers;import java.io.IOException;-import java.util.*;+import java.util.List;import ghidra.app.util.bin.BinaryReader;+import ghidra.file.formats.android.oat.OatHeader;+import ghidra.file.formats.android.oat.OatInstructionSet;import ghidra.file.formats.android.oat.oatdexfile.OatDexFile;import ghidra.program.model.data.*;import ghidra.util.exception.DuplicateNameException;-public class OatHeader_11 extends OatHeader {+/**+ * <a href="https://android.googlesource.com/platform/art/+/refs/heads/android11-release/runtime/oat.h#34">android11-release/runtime/oat.h</a>+ */+public class OatHeader_183 extends OatHeader {protected int oat_checksum_;protected int instruction_set_;protected int instruction_set_features_bitmap_;@@ -38,7 +43,7 @@ public class OatHeader_11 extends OatHeader {protected int quick_to_interpreter_bridge_offset_;protected int key_value_store_size_;- OatHeader_11(BinaryReader reader) throws IOException {+ public OatHeader_183(BinaryReader reader) throws IOException {super(reader);oat_checksum_ = reader.readNextInt();@@ -93,9 +98,8 @@ public class OatHeader_11 extends OatHeader {@Overridepublic DataType toDataType() throws DuplicateNameException, IOException {- Structure structure = new StructureDataType(OatHeader_11.class.getSimpleName(), 0);- structure.add(STRING, 4, "magic_", null);- structure.add(STRING, 4, "version_", null);+ Structure structure = (Structure) super.toDataType();+structure.add(DWORD, "oat_checksum_", null);structure.add(DWORD, OatInstructionSet.DISPLAY_NAME, null);structure.add(DWORD, "instruction_set_features_bitmap_", null);diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/OatHeader_12.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/headers/OatHeader_195.javasimilarity index 86%rename from Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/OatHeader_12.javarename to Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/headers/OatHeader_195.javaindex 611e1f191e..73f1cbd01f 100644--- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/OatHeader_12.java+++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/headers/OatHeader_195.java@@ -13,24 +13,22 @@* See the License for the specific language governing permissions and* limitations under the License.*/-package ghidra.file.formats.android.oat;+package ghidra.file.formats.android.oat.headers;import java.io.IOException;-import java.util.*;+import java.util.List;import ghidra.app.util.bin.BinaryReader;+import ghidra.file.formats.android.oat.OatHeader;+import ghidra.file.formats.android.oat.OatInstructionSet;import ghidra.file.formats.android.oat.oatdexfile.OatDexFile;import ghidra.program.model.data.*;import ghidra.util.exception.DuplicateNameException;/**- * https://android.googlesource.com/platform/art/+/refs/heads/android-s-beta-5/runtime/oat.h#125- *- * https://android.googlesource.com/platform/art/+/refs/heads/android12-release/runtime/oat.h#125- *- * https://android.googlesource.com/platform/art/+/refs/heads/android-s-v2-preview-1/runtime/oat.h#125+ * <a href="https://android.googlesource.com/platform/art/+/refs/heads/android12-release/runtime/oat.h#3"6>android12-release/runtime/oat.h</a>*/-public class OatHeader_12 extends OatHeader {+public class OatHeader_195 extends OatHeader {protected int oat_checksum_;protected int instruction_set_;protected int instruction_set_features_bitmap_;@@ -46,7 +44,7 @@ public class OatHeader_12 extends OatHeader {protected int nterp_trampoline_offset_;protected int key_value_store_size_;- OatHeader_12(BinaryReader reader) throws IOException {+ public OatHeader_195(BinaryReader reader) throws IOException {super(reader);oat_checksum_ = reader.readNextInt();@@ -102,9 +100,8 @@ public class OatHeader_12 extends OatHeader {@Overridepublic DataType toDataType() throws DuplicateNameException, IOException {- Structure structure = new StructureDataType(OatHeader_12.class.getSimpleName(), 0);- structure.add(STRING, 4, "magic_", null);- structure.add(STRING, 4, "version_", null);+ Structure structure = (Structure) super.toDataType();+structure.add(DWORD, "oat_checksum_", null);structure.add(DWORD, OatInstructionSet.DISPLAY_NAME, null);structure.add(DWORD, "instruction_set_features_bitmap_", null);diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/headers/OatHeader_199.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/headers/OatHeader_199.javanew file mode 100644index 0000000000..96ef68ab1e--- /dev/null+++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/headers/OatHeader_199.java@@ -0,0 +1,29 @@+/* ###+ * IP: GHIDRA+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */+package ghidra.file.formats.android.oat.headers;++import java.io.IOException;++import ghidra.app.util.bin.BinaryReader;++/**+ * <a href="https://android.googlesource.com/platform/art/+/refs/heads/android-s-v2-preview-1/runtime/oat.h#36">android-s-v2-preview-1/runtime/oat.h</a>+ */+public class OatHeader_199 extends OatHeader_195 {+ public OatHeader_199(BinaryReader reader) throws IOException {+ super(reader);+ }+}diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/headers/OatHeader_220.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/headers/OatHeader_220.javanew file mode 100644index 0000000000..988db5ad57--- /dev/null+++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/headers/OatHeader_220.java@@ -0,0 +1,29 @@+/* ###+ * IP: GHIDRA+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */+package ghidra.file.formats.android.oat.headers;++import java.io.IOException;++import ghidra.app.util.bin.BinaryReader;++/**+ * <a href="https://android.googlesource.com/platform/art/+/refs/heads/android-t-preview-1/runtime/oat.h#36">android-t-preview-1/runtime/oat.h</a>+ */+public class OatHeader_220 extends OatHeader_195 {+ public OatHeader_220(BinaryReader reader) throws IOException {+ super(reader);+ }+}diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/headers/OatHeader_223.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/headers/OatHeader_223.javanew file mode 100644index 0000000000..b8172aae3b--- /dev/null+++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/headers/OatHeader_223.java@@ -0,0 +1,29 @@+/* ###+ * IP: GHIDRA+ *+ * Licensed under the Apache License, Version 2.0 (the "License");+ * you may not use this file except in compliance with the License.+ * You may obtain a copy of the License at+ *+ * http://www.apache.org/licenses/LICENSE-2.0+ *+ * Unless required by applicable law or agreed to in writing, software+ * distributed under the License is distributed on an "AS IS" BASIS,+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ * See the License for the specific language governing permissions and+ * limitations under the License.+ */+package ghidra.file.formats.android.oat.headers;++import java.io.IOException;++import ghidra.app.util.bin.BinaryReader;++/**+ * <a href="https://android.googlesource.com/platform/art/+/refs/heads/android-s-v2-beta-3/runtime/oat.h#36">android-s-v2-beta-3/runtime/oat.h</a>+ */+public class OatHeader_223 extends OatHeader_195 {+ public OatHeader_223(BinaryReader reader) throws IOException {+ super(reader);+ }+}diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/OatHeader_13.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/headers/OatHeader_225.javasimilarity index 89%rename from Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/OatHeader_13.javarename to Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/headers/OatHeader_225.javaindex 1661ce2511..46b58015d4 100644--- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/OatHeader_13.java+++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/headers/OatHeader_225.java@@ -13,20 +13,22 @@* See the License for the specific language governing permissions and* limitations under the License.*/-package ghidra.file.formats.android.oat;+package ghidra.file.formats.android.oat.headers;import java.io.IOException;-import java.util.*;+import java.util.List;import ghidra.app.util.bin.BinaryReader;+import ghidra.file.formats.android.oat.OatHeader;+import ghidra.file.formats.android.oat.OatInstructionSet;import ghidra.file.formats.android.oat.oatdexfile.OatDexFile;import ghidra.program.model.data.*;import ghidra.util.exception.DuplicateNameException;/**- * https://android.googlesource.com/platform/art/+/refs/heads/android13-release/runtime/oat.h#127+ * <a href="https://android.googlesource.com/platform/art/+/refs/heads/android13-release/runtime/oat.h#36">android13-release/runtime/oat.h</a>*/-public class OatHeader_13 extends OatHeader {+public class OatHeader_225 extends OatHeader {protected int oat_checksum_;protected int instruction_set_;protected int instruction_set_features_bitmap_;@@ -43,7 +45,7 @@ public class OatHeader_13 extends OatHeader {protected int nterp_trampoline_offset_;protected int key_value_store_size_;- OatHeader_13(BinaryReader reader) throws IOException {+ public OatHeader_225(BinaryReader reader) throws IOException {super(reader);oat_checksum_ = reader.readNextInt();@@ -100,9 +102,8 @@ public class OatHeader_13 extends OatHeader {@Overridepublic DataType toDataType() throws DuplicateNameException, IOException {- Structure structure = new StructureDataType(OatHeader_13.class.getSimpleName(), 0);- structure.add(STRING, 4, "magic_", null);- structure.add(STRING, 4, "version_", null);+ Structure structure = (Structure) super.toDataType();+structure.add(DWORD, "oat_checksum_", null);structure.add(DWORD, OatInstructionSet.DISPLAY_NAME, null);structure.add(DWORD, "instruction_set_features_bitmap_", null);diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatclass/OatClass.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatclass/OatClass.javaindex 47e461bf04..81c91636fe 100644--- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatclass/OatClass.java+++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatclass/OatClass.java@@ -49,39 +49,39 @@ public abstract class OatClass implements StructConverter {status_ = reader.readNextShort();switch (oatVersion) {- case OatConstants.VERSION_KITKAT_RELEASE: {+ case OatConstants.OAT_VERSION_007: {statusEnum = OatClassStatusEnum_K.kStatusInitialized.get(status_);break;}- case OatConstants.VERSION_LOLLIPOP_RELEASE:- case OatConstants.VERSION_LOLLIPOP_MR1_FI_RELEASE:- case OatConstants.VERSION_LOLLIPOP_WEAR_RELEASE:- case OatConstants.VERSION_MARSHMALLOW_RELEASE:- case OatConstants.VERSION_NOUGAT_RELEASE:- case OatConstants.VERSION_NOUGAT_MR1_RELEASE: {+ case OatConstants.OAT_VERSION_039:+ case OatConstants.OAT_VERSION_045:+ case OatConstants.OAT_VERSION_051:+ case OatConstants.OAT_VERSION_064:+ case OatConstants.OAT_VERSION_079:+ case OatConstants.OAT_VERSION_088: {statusEnum = OatClassStatusEnum_L_M_N.kStatusMax.get(status_);break;}- case OatConstants.VERSION_OREO_RELEASE: {+ case OatConstants.OAT_VERSION_124: {statusEnum = OatClassStatusEnum_O.kStatusMax.get(status_);break;}- case OatConstants.VERSION_OREO_M2_RELEASE: {+ case OatConstants.OAT_VERSION_131: {statusEnum = OatClassStatusEnum_O_M2.kStatusMax.get(status_);break;}- case OatConstants.VERSION_PIE_RELEASE:- case OatConstants.VERSION_10_RELEASE: {- statusEnum = OatClassStatusEnum_P_10.kLast.get(status_);+ case OatConstants.OAT_VERSION_138:+ case OatConstants.OAT_VERSION_170: {+ statusEnum = OatClassStatusEnum_P_Q.kLast.get(status_);break;}- case OatConstants.VERSION_11_RELEASE:- case OatConstants.VERSION_12_RELEASE:- case OatConstants.VERSION_S_V2_PREVIEW:- case OatConstants.VERSION_T_PREVIEW_1:- case OatConstants.VERSION_S_V2_BETA2:- case OatConstants.VERSION_13_RELEASE: {- statusEnum = OatClassStatusEnum_11_12.kLast.get(status_);+ case OatConstants.OAT_VERSION_183:+ case OatConstants.OAT_VERSION_195:+ case OatConstants.OAT_VERSION_199:+ case OatConstants.OAT_VERSION_220:+ case OatConstants.OAT_VERSION_223:+ case OatConstants.OAT_VERSION_225: {+ statusEnum = OatClassStatusEnum_R_S_T.kLast.get(status_);break;}default: {diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatclass/OatClassFactory.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatclass/OatClassFactory.javaindex 8bd41dccef..e82e9d6804 100644--- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatclass/OatClassFactory.java+++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatclass/OatClassFactory.java@@ -28,33 +28,33 @@ public class OatClassFactory {String oatVersion) throws IOException, UnsupportedOatVersionException {switch (oatVersion) {- case OatConstants.VERSION_KITKAT_RELEASE:+ case OatConstants.OAT_VERSION_007:return new OatClass_KitKat(reader, classDataItem, oatVersion);- case OatConstants.VERSION_LOLLIPOP_RELEASE:- case OatConstants.VERSION_LOLLIPOP_MR1_FI_RELEASE:- case OatConstants.VERSION_LOLLIPOP_WEAR_RELEASE:+ case OatConstants.OAT_VERSION_039:+ case OatConstants.OAT_VERSION_045:+ case OatConstants.OAT_VERSION_051:return new OatClass_Lollipop(reader, classDataItem, oatVersion);- case OatConstants.VERSION_MARSHMALLOW_RELEASE:+ case OatConstants.OAT_VERSION_064:return new OatClass_Marshmallow(reader, classDataItem, oatVersion);- case OatConstants.VERSION_NOUGAT_RELEASE:- case OatConstants.VERSION_NOUGAT_MR1_RELEASE:+ case OatConstants.OAT_VERSION_079:+ case OatConstants.OAT_VERSION_088:return new OatClass_Nougat(reader, classDataItem, oatVersion);- case OatConstants.VERSION_OREO_RELEASE:+ case OatConstants.OAT_VERSION_124:return new OatClass_Oreo(reader, classDataItem, oatVersion);- case OatConstants.VERSION_OREO_M2_RELEASE:+ case OatConstants.OAT_VERSION_131:return new OatClass_OreoM2(reader, classDataItem, oatVersion);- case OatConstants.VERSION_PIE_RELEASE:+ case OatConstants.OAT_VERSION_138:return new OatClass_Pie(reader, classDataItem, oatVersion);- case OatConstants.VERSION_10_RELEASE:- return new OatClass_Android10(reader, classDataItem, oatVersion);- case OatConstants.VERSION_11_RELEASE:- return new OatClass_Android11(reader, classDataItem, oatVersion);- case OatConstants.VERSION_12_RELEASE:- case OatConstants.VERSION_S_V2_PREVIEW:- case OatConstants.VERSION_T_PREVIEW_1:- case OatConstants.VERSION_S_V2_BETA2:- case OatConstants.VERSION_13_RELEASE:- return new OatClass_Android12(reader, classDataItem, oatVersion);+ case OatConstants.OAT_VERSION_170:+ return new OatClass_Q(reader, classDataItem, oatVersion);+ case OatConstants.OAT_VERSION_183:+ return new OatClass_R(reader, classDataItem, oatVersion);+ case OatConstants.OAT_VERSION_195:+ case OatConstants.OAT_VERSION_199:+ case OatConstants.OAT_VERSION_220:+ case OatConstants.OAT_VERSION_223:+ case OatConstants.OAT_VERSION_225:+ return new OatClass_S_T(reader, classDataItem, oatVersion);default:throw new UnsupportedOatVersionException("OatClass not supported for OAT Version: " + oatVersion);diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatclass/OatClassStatusEnum_K.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatclass/OatClassStatusEnum_K.javaindex 110fa1c2c3..6fd74c9eaa 100644--- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatclass/OatClassStatusEnum_K.java+++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatclass/OatClassStatusEnum_K.java@@ -21,7 +21,7 @@ import ghidra.program.model.data.*;import ghidra.util.exception.DuplicateNameException;/**- * https://android.googlesource.com/platform/art/+/kitkat-release/runtime/mirror/class.h#112+ * <a href="https://android.googlesource.com/platform/art/+/kitkat-release/runtime/mirror/class.h#112">kitkat-release/runtime/mirror/class.h</a>**/public enum OatClassStatusEnum_K implements OatClassStatusEnum {diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatclass/OatClassStatusEnum_L_M_N.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatclass/OatClassStatusEnum_L_M_N.javaindex 9206a11d19..b276704b38 100644--- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatclass/OatClassStatusEnum_L_M_N.java+++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatclass/OatClassStatusEnum_L_M_N.java@@ -21,15 +21,15 @@ import ghidra.program.model.data.*;import ghidra.util.exception.DuplicateNameException;/**- * https://android.googlesource.com/platform/art/+/lollipop-release/runtime/mirror/class.h#133- *- * https://android.googlesource.com/platform/art/+/refs/heads/lollipop-mr1-fi-release/runtime/mirror/class.h#138- *- * https://android.googlesource.com/platform/art/+/refs/heads/lollipop-wear-release/runtime/mirror/class.h#119- *- * https://android.googlesource.com/platform/art/+/marshmallow-release/runtime/mirror/class.h#112- *- * https://android.googlesource.com/platform/art/+/nougat-release/runtime/mirror/class.h#116+ * <a href="https://android.googlesource.com/platform/art/+/lollipop-release/runtime/mirror/class.h#133">lollipop-release/runtime/mirror/class.h</a>+ * <br>+ * <a href="https://android.googlesource.com/platform/art/+/refs/heads/lollipop-mr1-fi-release/runtime/mirror/class.h#138">lollipop-mr1-fi-release/runtime/mirror/class.h</a>+ * <br>+ * <a href="https://android.googlesource.com/platform/art/+/refs/heads/lollipop-wear-release/runtime/mirror/class.h#119">lollipop-wear-release/runtime/mirror/class.h</a>+ * <br>+ * <a href="https://android.googlesource.com/platform/art/+/marshmallow-release/runtime/mirror/class.h#112">marshmallow-release/runtime/mirror/class.h</a>+ * <br>+ * <a href="https://android.googlesource.com/platform/art/+/nougat-release/runtime/mirror/class.h#116">nougat-release/runtime/mirror/class.h</a>*/public enum OatClassStatusEnum_L_M_N implements OatClassStatusEnum {diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatclass/OatClassStatusEnum_O.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatclass/OatClassStatusEnum_O.javaindex 82695cf2ff..cbdeb00caa 100644--- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatclass/OatClassStatusEnum_O.java+++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatclass/OatClassStatusEnum_O.java@@ -21,7 +21,7 @@ import ghidra.program.model.data.*;import ghidra.util.exception.DuplicateNameException;/**- * https://android.googlesource.com/platform/art/+/refs/heads/oreo-release/runtime/mirror/class.h#128+ * <a href="https://android.googlesource.com/platform/art/+/refs/heads/oreo-release/runtime/mirror/class.h#128">oreo-release/runtime/mirror/class.h</a>*/public enum OatClassStatusEnum_O implements OatClassStatusEnum {diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatclass/OatClassStatusEnum_O_M2.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatclass/OatClassStatusEnum_O_M2.javaindex 714e1ffa86..a8416f972d 100644--- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatclass/OatClassStatusEnum_O_M2.java+++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatclass/OatClassStatusEnum_O_M2.java@@ -21,7 +21,7 @@ import ghidra.program.model.data.*;import ghidra.util.exception.DuplicateNameException;/**- * https://android.googlesource.com/platform/art/+/refs/heads/oreo-m2-release/runtime/mirror/class.h#128+ * <a href="https://android.googlesource.com/platform/art/+/refs/heads/oreo-m2-release/runtime/mirror/class.h#128">oreo-m2-release/runtime/mirror/class.h</a>*/public enum OatClassStatusEnum_O_M2 implements OatClassStatusEnum {diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatclass/OatClassStatusEnum_P_10.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatclass/OatClassStatusEnum_P_Q.javasimilarity index 73%rename from Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatclass/OatClassStatusEnum_P_10.javarename to Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatclass/OatClassStatusEnum_P_Q.javaindex 0f72b2a42d..10db8e1a0f 100644--- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatclass/OatClassStatusEnum_P_10.java+++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatclass/OatClassStatusEnum_P_Q.java@@ -21,12 +21,11 @@ import ghidra.program.model.data.*;import ghidra.util.exception.DuplicateNameException;/**- * https://android.googlesource.com/platform/art/+/refs/heads/pie-release/runtime/class_status.h#74- *- * https://android.googlesource.com/platform/art/+/refs/heads/android10-release/runtime/class_status.h#74- *+ * <a href="https://android.googlesource.com/platform/art/+/refs/heads/pie-release/runtime/class_status.h#74">pie-release/runtime/class_status.h</a>+ * <br>+ * <a href="https://android.googlesource.com/platform/art/+/refs/heads/android10-release/runtime/class_status.h#74">android10-release/runtime/class_status.h<a/>*/-public enum OatClassStatusEnum_P_10 implements OatClassStatusEnum {+public enum OatClassStatusEnum_P_Q implements OatClassStatusEnum {kNotReady(0),kRetired(1),@@ -47,11 +46,11 @@ public enum OatClassStatusEnum_P_10 implements OatClassStatusEnum {private byte value;- private OatClassStatusEnum_P_10(byte value) {+ private OatClassStatusEnum_P_Q(byte value) {this.value = value;}- private OatClassStatusEnum_P_10(int value) {+ private OatClassStatusEnum_P_Q(int value) {this.value = (byte) value;}@@ -61,7 +60,7 @@ public enum OatClassStatusEnum_P_10 implements OatClassStatusEnum {@Overridepublic OatClassStatusEnum get(short value) {- for (OatClassStatusEnum_P_10 valueX : values()) {+ for (OatClassStatusEnum_P_Q valueX : values()) {if (valueX.getValue() == value) {return valueX;}@@ -71,8 +70,8 @@ public enum OatClassStatusEnum_P_10 implements OatClassStatusEnum {@Overridepublic DataType toDataType() throws DuplicateNameException, IOException {- EnumDataType enumDataType = new EnumDataType(OatClassStatusEnum_P_10.class.getSimpleName(), 2);- for (OatClassStatusEnum_P_10 valueX : values()) {+ EnumDataType enumDataType = new EnumDataType(OatClassStatusEnum_P_Q.class.getSimpleName(), 2);+ for (OatClassStatusEnum_P_Q valueX : values()) {enumDataType.add(valueX.name(), valueX.getValue());}enumDataType.setCategoryPath(new CategoryPath("/oat"));diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatclass/OatClassStatusEnum_11_12.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatclass/OatClassStatusEnum_R_S_T.javasimilarity index 68%rename from Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatclass/OatClassStatusEnum_11_12.javarename to Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatclass/OatClassStatusEnum_R_S_T.javaindex 7092367b3a..173b3e131c 100644--- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatclass/OatClassStatusEnum_11_12.java+++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatclass/OatClassStatusEnum_R_S_T.java@@ -21,11 +21,13 @@ import ghidra.program.model.data.*;import ghidra.util.exception.DuplicateNameException;/**- * https://android.googlesource.com/platform/art/+/refs/heads/android11-release/runtime/class_status.h#82- *- * https://android.googlesource.com/platform/art/+/refs/heads/android12-release/runtime/class_status.h#82+ * <a href="https://android.googlesource.com/platform/art/+/refs/heads/android11-release/runtime/class_status.h#82">android11-release/runtime/class_status.h</a>+ * <br>+ * <a href="https://android.googlesource.com/platform/art/+/refs/heads/android12-release/runtime/class_status.h#82">android12-release/runtime/class_status.h</a>+ * <br>+ * <a href="https://android.googlesource.com/platform/art/+/refs/heads/android13-release/runtime/class_status.h#82">android13-release/runtime/class_status.h</a>*/-public enum OatClassStatusEnum_11_12 implements OatClassStatusEnum {+public enum OatClassStatusEnum_R_S_T implements OatClassStatusEnum {kNotReady(0),kRetired(1),@@ -47,11 +49,11 @@ public enum OatClassStatusEnum_11_12 implements OatClassStatusEnum {private byte value;- private OatClassStatusEnum_11_12(byte value) {+ private OatClassStatusEnum_R_S_T(byte value) {this.value = value;}- private OatClassStatusEnum_11_12(int value) {+ private OatClassStatusEnum_R_S_T(int value) {this.value = (byte) value;}@@ -61,7 +63,7 @@ public enum OatClassStatusEnum_11_12 implements OatClassStatusEnum {@Overridepublic OatClassStatusEnum get(short value) {- for (OatClassStatusEnum_11_12 valueX : values()) {+ for (OatClassStatusEnum_R_S_T valueX : values()) {if (valueX.getValue() == value) {return valueX;}@@ -71,8 +73,8 @@ public enum OatClassStatusEnum_11_12 implements OatClassStatusEnum {@Overridepublic DataType toDataType() throws DuplicateNameException, IOException {- EnumDataType enumDataType = new EnumDataType(OatClassStatusEnum_11_12.class.getSimpleName(), 2);- for (OatClassStatusEnum_11_12 valueX : values()) {+ EnumDataType enumDataType = new EnumDataType(OatClassStatusEnum_R_S_T.class.getSimpleName(), 2);+ for (OatClassStatusEnum_R_S_T valueX : values()) {enumDataType.add(valueX.name(), valueX.getValue());}enumDataType.setCategoryPath(new CategoryPath("/oat"));diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatclass/OatClassType.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatclass/OatClassType.javaindex 7496a86dc1..522f2da914 100644--- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatclass/OatClassType.java+++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatclass/OatClassType.java@@ -25,9 +25,9 @@ import ghidra.program.model.data.*;* using a bitmap pays for itself since few classes will have 160* methods.*- * https://android.googlesource.com/platform/art/+/lollipop-release/runtime/oat.h#152- *- * https://android.googlesource.com/platform/art/+/refs/heads/android-s-beta-5/runtime/oat_file.h#66+ * <a href="https://android.googlesource.com/platform/art/+/lollipop-release/runtime/oat.h#152">lollipop-release/runtime/oat.h</a>+ * <br>+ * <a href="https://android.googlesource.com/platform/art/+/refs/heads/android-s-beta-5/runtime/oat_file.h#66">android-s-beta-5/runtime/oat_file.h</a>*/public enum OatClassType {diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatclass/OatClass_KitKat.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatclass/OatClass_KitKat.javaindex 118172bc6b..01fc0f1aad 100644--- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatclass/OatClass_KitKat.java+++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatclass/OatClass_KitKat.java@@ -23,7 +23,7 @@ import ghidra.program.model.data.*;import ghidra.util.exception.DuplicateNameException;/**- * https://android.googlesource.com/platform/art/+/refs/heads/kitkat-release/runtime/oat_file.h#156+ * <a href="https://android.googlesource.com/platform/art/+/refs/heads/kitkat-release/runtime/oat_file.h#156">kitkat-release/runtime/oat_file.h</a>*/public class OatClass_KitKat extends OatClass {diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatclass/OatClass_Lollipop.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatclass/OatClass_Lollipop.javaindex e1afe95ca7..9f5702c4c5 100644--- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatclass/OatClass_Lollipop.java+++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatclass/OatClass_Lollipop.java@@ -24,11 +24,11 @@ import ghidra.program.model.data.*;import ghidra.util.exception.DuplicateNameException;/**- * https://android.googlesource.com/platform/art/+/refs/heads/lollipop-release/runtime/oat_file.h#205- *- * https://android.googlesource.com/platform/art/+/refs/heads/lollipop-mr1-fi-release/runtime/oat_file.h#202- *- * https://android.googlesource.com/platform/art/+/refs/heads/lollipop-wear-release/runtime/oat_file.h#211+ * <a href="https://android.googlesource.com/platform/art/+/refs/heads/lollipop-release/runtime/oat_file.h#205">lollipop-release/runtime/oat_file.h</a>+ * <br>+ * <a href="https://android.googlesource.com/platform/art/+/refs/heads/lollipop-mr1-fi-release/runtime/oat_file.h#202">lollipop-mr1-fi-release/runtime/oat_file.h</a>+ * <br>+ * <a href="https://android.googlesource.com/platform/art/+/refs/heads/lollipop-wear-release/runtime/oat_file.h#211">lollipop-wear-release/runtime/oat_file.h</a>*/public class OatClass_Lollipop extends OatClass {diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatclass/OatClass_Marshmallow.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatclass/OatClass_Marshmallow.javaindex 22ef0b709f..bf6ba9a6e9 100644--- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatclass/OatClass_Marshmallow.java+++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatclass/OatClass_Marshmallow.java@@ -23,7 +23,7 @@ import ghidra.program.model.data.DataType;import ghidra.util.exception.DuplicateNameException;/**- * https://android.googlesource.com/platform/art/+/refs/heads/marshmallow-release/runtime/oat_file.h#200+ * <a href="https://android.googlesource.com/platform/art/+/refs/heads/marshmallow-release/runtime/oat_file.h#200">marshmallow-release/runtime/oat_file.h</a>*/public class OatClass_Marshmallow extends OatClass_Lollipop {diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatclass/OatClass_Nougat.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatclass/OatClass_Nougat.javaindex a385b9fecb..dae89ef89f 100644--- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatclass/OatClass_Nougat.java+++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatclass/OatClass_Nougat.java@@ -23,7 +23,7 @@ import ghidra.program.model.data.DataType;import ghidra.util.exception.DuplicateNameException;/**- * https://android.googlesource.com/platform/art/+/refs/heads/nougat-release/runtime/oat_file.h#197+ * <a href="https://android.googlesource.com/platform/art/+/refs/heads/nougat-release/runtime/oat_file.h#197">nougat-release/runtime/oat_file.h</a>*/public class OatClass_Nougat extends OatClass_Marshmallow {diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatclass/OatClass_Oreo.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatclass/OatClass_Oreo.javaindex 9550e63bfd..5c65741305 100644--- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatclass/OatClass_Oreo.java+++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatclass/OatClass_Oreo.java@@ -23,7 +23,7 @@ import ghidra.program.model.data.DataType;import ghidra.util.exception.DuplicateNameException;/**- * https://android.googlesource.com/platform/art/+/refs/heads/oreo-release/runtime/oat_file.h#213+ * <a href="https://android.googlesource.com/platform/art/+/refs/heads/oreo-release/runtime/oat_file.h#213">oreo-release/runtime/oat_file.h</a>*/public class OatClass_Oreo extends OatClass_Nougat {diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatclass/OatClass_OreoM2.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatclass/OatClass_OreoM2.javaindex 3bbea9b5a5..e820f99c6b 100644--- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatclass/OatClass_OreoM2.java+++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatclass/OatClass_OreoM2.java@@ -23,7 +23,7 @@ import ghidra.program.model.data.DataType;import ghidra.util.exception.DuplicateNameException;/**- * https://android.googlesource.com/platform/art/+/refs/heads/oreo-m2-release/runtime/oat_file.h#219+ * <a href="https://android.googlesource.com/platform/art/+/refs/heads/oreo-m2-release/runtime/oat_file.h#219">oreo-m2-release/runtime/oat_file.h</a>*/public class OatClass_OreoM2 extends OatClass_Oreo {diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatclass/OatClass_Pie.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatclass/OatClass_Pie.javaindex a8ef49d652..379aeba6e5 100644--- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatclass/OatClass_Pie.java+++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatclass/OatClass_Pie.java@@ -23,7 +23,7 @@ import ghidra.program.model.data.DataType;import ghidra.util.exception.DuplicateNameException;/**- * https://android.googlesource.com/platform/art/+/refs/heads/pie-release/runtime/oat_file.h#248+ * <a href="https://android.googlesource.com/platform/art/+/refs/heads/pie-release/runtime/oat_file.h#248">pie-release/runtime/oat_file.h</a>*/public class OatClass_Pie extends OatClass_OreoM2 {diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatclass/OatClass_Android11.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatclass/OatClass_Q.javasimilarity index 76%rename from Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatclass/OatClass_Android11.javarename to Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatclass/OatClass_Q.javaindex befc53ba76..d43dcda7ba 100644--- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatclass/OatClass_Android11.java+++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatclass/OatClass_Q.java@@ -23,11 +23,11 @@ import ghidra.program.model.data.DataType;import ghidra.util.exception.DuplicateNameException;/**- * https://android.googlesource.com/platform/art/+/refs/heads/android11-release/runtime/oat_file.h#278+ * <a href="https://android.googlesource.com/platform/art/+/refs/heads/android10-release/runtime/oat_file.h#248">android10-release/runtime/oat_file.h</a>*/-public class OatClass_Android11 extends OatClass_Android10 {+public class OatClass_Q extends OatClass_Pie {- OatClass_Android11(BinaryReader reader, ClassDataItem classDataItem, String oatVersion)+ OatClass_Q(BinaryReader reader, ClassDataItem classDataItem, String oatVersion)throws IOException {super(reader, classDataItem, oatVersion);}@@ -36,7 +36,7 @@ public class OatClass_Android11 extends OatClass_Android10 {public DataType toDataType() throws DuplicateNameException, IOException {DataType dataType = super.toDataType();try {- renameDataType(dataType, OatClass_Android11.class.getSimpleName());+ renameDataType(dataType, OatClass_Q.class.getSimpleName());}catch (Exception e) {//ignore...diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatclass/OatClass_Android10.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatclass/OatClass_R.javasimilarity index 77%rename from Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatclass/OatClass_Android10.javarename to Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatclass/OatClass_R.javaindex 6abc851102..9801c6be6b 100644--- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatclass/OatClass_Android10.java+++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatclass/OatClass_R.java@@ -23,11 +23,11 @@ import ghidra.program.model.data.DataType;import ghidra.util.exception.DuplicateNameException;/**- * https://android.googlesource.com/platform/art/+/refs/heads/android10-release/runtime/oat_file.h#248+ * <a href="https://android.googlesource.com/platform/art/+/refs/heads/android11-release/runtime/oat_file.h#278">android11-release/runtime/oat_file.h</a>*/-public class OatClass_Android10 extends OatClass_Pie {+public class OatClass_R extends OatClass_Q {- OatClass_Android10(BinaryReader reader, ClassDataItem classDataItem, String oatVersion)+ OatClass_R(BinaryReader reader, ClassDataItem classDataItem, String oatVersion)throws IOException {super(reader, classDataItem, oatVersion);}@@ -36,7 +36,7 @@ public class OatClass_Android10 extends OatClass_Pie {public DataType toDataType() throws DuplicateNameException, IOException {DataType dataType = super.toDataType();try {- renameDataType(dataType, OatClass_Android10.class.getSimpleName());+ renameDataType(dataType, OatClass_R.class.getSimpleName());}catch (Exception e) {//ignore...diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatclass/OatClass_Android12.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatclass/OatClass_S_T.javasimilarity index 88%rename from Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatclass/OatClass_Android12.javarename to Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatclass/OatClass_S_T.javaindex ce11ad562a..cfd989e76c 100644--- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatclass/OatClass_Android12.java+++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatclass/OatClass_S_T.java@@ -25,9 +25,11 @@ import ghidra.util.NumericUtilities;import ghidra.util.exception.DuplicateNameException;/**- * https://android.googlesource.com/platform/art/+/refs/heads/android-s-beta-5/runtime/oat_file.h#283+ * <a href="https://android.googlesource.com/platform/art/+/refs/heads/android12-release/runtime/oat_file.h#283">android12-release/runtime/oat_file.h</a>+ * <br>+ * <a href="https://android.googlesource.com/platform/art/+/refs/heads/android13-release/runtime/oat_file.h#279">android13-release/runtime/oat_file.h</a>*/-public class OatClass_Android12 extends OatClass {+public class OatClass_S_T extends OatClass {//https://android.googlesource.com/platform/art/+/master/libartbase/base/bit_vector.h#38public static final int kWordBytes = 4;@@ -36,7 +38,7 @@ public class OatClass_Android12 extends OatClass {private byte[] bitmap_ = new byte[0];- OatClass_Android12(BinaryReader reader, ClassDataItem classDataItem, String oatVersion)+ OatClass_S_T(BinaryReader reader, ClassDataItem classDataItem, String oatVersion)throws IOException {super(reader, oatVersion);@@ -106,7 +108,7 @@ public class OatClass_Android12 extends OatClass {@Overridepublic DataType toDataType() throws DuplicateNameException, IOException {- String className = OatClass_Android12.class.getSimpleName();+ String className = OatClass_S_T.class.getSimpleName();if (methods_pointer_.size() > 0) {className += "_" + methods_pointer_.size();diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatdexfile/OatDexFileFactory.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatdexfile/OatDexFileFactory.javaindex c15aaa1b59..5f457ea9ea 100644--- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatdexfile/OatDexFileFactory.java+++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatdexfile/OatDexFileFactory.java@@ -27,34 +27,34 @@ public final class OatDexFileFactory {OatBundle bundle) throws IOException {switch (oatVersion) {- case OatConstants.VERSION_KITKAT_RELEASE:+ case OatConstants.OAT_VERSION_007:return new OatDexFile_KitKat(reader);- case OatConstants.VERSION_LOLLIPOP_RELEASE:- case OatConstants.VERSION_LOLLIPOP_MR1_FI_RELEASE:- case OatConstants.VERSION_LOLLIPOP_WEAR_RELEASE:+ case OatConstants.OAT_VERSION_039:+ case OatConstants.OAT_VERSION_045:+ case OatConstants.OAT_VERSION_051:return new OatDexFile_Lollipop(reader);- case OatConstants.VERSION_MARSHMALLOW_RELEASE:+ case OatConstants.OAT_VERSION_064:return new OatDexFile_Marshmallow(reader);- case OatConstants.VERSION_NOUGAT_RELEASE:- case OatConstants.VERSION_NOUGAT_MR1_RELEASE:+ case OatConstants.OAT_VERSION_079:+ case OatConstants.OAT_VERSION_088:return new OatDexFile_Nougat(reader);- case OatConstants.VERSION_OREO_RELEASE:- case OatConstants.VERSION_OREO_DR3_RELEASE:+ case OatConstants.OAT_VERSION_124:+ case OatConstants.OAT_VERSION_126:return new OatDexFile_Oreo(reader, bundle);- case OatConstants.VERSION_OREO_M2_RELEASE:+ case OatConstants.OAT_VERSION_131:return new OatDexFile_OreoM2(reader, bundle);- case OatConstants.VERSION_PIE_RELEASE:+ case OatConstants.OAT_VERSION_138:return new OatDexFile_Pie(reader, bundle);- case OatConstants.VERSION_10_RELEASE:- return new OatDexFile_Android10(reader, bundle);- case OatConstants.VERSION_11_RELEASE:- return new OatDexFile_Android11(reader, bundle);- case OatConstants.VERSION_12_RELEASE:- case OatConstants.VERSION_S_V2_PREVIEW:- case OatConstants.VERSION_T_PREVIEW_1:- case OatConstants.VERSION_S_V2_BETA2:- case OatConstants.VERSION_13_RELEASE:- return new OatDexFile_Android12(reader, bundle);+ case OatConstants.OAT_VERSION_170:+ return new OatDexFile_Q(reader, bundle);+ case OatConstants.OAT_VERSION_183:+ return new OatDexFile_R(reader, bundle);+ case OatConstants.OAT_VERSION_195:+ case OatConstants.OAT_VERSION_199:+ case OatConstants.OAT_VERSION_220:+ case OatConstants.OAT_VERSION_223:+ case OatConstants.OAT_VERSION_225:+ return new OatDexFile_S_T(reader, bundle);}throw new IOException("Unsupported OAT version: " + oatVersion);diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatdexfile/OatDexFile_KitKat.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatdexfile/OatDexFile_KitKat.javaindex 48972ec832..ca0d9ce149 100644--- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatdexfile/OatDexFile_KitKat.java+++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatdexfile/OatDexFile_KitKat.java@@ -40,8 +40,7 @@ import ghidra.util.exception.DuplicateNameException;import ghidra.util.task.TaskMonitor;/**- *- * https://android.googlesource.com/platform/art/+/refs/heads/kitkat-release/runtime/oat_file.h#191+ * <a href="https://android.googlesource.com/platform/art/+/refs/heads/kitkat-release/runtime/oat_file.h#191">kitkat-release/runtime/oat_file.h</a>*/class OatDexFile_KitKat extends OatDexFile {diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatdexfile/OatDexFile_Lollipop.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatdexfile/OatDexFile_Lollipop.javaindex b375cd3bb1..dcf9d09fbc 100644--- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatdexfile/OatDexFile_Lollipop.java+++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatdexfile/OatDexFile_Lollipop.java@@ -23,8 +23,8 @@ import ghidra.util.exception.DuplicateNameException;/*** Note: actual data structure seen in firmware does not contain the "canonical_dex_file_location_" field.- *- * https://android.googlesource.com/platform/art/+/refs/heads/lollipop-release/runtime/oat_file.h#261+ * <br>+ * <a href="https://android.googlesource.com/platform/art/+/refs/heads/lollipop-release/runtime/oat_file.h#261">lollipop-release/runtime/oat_file.h</a>*/class OatDexFile_Lollipop extends OatDexFile_KitKat {diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatdexfile/OatDexFile_Marshmallow.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatdexfile/OatDexFile_Marshmallow.javaindex 9054928d2d..4e8c7a515e 100644--- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatdexfile/OatDexFile_Marshmallow.java+++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatdexfile/OatDexFile_Marshmallow.java@@ -23,8 +23,8 @@ import ghidra.util.exception.DuplicateNameException;/*** Note: actual data structure seen in firmware does not contain the "canonical_dex_file_location_" field.- *- * https://android.googlesource.com/platform/art/+/refs/heads/marshmallow-release/runtime/oat_file.h#405+ * <br>+ * <a href="https://android.googlesource.com/platform/art/+/refs/heads/marshmallow-release/runtime/oat_file.h#405">marshmallow-release/runtime/oat_file.h</a>*/class OatDexFile_Marshmallow extends OatDexFile_Lollipop {diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatdexfile/OatDexFile_Nougat.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatdexfile/OatDexFile_Nougat.javaindex a4599d06fa..ab1ea8eded 100644--- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatdexfile/OatDexFile_Nougat.java+++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatdexfile/OatDexFile_Nougat.java@@ -33,10 +33,10 @@ import ghidra.util.task.TaskMonitor;/*** Used for OAT Header version 079 to 088.- *+ * <br>* Versions: Nougat, Nougat MR1- *- * https://android.googlesource.com/platform/art/+/nougat-release/runtime/oat_file.h#383+ * <br>+ * <a href="https://android.googlesource.com/platform/art/+/nougat-release/runtime/oat_file.h#383">nougat-release/runtime/oat_file.h</a>*/class OatDexFile_Nougat extends OatDexFile {diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatdexfile/OatDexFile_Oreo.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatdexfile/OatDexFile_Oreo.javaindex 8b188f3bd4..af66f82163 100644--- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatdexfile/OatDexFile_Oreo.java+++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatdexfile/OatDexFile_Oreo.java@@ -23,8 +23,7 @@ import ghidra.program.model.data.DataType;import ghidra.util.exception.DuplicateNameException;/**- *- * https://android.googlesource.com/platform/art/+/refs/heads/oreo-release/runtime/oat_file.h#444+ * <a href="https://android.googlesource.com/platform/art/+/refs/heads/oreo-release/runtime/oat_file.h#444">oreo-release/runtime/oat_file.h</a>*/class OatDexFile_Oreo extends OatDexFile_Nougat {diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatdexfile/OatDexFile_OreoM2.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatdexfile/OatDexFile_OreoM2.javaindex 2bc639da03..e2b5ed0b4c 100644--- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatdexfile/OatDexFile_OreoM2.java+++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatdexfile/OatDexFile_OreoM2.java@@ -33,8 +33,7 @@ import ghidra.util.exception.DuplicateNameException;import ghidra.util.task.TaskMonitor;/**- *- * https://android.googlesource.com/platform/art/+/oreo-m2-release/runtime/oat_file.h#467+ * <a href="https://android.googlesource.com/platform/art/+/oreo-m2-release/runtime/oat_file.h#467">oreo-m2-release/runtime/oat_file.h</a>*/class OatDexFile_OreoM2 extends OatDexFile {diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatdexfile/OatDexFile_Pie.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatdexfile/OatDexFile_Pie.javaindex fa65085bde..1cef7c12f8 100644--- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatdexfile/OatDexFile_Pie.java+++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatdexfile/OatDexFile_Pie.java@@ -35,8 +35,7 @@ import ghidra.util.exception.DuplicateNameException;import ghidra.util.task.TaskMonitor;/**- *- * https://android.googlesource.com/platform/art/+/pie-release/runtime/oat_file.h#518+ * <a href="https://android.googlesource.com/platform/art/+/pie-release/runtime/oat_file.h#518">pie-release/runtime/oat_file.h</a>*/class OatDexFile_Pie extends OatDexFile {diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatdexfile/OatDexFile_Android10.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatdexfile/OatDexFile_Q.javasimilarity index 77%rename from Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatdexfile/OatDexFile_Android10.javarename to Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatdexfile/OatDexFile_Q.javaindex 205c03f53b..4480f7dba5 100644--- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatdexfile/OatDexFile_Android10.java+++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatdexfile/OatDexFile_Q.java@@ -23,12 +23,11 @@ import ghidra.program.model.data.DataType;import ghidra.util.exception.DuplicateNameException;/**- *- * https://android.googlesource.com/platform/art/+/android10-release/runtime/oat_file.h#569+ * <a href="https://android.googlesource.com/platform/art/+/android10-release/runtime/oat_file.h#569">android10-release/runtime/oat_file.h</a>*/-public class OatDexFile_Android10 extends OatDexFile_Pie {+public class OatDexFile_Q extends OatDexFile_Pie {- public OatDexFile_Android10(BinaryReader reader, OatBundle bundle) throws IOException {+ public OatDexFile_Q(BinaryReader reader, OatBundle bundle) throws IOException {super(reader, bundle);}@@ -36,7 +35,7 @@ public class OatDexFile_Android10 extends OatDexFile_Pie {public DataType toDataType() throws DuplicateNameException, IOException {DataType dataType = super.toDataType();try {- dataType.setName(OatDexFile_Android10.class.getSimpleName()+ "_" ++ dataType.setName(OatDexFile_Q.class.getSimpleName()+ "_" +getDexFileLocation().length());}catch (Exception e) {diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatdexfile/OatDexFile_Android11.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatdexfile/OatDexFile_R.javasimilarity index 77%rename from Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatdexfile/OatDexFile_Android11.javarename to Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatdexfile/OatDexFile_R.javaindex 174f3938ff..78a0f61991 100644--- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatdexfile/OatDexFile_Android11.java+++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatdexfile/OatDexFile_R.java@@ -23,12 +23,11 @@ import ghidra.program.model.data.DataType;import ghidra.util.exception.DuplicateNameException;/**- *- * https://android.googlesource.com/platform/art/+/android11-release/runtime/oat_file.h#571+ * <a href="https://android.googlesource.com/platform/art/+/android11-release/runtime/oat_file.h#571">android11-release/runtime/oat_file.h</a>*/-public class OatDexFile_Android11 extends OatDexFile_Pie {+public class OatDexFile_R extends OatDexFile_Pie {- public OatDexFile_Android11(BinaryReader reader, OatBundle bundle) throws IOException {+ public OatDexFile_R(BinaryReader reader, OatBundle bundle) throws IOException {super(reader, bundle);}@@ -36,7 +35,7 @@ public class OatDexFile_Android11 extends OatDexFile_Pie {public DataType toDataType() throws DuplicateNameException, IOException {DataType dataType = super.toDataType();try {- dataType.setName(OatDexFile_Android11.class.getSimpleName() + "_" ++ dataType.setName(OatDexFile_R.class.getSimpleName() + "_" +getDexFileLocation().length());}catch (Exception e) {diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatdexfile/OatDexFile_Android12.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatdexfile/OatDexFile_S_T.javasimilarity index 93%rename from Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatdexfile/OatDexFile_Android12.javarename to Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatdexfile/OatDexFile_S_T.javaindex a59cbc7024..891631f945 100644--- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatdexfile/OatDexFile_Android12.java+++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatdexfile/OatDexFile_S_T.java@@ -34,9 +34,11 @@ import ghidra.util.exception.DuplicateNameException;import ghidra.util.task.TaskMonitor;/**- * https://android.googlesource.com/platform/art/+/refs/heads/android-s-beta-5/runtime/oat_file.h#596+ * <a href="https://android.googlesource.com/platform/art/+/refs/heads/android12-release/runtime/oat_file.h#596">android12-release/runtime/oat_file.h</a>+ * <br>+ * <a href="https://android.googlesource.com/platform/art/+/refs/heads/android13-release/runtime/oat_file.h#610">android13-release/runtime/oat_file.h</a>*/-public class OatDexFile_Android12 extends OatDexFile {+public class OatDexFile_S_T extends OatDexFile {private int dex_file_location_;private String canonical_dex_file_location_;@@ -57,7 +59,7 @@ public class OatDexFile_Android12 extends OatDexFile {private long _offset;private DexHeader dexHeader;- public OatDexFile_Android12(BinaryReader reader, OatBundle bundle)+ public OatDexFile_S_T(BinaryReader reader, OatBundle bundle)throws IOException {_offset = reader.getPointerIndex();@@ -167,7 +169,7 @@ public class OatDexFile_Android12 extends OatDexFile {@Overridepublic DataType toDataType() throws DuplicateNameException, IOException {Structure structure = new StructureDataType(- OatDexFile_Android12.class.getSimpleName() + "_" + dex_file_location_, 0);+ OatDexFile_S_T.class.getSimpleName() + "_" + dex_file_location_, 0);structure.add(DWORD, "dex_file_location_", null);structure.add(STRING, dex_file_location_, "canonical_dex_file_location_", null);diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatmethod/OatMethodOffsets.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatmethod/OatMethodOffsets.javaindex 171eeda5f1..47ffb68506 100644--- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatmethod/OatMethodOffsets.java+++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatmethod/OatMethodOffsets.java@@ -23,19 +23,32 @@ import ghidra.program.model.data.DataType;import ghidra.util.exception.DuplicateNameException;/**- *- * https://android.googlesource.com/platform/art/+/refs/heads/lollipop-mr1-release/runtime/oat.h#163- * https://android.googlesource.com/platform/art/+/refs/heads/lollipop-wear-release/runtime/oat.h#165- * https://android.googlesource.com/platform/art/+/refs/heads/marshmallow-release/runtime/oat.h#162- * https://android.googlesource.com/platform/art/+/refs/heads/nougat-release/runtime/oat.h#172- * https://android.googlesource.com/platform/art/+/refs/heads/nougat-mr1-release/runtime/oat.h#172- * https://android.googlesource.com/platform/art/+/refs/heads/oreo-release/runtime/oat.h#172- * https://android.googlesource.com/platform/art/+/refs/heads/oreo-dr3-release/runtime/oat.h#172- * https://android.googlesource.com/platform/art/+/refs/heads/oreo-m2-release/runtime/oat.h#176- * https://android.googlesource.com/platform/art/+/refs/heads/pie-release/runtime/oat.h#177- * https://android.googlesource.com/platform/art/+/refs/heads/android10-release/runtime/oat.h#150- * https://android.googlesource.com/platform/art/+/refs/heads/android11-release/runtime/oat_file.h#75- * https://android.googlesource.com/platform/art/+/refs/heads/android-s-beta-5/runtime/oat_file.h#75+ * <a href="https://android.googlesource.com/platform/art/+/refs/heads/lollipop-mr1-release/runtime/oat.h#163">lollipop-mr1-release/runtime/oat.h</a>+ * <br>+ * <a href="https://android.googlesource.com/platform/art/+/refs/heads/lollipop-wear-release/runtime/oat.h#165">ollipop-wear-release/runtime/oat.h</a>+ * <br>+ * <a href="https://android.googlesource.com/platform/art/+/refs/heads/marshmallow-release/runtime/oat.h#162">marshmallow-release/runtime/oat.h</a>+ * <br>+ * <a href="https://android.googlesource.com/platform/art/+/refs/heads/nougat-release/runtime/oat.h#172">nougat-release/runtime/oat.h</a>+ * <br>+ * <a href="https://android.googlesource.com/platform/art/+/refs/heads/nougat-mr1-release/runtime/oat.h#172">nougat-mr1-release/runtime/oat.h</a>+ * <br>+ * <a href="https://android.googlesource.com/platform/art/+/refs/heads/oreo-release/runtime/oat.h#172">oreo-release/runtime/oat.h</a>+ * <br>+ * <a href="https://android.googlesource.com/platform/art/+/refs/heads/oreo-dr3-release/runtime/oat.h#172">oreo-dr3-release/runtime/oat.h</a>+ * <br>+ * <a href="https://android.googlesource.com/platform/art/+/refs/heads/oreo-m2-release/runtime/oat.h#176">oreo-m2-release/runtime/oat.h</a>+ * <br>+ * <a href="https://android.googlesource.com/platform/art/+/refs/heads/pie-release/runtime/oat.h#177">pie-release/runtime/oat.h</a>+ * <br>+ * <a href="https://android.googlesource.com/platform/art/+/refs/heads/android10-release/runtime/oat.h#150">android10-release/runtime/oat.h</a>+ * <br>+ * <a href="https://android.googlesource.com/platform/art/+/refs/heads/android11-release/runtime/oat_file.h#75">android11-release/runtime/oat_file.h</a>+ * <br>+ * <a href="https://android.googlesource.com/platform/art/+/refs/heads/android12-release/runtime/oat_file.h#75">android12-release/runtime/oat_file.h</a>+ * <br>+ * <a href="https://android.googlesource.com/platform/art/+/refs/heads/android13-release/runtime/oat_file.h#75">android13-release/runtime/oat_file.h</a>+ * <br>*/public class OatMethodOffsets implements StructConverter {diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatmethod/OatMethodOffsetsFactory.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatmethod/OatMethodOffsetsFactory.javaindex fe7aea071e..0fbc5906b3 100644--- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatmethod/OatMethodOffsetsFactory.java+++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatmethod/OatMethodOffsetsFactory.java@@ -26,9 +26,9 @@ public final class OatMethodOffsetsFactory {throws IOException {switch (oatVersion) {- case OatConstants.VERSION_KITKAT_RELEASE:+ case OatConstants.OAT_VERSION_007:return new OatMethodOffsets_KitKat(reader);- case OatConstants.VERSION_LOLLIPOP_RELEASE:+ case OatConstants.OAT_VERSION_039:return new OatMethodOffsets_Lollipop(reader);default:return new OatMethodOffsets(reader);diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatmethod/OatMethodOffsets_KitKat.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatmethod/OatMethodOffsets_KitKat.javaindex 934f961d38..b195405c4b 100644--- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatmethod/OatMethodOffsets_KitKat.java+++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatmethod/OatMethodOffsets_KitKat.java@@ -22,9 +22,7 @@ import ghidra.program.model.data.*;import ghidra.util.exception.DuplicateNameException;/**- *- * https://android.googlesource.com/platform/art/+/refs/heads/kitkat-release/runtime/oat.h#107- *+ * <a href="https://android.googlesource.com/platform/art/+/refs/heads/kitkat-release/runtime/oat.h#107">kitkat-release/runtime/oat.h</a>*/public class OatMethodOffsets_KitKat extends OatMethodOffsets {diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatmethod/OatMethodOffsets_Lollipop.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatmethod/OatMethodOffsets_Lollipop.javaindex 9c5f98eb78..0d807e5ee3 100644--- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatmethod/OatMethodOffsets_Lollipop.java+++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/oatmethod/OatMethodOffsets_Lollipop.java@@ -22,9 +22,7 @@ import ghidra.program.model.data.*;import ghidra.util.exception.DuplicateNameException;/**- *- * https://android.googlesource.com/platform/art/+/lollipop-release/runtime/oat.h#161- *+ * <a href="https://android.googlesource.com/platform/art/+/lollipop-release/runtime/oat.h#161">lollipop-release/runtime/oat.h</a>*/public class OatMethodOffsets_Lollipop extends OatMethodOffsets {diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/quickmethod/OatQuickMethodHeaderFactory.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/quickmethod/OatQuickMethodHeaderFactory.javaindex ea64e9a09f..38f464392a 100644--- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/quickmethod/OatQuickMethodHeaderFactory.java+++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/quickmethod/OatQuickMethodHeaderFactory.java@@ -24,28 +24,28 @@ public final class OatQuickMethodHeaderFactory {public final static int getOatQuickMethodHeaderSize(String oatVersion) throws IOException {switch (oatVersion) {- case OatConstants.VERSION_LOLLIPOP_RELEASE:+ case OatConstants.OAT_VERSION_039:return 12 + QuickMethodFrameInfo.SIZE;- case OatConstants.VERSION_LOLLIPOP_MR1_FI_RELEASE:- case OatConstants.VERSION_LOLLIPOP_WEAR_RELEASE:- case OatConstants.VERSION_MARSHMALLOW_RELEASE:+ case OatConstants.OAT_VERSION_045:+ case OatConstants.OAT_VERSION_051:+ case OatConstants.OAT_VERSION_064:return 16 + QuickMethodFrameInfo.SIZE;- case OatConstants.VERSION_NOUGAT_RELEASE:- case OatConstants.VERSION_NOUGAT_MR1_RELEASE:+ case OatConstants.OAT_VERSION_079:+ case OatConstants.OAT_VERSION_088:return 8 + QuickMethodFrameInfo.SIZE;- case OatConstants.VERSION_OREO_RELEASE:- case OatConstants.VERSION_OREO_M2_RELEASE:- case OatConstants.VERSION_OREO_DR3_RELEASE:- case OatConstants.VERSION_PIE_RELEASE:+ case OatConstants.OAT_VERSION_124:+ case OatConstants.OAT_VERSION_131:+ case OatConstants.OAT_VERSION_126:+ case OatConstants.OAT_VERSION_138:return 12 + QuickMethodFrameInfo.SIZE;- case OatConstants.VERSION_10_RELEASE:- case OatConstants.VERSION_11_RELEASE:+ case OatConstants.OAT_VERSION_170:+ case OatConstants.OAT_VERSION_183:return 8;- case OatConstants.VERSION_12_RELEASE:- case OatConstants.VERSION_S_V2_PREVIEW:- case OatConstants.VERSION_T_PREVIEW_1:- case OatConstants.VERSION_S_V2_BETA2:- case OatConstants.VERSION_13_RELEASE:+ case OatConstants.OAT_VERSION_195:+ case OatConstants.OAT_VERSION_199:+ case OatConstants.OAT_VERSION_220:+ case OatConstants.OAT_VERSION_223:+ case OatConstants.OAT_VERSION_225:return 4;}throw new IOException("OatQuickMethodHeader unsupported OAT version: " + oatVersion);@@ -54,29 +54,29 @@ public final class OatQuickMethodHeaderFactory {public final static OatQuickMethodHeader getOatQuickMethodHeader(BinaryReader reader,String oatVersion) throws IOException {switch (oatVersion ) {- case OatConstants.VERSION_LOLLIPOP_RELEASE:+ case OatConstants.OAT_VERSION_039:return new OatQuickMethodHeader_Lollipop(reader);- case OatConstants.VERSION_LOLLIPOP_MR1_FI_RELEASE:- case OatConstants.VERSION_LOLLIPOP_WEAR_RELEASE:- case OatConstants.VERSION_MARSHMALLOW_RELEASE:+ case OatConstants.OAT_VERSION_045:+ case OatConstants.OAT_VERSION_051:+ case OatConstants.OAT_VERSION_064:return new OatQuickMethodHeader_LollipopMR1(reader);- case OatConstants.VERSION_NOUGAT_RELEASE:- case OatConstants.VERSION_NOUGAT_MR1_RELEASE:+ case OatConstants.OAT_VERSION_079:+ case OatConstants.OAT_VERSION_088:return new OatQuickMethodHeader_Nougat(reader);- case OatConstants.VERSION_OREO_RELEASE:- case OatConstants.VERSION_OREO_M2_RELEASE:- case OatConstants.VERSION_OREO_DR3_RELEASE:- case OatConstants.VERSION_PIE_RELEASE:+ case OatConstants.OAT_VERSION_124:+ case OatConstants.OAT_VERSION_131:+ case OatConstants.OAT_VERSION_126:+ case OatConstants.OAT_VERSION_138:return new OatQuickMethodHeader_Oreo(reader);- case OatConstants.VERSION_10_RELEASE:- case OatConstants.VERSION_11_RELEASE:- return new OatQuickMethodHeader_Android10(reader);- case OatConstants.VERSION_12_RELEASE:- case OatConstants.VERSION_S_V2_PREVIEW:- case OatConstants.VERSION_T_PREVIEW_1:- case OatConstants.VERSION_S_V2_BETA2:- case OatConstants.VERSION_13_RELEASE:- return new OatQuickMethodHeader_Android12(reader);+ case OatConstants.OAT_VERSION_170:+ case OatConstants.OAT_VERSION_183:+ return new OatQuickMethodHeader_Q_R(reader);+ case OatConstants.OAT_VERSION_195:+ case OatConstants.OAT_VERSION_199:+ case OatConstants.OAT_VERSION_220:+ case OatConstants.OAT_VERSION_223:+ case OatConstants.OAT_VERSION_225:+ return new OatQuickMethodHeader_S_T(reader);}throw new IOException("OatQuickMethodHeader unsupported OAT version: " + oatVersion);}diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/quickmethod/OatQuickMethodHeader_Lollipop.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/quickmethod/OatQuickMethodHeader_Lollipop.javaindex 132787d2e5..c803618280 100644--- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/quickmethod/OatQuickMethodHeader_Lollipop.java+++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/quickmethod/OatQuickMethodHeader_Lollipop.java@@ -22,7 +22,7 @@ import ghidra.program.model.data.*;import ghidra.util.exception.DuplicateNameException;/**- * https://android.googlesource.com/platform/art/+/refs/heads/lollipop-release/runtime/oat.h#185+ * <a href="https://android.googlesource.com/platform/art/+/refs/heads/lollipop-release/runtime/oat.h#185">lollipop-release/runtime/oat.h</a>*/public class OatQuickMethodHeader_Lollipop extends OatQuickMethodHeader {private int mapping_table_offset_;diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/quickmethod/OatQuickMethodHeader_LollipopMR1.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/quickmethod/OatQuickMethodHeader_LollipopMR1.javaindex d2c45285b7..93e276a5cf 100644--- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/quickmethod/OatQuickMethodHeader_LollipopMR1.java+++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/quickmethod/OatQuickMethodHeader_LollipopMR1.java@@ -22,9 +22,11 @@ import ghidra.program.model.data.*;import ghidra.util.exception.DuplicateNameException;/**- * https://android.googlesource.com/platform/art/+/refs/heads/lollipop-mr1-fi-release/runtime/oat.h#182- * https://android.googlesource.com/platform/art/+/refs/heads/lollipop-wear-release/runtime/oat.h#184- * https://android.googlesource.com/platform/art/+/marshmallow-release/runtime/oat.h#185+ * <a href="https://android.googlesource.com/platform/art/+/refs/heads/lollipop-mr1-fi-release/runtime/oat.h#182">lollipop-mr1-fi-release/runtime/oat.h</a>+ * <br>+ * <a href="https://android.googlesource.com/platform/art/+/refs/heads/lollipop-wear-release/runtime/oat.h#184">lollipop-wear-release/runtime/oat.h</a>+ * <br>+ * <a href="https://android.googlesource.com/platform/art/+/marshmallow-release/runtime/oat.h#185">marshmallow-release/runtime/oat.h</a>*/public class OatQuickMethodHeader_LollipopMR1 extends OatQuickMethodHeader {private int mapping_table_offset_;diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/quickmethod/OatQuickMethodHeader_Nougat.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/quickmethod/OatQuickMethodHeader_Nougat.javaindex 7b84160286..9a692f9841 100644--- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/quickmethod/OatQuickMethodHeader_Nougat.java+++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/quickmethod/OatQuickMethodHeader_Nougat.java@@ -22,8 +22,9 @@ import ghidra.program.model.data.*;import ghidra.util.exception.DuplicateNameException;/**- * https://android.googlesource.com/platform/art/+/refs/heads/nougat-release/runtime/oat_quick_method_header.h#128- * https://android.googlesource.com/platform/art/+/nougat-mr1-release/runtime/oat_quick_method_header.h#128+ * <a href="https://android.googlesource.com/platform/art/+/refs/heads/nougat-release/runtime/oat_quick_method_header.h#128">nougat-release/runtime/oat_quick_method_header.h</a>+ * <br>+ * <a href="https://android.googlesource.com/platform/art/+/nougat-mr1-release/runtime/oat_quick_method_header.h#128">nougat-mr1-release/runtime/oat_quick_method_header.h</a>*/public class OatQuickMethodHeader_Nougat extends OatQuickMethodHeader {diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/quickmethod/OatQuickMethodHeader_Oreo.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/quickmethod/OatQuickMethodHeader_Oreo.javaindex 5446f86bd0..2a827e60ce 100644--- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/quickmethod/OatQuickMethodHeader_Oreo.java+++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/quickmethod/OatQuickMethodHeader_Oreo.java@@ -22,10 +22,13 @@ import ghidra.program.model.data.*;import ghidra.util.exception.DuplicateNameException;/**- * https://android.googlesource.com/platform/art/+/refs/heads/oreo-release/runtime/oat_quick_method_header.h#190- * https://android.googlesource.com/platform/art/+/refs/heads/oreo-dr3-release/runtime/oat_quick_method_header.h#191- * https://android.googlesource.com/platform/art/+/refs/heads/oreo-m2-release/runtime/oat_quick_method_header.h#191- * https://android.googlesource.com/platform/art/+/refs/heads/pie-release/runtime/oat_quick_method_header.h#191+ * <a href="https://android.googlesource.com/platform/art/+/refs/heads/oreo-release/runtime/oat_quick_method_header.h#190">oreo-release/runtime/oat_quick_method_header.h</a>+ * <br>+ * <a href="https://android.googlesource.com/platform/art/+/refs/heads/oreo-dr3-release/runtime/oat_quick_method_header.h#191">oreo-dr3-release/runtime/oat_quick_method_header.h</a>+ * <br>+ * <a href="https://android.googlesource.com/platform/art/+/refs/heads/oreo-m2-release/runtime/oat_quick_method_header.h#191">oreo-m2-release/runtime/oat_quick_method_header.h</a>+ * <br>+ * <a href="https://android.googlesource.com/platform/art/+/refs/heads/pie-release/runtime/oat_quick_method_header.h#191">pie-release/runtime/oat_quick_method_header.h</a>*/public class OatQuickMethodHeader_Oreo extends OatQuickMethodHeader {diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/quickmethod/OatQuickMethodHeader_Android10.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/quickmethod/OatQuickMethodHeader_Q_R.javasimilarity index 76%rename from Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/quickmethod/OatQuickMethodHeader_Android10.javarename to Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/quickmethod/OatQuickMethodHeader_Q_R.javaindex ed51aae418..3b41837bab 100644--- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/quickmethod/OatQuickMethodHeader_Android10.java+++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/quickmethod/OatQuickMethodHeader_Q_R.java@@ -22,15 +22,16 @@ import ghidra.program.model.data.*;import ghidra.util.exception.DuplicateNameException;/**- * https://android.googlesource.com/platform/art/+/refs/heads/android10-release/runtime/oat_quick_method_header.h#158- * https://android.googlesource.com/platform/art/+/refs/heads/android11-release/runtime/oat_quick_method_header.h#175+ * <a href="https://android.googlesource.com/platform/art/+/refs/heads/android10-release/runtime/oat_quick_method_header.h#158">android10-release/runtime/oat_quick_method_header.h</a>+ * <br>+ * <a href="https://android.googlesource.com/platform/art/+/refs/heads/android11-release/runtime/oat_quick_method_header.h#175">android11-release/runtime/oat_quick_method_header.h</a>*/-public class OatQuickMethodHeader_Android10 extends OatQuickMethodHeader {+public class OatQuickMethodHeader_Q_R extends OatQuickMethodHeader {private int vmap_table_offset_;private int code_size_;private byte[] code_;- OatQuickMethodHeader_Android10(BinaryReader reader) throws IOException {+ OatQuickMethodHeader_Q_R(BinaryReader reader) throws IOException {vmap_table_offset_ = reader.readNextInt();code_size_ = reader.readNextInt();code_ = reader.readNextByteArray(code_size_);@@ -62,7 +63,7 @@ public class OatQuickMethodHeader_Android10 extends OatQuickMethodHeader {@Overridepublic DataType toDataType() throws DuplicateNameException, IOException {- Structure structure = new StructureDataType(OatQuickMethodHeader_Android10.class.getSimpleName(), 0);+ Structure structure = new StructureDataType(OatQuickMethodHeader_Q_R.class.getSimpleName(), 0);structure.add(DWORD, "vmap_table_offset_", null);structure.add(DWORD, "code_size_", null);structure.setCategoryPath(new CategoryPath("/oat"));diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/quickmethod/OatQuickMethodHeader_Android12.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/quickmethod/OatQuickMethodHeader_S_T.javasimilarity index 71%rename from Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/quickmethod/OatQuickMethodHeader_Android12.javarename to Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/quickmethod/OatQuickMethodHeader_S_T.javaindex 385e02740f..2910468c9d 100644--- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/quickmethod/OatQuickMethodHeader_Android12.java+++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/quickmethod/OatQuickMethodHeader_S_T.java@@ -22,10 +22,11 @@ import ghidra.program.model.data.*;import ghidra.util.exception.DuplicateNameException;/**- * https://android.googlesource.com/platform/art/+/refs/heads/android12-release/runtime/oat_quick_method_header.h#160- *+ * <a href="https://android.googlesource.com/platform/art/+/refs/heads/android12-release/runtime/oat_quick_method_header.h#160">android12-release/runtime/oat_quick_method_header.h>/a>+ * <br>+ * <a href="https://android.googlesource.com/platform/art/+/refs/heads/android13-release/runtime/oat_quick_method_header.h#167">android13-release/runtime/oat_quick_method_header.h</a>*/-public class OatQuickMethodHeader_Android12 extends OatQuickMethodHeader {+public class OatQuickMethodHeader_S_T extends OatQuickMethodHeader {public static final int kShouldDeoptimizeMask = 0x80000000;public static final int kIsCodeInfoMask = 0x40000000;@@ -34,7 +35,7 @@ public class OatQuickMethodHeader_Android12 extends OatQuickMethodHeader {private int data_;- OatQuickMethodHeader_Android12(BinaryReader reader) throws IOException {+ OatQuickMethodHeader_S_T(BinaryReader reader) throws IOException {data_ = reader.readNextInt();}@@ -45,7 +46,7 @@ public class OatQuickMethodHeader_Android12 extends OatQuickMethodHeader {@Overridepublic DataType toDataType() throws DuplicateNameException, IOException {Structure structure =- new StructureDataType(OatQuickMethodHeader_Android12.class.getSimpleName(), 0);+ new StructureDataType(OatQuickMethodHeader_S_T.class.getSimpleName(), 0);structure.add(DWORD, "data_", null);structure.setCategoryPath(new CategoryPath("/oat"));return structure;diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/quickmethod/QuickMethodFrameInfo.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/quickmethod/QuickMethodFrameInfo.javaindex 6eba837bc8..b9e5aae85e 100644--- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/quickmethod/QuickMethodFrameInfo.java+++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/quickmethod/QuickMethodFrameInfo.java@@ -23,18 +23,29 @@ import ghidra.program.model.data.DataType;import ghidra.util.exception.DuplicateNameException;/**- * https://android.googlesource.com/platform/art/+/refs/heads/lollipop-release/runtime/quick/quick_method_frame_info.h#53- * https://android.googlesource.com/platform/art/+/refs/heads/lollipop-mr1-fi-release/runtime/quick/quick_method_frame_info.h#54- * https://android.googlesource.com/platform/art/+/refs/heads/lollipop-wear-release/runtime/quick/quick_method_frame_info.h#54- * https://android.googlesource.com/platform/art/+/marshmallow-release/runtime/quick/quick_method_frame_info.h#54- * https://android.googlesource.com/platform/art/+/refs/heads/nougat-release/runtime/quick/quick_method_frame_info.h#57- * https://android.googlesource.com/platform/art/+/nougat-mr1-release/runtime/quick/quick_method_frame_info.h#57- * https://android.googlesource.com/platform/art/+/refs/heads/oreo-release/runtime/quick/quick_method_frame_info.h#57- * https://android.googlesource.com/platform/art/+/refs/heads/oreo-dr3-release/runtime/quick/quick_method_frame_info.h#57- * https://android.googlesource.com/platform/art/+/refs/heads/oreo-m2-release/runtime/quick/quick_method_frame_info.h#57- * https://android.googlesource.com/platform/art/+/refs/heads/pie-release/runtime/quick/quick_method_frame_info.h#57- * https://android.googlesource.com/platform/art/+/refs/heads/android10-release/runtime/quick/quick_method_frame_info.h#57- * https://android.googlesource.com/platform/art/+/refs/heads/android11-release/runtime/quick/quick_method_frame_info.h#57+ * <a href="https://android.googlesource.com/platform/art/+/refs/heads/lollipop-release/runtime/quick/quick_method_frame_info.h#53">lollipop-release/runtime/quick/quick_method_frame_info.h</a>+ * <br>+ * <a href="https://android.googlesource.com/platform/art/+/refs/heads/lollipop-mr1-fi-release/runtime/quick/quick_method_frame_info.h#54">lollipop-mr1-fi-release/runtime/quick/quick_method_frame_info.h</a>+ * <br>+ * <a href="https://android.googlesource.com/platform/art/+/refs/heads/lollipop-wear-release/runtime/quick/quick_method_frame_info.h#54">lollipop-wear-release/runtime/quick/quick_method_frame_info.h</a>+ * <br>+ * <a href="https://android.googlesource.com/platform/art/+/marshmallow-release/runtime/quick/quick_method_frame_info.h#54">marshmallow-release/runtime/quick/quick_method_frame_info.h</a>+ * <br>+ * <a href="https://android.googlesource.com/platform/art/+/refs/heads/nougat-release/runtime/quick/quick_method_frame_info.h#57">nougat-release/runtime/quick/quick_method_frame_info.h</a>+ * <br>+ * <a href="https://android.googlesource.com/platform/art/+/nougat-mr1-release/runtime/quick/quick_method_frame_info.h#57">nougat-mr1-release/runtime/quick/quick_method_frame_info.h</a>+ * <br>+ * <a href="https://android.googlesource.com/platform/art/+/refs/heads/oreo-release/runtime/quick/quick_method_frame_info.h#57">oreo-release/runtime/quick/quick_method_frame_info.h</a>+ * <br>+ * <a href="https://android.googlesource.com/platform/art/+/refs/heads/oreo-dr3-release/runtime/quick/quick_method_frame_info.h#57">oreo-dr3-release/runtime/quick/quick_method_frame_info.h</a>+ * <br>+ * <a href="https://android.googlesource.com/platform/art/+/refs/heads/oreo-m2-release/runtime/quick/quick_method_frame_info.h#57">oreo-m2-release/runtime/quick/quick_method_frame_info.h</a>+ * <br>+ * <a href="https://android.googlesource.com/platform/art/+/refs/heads/pie-release/runtime/quick/quick_method_frame_info.h#57">pie-release/runtime/quick/quick_method_frame_info.h</a>+ * <br>+ * <a href="https://android.googlesource.com/platform/art/+/refs/heads/android10-release/runtime/quick/quick_method_frame_info.h#57">android10-release/runtime/quick/quick_method_frame_info.h</a>+ * <br>+ * <a href="https://android.googlesource.com/platform/art/+/refs/heads/android11-release/runtime/quick/quick_method_frame_info.h#57">android11-release/runtime/quick/quick_method_frame_info.h</a>*/public class QuickMethodFrameInfo implements StructConverter {diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/tlt/TypeLookupTable.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/tlt/TypeLookupTable.javaindex e1a9cc6851..8401507001 100644--- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/tlt/TypeLookupTable.java+++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/tlt/TypeLookupTable.java@@ -18,8 +18,9 @@ package ghidra.file.formats.android.oat.tlt;import ghidra.app.util.bin.StructConverter;/**- * https://android.googlesource.com/platform/art/+/oreo-release/runtime/type_lookup_table.h#161- * https://android.googlesource.com/platform/art/+/oreo-m2-release/runtime/type_lookup_table.h#161+ * <a href="https://android.googlesource.com/platform/art/+/oreo-release/runtime/type_lookup_table.h#161">oreo-release/runtime/type_lookup_table.h</a>+ * <br>+ * <a href="https://android.googlesource.com/platform/art/+/oreo-m2-release/runtime/type_lookup_table.h#161">oreo-m2-release/runtime/type_lookup_table.h</a>*/public abstract class TypeLookupTable implements StructConverter {diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/tlt/TypeLookupTableEntry.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/tlt/TypeLookupTableEntry.javaindex 59094a4267..5b94ba0070 100644--- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/tlt/TypeLookupTableEntry.java+++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/tlt/TypeLookupTableEntry.java@@ -23,11 +23,13 @@ import ghidra.program.model.data.*;import ghidra.util.exception.DuplicateNameException;/**- * https://android.googlesource.com/platform/art/+/nougat-release/runtime/type_lookup_table.h#99- * https://android.googlesource.com/platform/art/+/oreo-release/runtime/type_lookup_table.h#100- * https://android.googlesource.com/platform/art/+/oreo-m2-release/runtime/type_lookup_table.h#100- * https://android.googlesource.com/platform/art/+/pie-release/runtime/type_lookup_table.h#102- *+ * <a href="https://android.googlesource.com/platform/art/+/nougat-release/runtime/type_lookup_table.h#99">nougat-release/runtime/type_lookup_table.h</a>+ * <br>+ * <a href="https://android.googlesource.com/platform/art/+/oreo-release/runtime/type_lookup_table.h#100">oreo-release/runtime/type_lookup_table.h</a>+ * <br>+ * <a href="https://android.googlesource.com/platform/art/+/oreo-m2-release/runtime/type_lookup_table.h#100">oreo-m2-release/runtime/type_lookup_table.h</a>+ * <br>+ * <a href="https://android.googlesource.com/platform/art/+/pie-release/runtime/type_lookup_table.h#102">pie-release/runtime/type_lookup_table.h</a>*/public class TypeLookupTableEntry implements StructConverter {diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/tlt/TypeLookupTableEntry_Android10.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/tlt/TypeLookupTableEntry_Q_R_S_T.javasimilarity index 61%rename from Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/tlt/TypeLookupTableEntry_Android10.javarename to Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/tlt/TypeLookupTableEntry_Q_R_S_T.javaindex d820214d22..25b897c0d3 100644--- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/tlt/TypeLookupTableEntry_Android10.java+++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/tlt/TypeLookupTableEntry_Q_R_S_T.java@@ -22,13 +22,17 @@ import ghidra.program.model.data.*;import ghidra.util.exception.DuplicateNameException;/**- * https://android.googlesource.com/platform/art/+/refs/heads/android10-release/libdexfile/dex/type_lookup_table.h#110- * https://android.googlesource.com/platform/art/+/refs/heads/android11-release/libdexfile/dex/type_lookup_table.h#110- * https://android.googlesource.com/platform/art/+/refs/heads/android12-release/libdexfile/dex/type_lookup_table.h#110+ * <a href="https://android.googlesource.com/platform/art/+/refs/heads/android10-release/libdexfile/dex/type_lookup_table.h#110">android10-release/libdexfile/dex/type_lookup_table.h</a>+ * <br>+ * <a href="https://android.googlesource.com/platform/art/+/refs/heads/android11-release/libdexfile/dex/type_lookup_table.h#110">android11-release/libdexfile/dex/type_lookup_table.h</a>+ * <br>+ * <a href="https://android.googlesource.com/platform/art/+/refs/heads/android12-release/libdexfile/dex/type_lookup_table.h#110">android12-release/libdexfile/dex/type_lookup_table.h</a>+ * <br>+ * <a href="https://android.googlesource.com/platform/art/+/refs/heads/android13-release/libdexfile/dex/type_lookup_table.h#112">android13-release/libdexfile/dex/type_lookup_table.h</a>*/-public class TypeLookupTableEntry_Android10 extends TypeLookupTableEntry {+public class TypeLookupTableEntry_Q_R_S_T extends TypeLookupTableEntry {- public TypeLookupTableEntry_Android10(BinaryReader reader) throws IOException {+ public TypeLookupTableEntry_Q_R_S_T(BinaryReader reader) throws IOException {super();str_offset_ = reader.readNextInt();data_ = reader.readNextInt();@@ -50,7 +54,7 @@ public class TypeLookupTableEntry_Android10 extends TypeLookupTableEntry {@Overridepublic DataType toDataType() throws DuplicateNameException, IOException {- Structure structure = new StructureDataType(TypeLookupTableEntry_Android10.class.getSimpleName(), 0);+ Structure structure = new StructureDataType(TypeLookupTableEntry_Q_R_S_T.class.getSimpleName(), 0);structure.add(DWORD, "str_offset_", null);structure.add(DWORD, "data_", null);structure.setCategoryPath(new CategoryPath("/oat"));diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/tlt/TypeLookupTableFactory.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/tlt/TypeLookupTableFactory.javaindex b12264d336..9b4226a7a8 100644--- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/tlt/TypeLookupTableFactory.java+++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/tlt/TypeLookupTableFactory.java@@ -27,25 +27,25 @@ public final class TypeLookupTableFactory {throws IOException {switch (oatVersion) {- case OatConstants.VERSION_NOUGAT_RELEASE:- case OatConstants.VERSION_NOUGAT_MR1_RELEASE:+ case OatConstants.OAT_VERSION_079:+ case OatConstants.OAT_VERSION_088:return new TypeLookupTable_Nougat(reader);- case OatConstants.VERSION_OREO_RELEASE:- case OatConstants.VERSION_OREO_M2_RELEASE:- case OatConstants.VERSION_OREO_DR3_RELEASE:+ case OatConstants.OAT_VERSION_124:+ case OatConstants.OAT_VERSION_131:+ case OatConstants.OAT_VERSION_126:return new TypeLookupTable_Oreo(reader);- case OatConstants.VERSION_PIE_RELEASE:+ case OatConstants.OAT_VERSION_138:return new TypeLookupTable_Pie(reader);- case OatConstants.VERSION_10_RELEASE:- return new TypeLookupTable_Android10(reader);- case OatConstants.VERSION_11_RELEASE:- return new TypeLookupTable_Android11(reader);- case OatConstants.VERSION_12_RELEASE:- case OatConstants.VERSION_S_V2_PREVIEW:- case OatConstants.VERSION_T_PREVIEW_1:- case OatConstants.VERSION_S_V2_BETA2:- case OatConstants.VERSION_13_RELEASE:- return new TypeLookupTable_Android12(reader);+ case OatConstants.OAT_VERSION_170:+ return new TypeLookupTable_Q(reader);+ case OatConstants.OAT_VERSION_183:+ return new TypeLookupTable_R(reader);+ case OatConstants.OAT_VERSION_195:+ case OatConstants.OAT_VERSION_199:+ case OatConstants.OAT_VERSION_220:+ case OatConstants.OAT_VERSION_223:+ case OatConstants.OAT_VERSION_225:+ return new TypeLookupTable_S_T(reader);default:throw new IOException(new UnsupportedOatVersionException("Unsupported TypeLookupTable for OAT version " + oatVersion));diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/tlt/TypeLookupTable_Nougat.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/tlt/TypeLookupTable_Nougat.javaindex 606a420b95..601566d65d 100644--- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/tlt/TypeLookupTable_Nougat.java+++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/tlt/TypeLookupTable_Nougat.java@@ -24,7 +24,7 @@ import ghidra.program.model.data.*;import ghidra.util.exception.DuplicateNameException;/**- * https://android.googlesource.com/platform/art/+/nougat-release/runtime/type_lookup_table.h+ * <a href="https://android.googlesource.com/platform/art/+/nougat-release/runtime/type_lookup_table.h">nougat-release/runtime/type_lookup_table.h</a>*/public class TypeLookupTable_Nougat extends TypeLookupTable {diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/tlt/TypeLookupTable_Oreo.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/tlt/TypeLookupTable_Oreo.javaindex a707cbac7f..f2553a0f65 100644--- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/tlt/TypeLookupTable_Oreo.java+++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/tlt/TypeLookupTable_Oreo.java@@ -24,8 +24,9 @@ import ghidra.program.model.data.*;import ghidra.util.exception.DuplicateNameException;/**- * https://android.googlesource.com/platform/art/+/oreo-release/runtime/type_lookup_table.h#161- * https://android.googlesource.com/platform/art/+/oreo-m2-release/runtime/type_lookup_table.h#161+ * <a href="https://android.googlesource.com/platform/art/+/oreo-release/runtime/type_lookup_table.h#161">oreo-release/runtime/type_lookup_table.h</a>+ * <br>+ * <a href="https://android.googlesource.com/platform/art/+/oreo-m2-release/runtime/type_lookup_table.h#161">oreo-m2-release/runtime/type_lookup_table.h</a>*/public class TypeLookupTable_Oreo extends TypeLookupTable {diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/tlt/TypeLookupTable_Pie.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/tlt/TypeLookupTable_Pie.javaindex 27765fadb8..f94ea32bbe 100644--- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/tlt/TypeLookupTable_Pie.java+++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/tlt/TypeLookupTable_Pie.java@@ -24,8 +24,9 @@ import ghidra.program.model.data.*;import ghidra.util.exception.DuplicateNameException;/**- * https://android.googlesource.com/platform/art/+/oreo-release/runtime/type_lookup_table.h#161- * https://android.googlesource.com/platform/art/+/oreo-m2-release/runtime/type_lookup_table.h#161+ * <a href="https://android.googlesource.com/platform/art/+/oreo-release/runtime/type_lookup_table.h#161">oreo-release/runtime/type_lookup_table.h</a>+ * <br>+ * <a href="https://android.googlesource.com/platform/art/+/oreo-m2-release/runtime/type_lookup_table.h#161">oreo-m2-release/runtime/type_lookup_table.h</a>*/public class TypeLookupTable_Pie extends TypeLookupTable {diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/tlt/TypeLookupTable_Android10.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/tlt/TypeLookupTable_Q.javasimilarity index 81%rename from Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/tlt/TypeLookupTable_Android10.javarename to Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/tlt/TypeLookupTable_Q.javaindex c224a6abc0..109735dc63 100644--- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/tlt/TypeLookupTable_Android10.java+++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/tlt/TypeLookupTable_Q.java@@ -24,9 +24,9 @@ import ghidra.program.model.data.*;import ghidra.util.exception.DuplicateNameException;/**- * https://android.googlesource.com/platform/art/+/refs/heads/android10-release/libdexfile/dex/type_lookup_table.h#35+ * <a href="https://android.googlesource.com/platform/art/+/refs/heads/android10-release/libdexfile/dex/type_lookup_table.h#35">android10-release/libdexfile/dex/type_lookup_table.h</a>*/-public class TypeLookupTable_Android10 extends TypeLookupTable {+public class TypeLookupTable_Q extends TypeLookupTable {private int dex_file_begin_;private int mask_bits_;@@ -35,14 +35,14 @@ public class TypeLookupTable_Android10 extends TypeLookupTable {protected List<TypeLookupTableEntry> entryList = new ArrayList<>();- public TypeLookupTable_Android10(BinaryReader reader) throws IOException {+ public TypeLookupTable_Q(BinaryReader reader) throws IOException {dex_file_begin_ = reader.readNextInt();mask_bits_ = reader.readNextInt();entries_ = reader.readNextInt();owns_entries_ = reader.readNextInt();while (true) {- TypeLookupTableEntry entry = new TypeLookupTableEntry_Android10(reader);+ TypeLookupTableEntry entry = new TypeLookupTableEntry_Q_R_S_T(reader);entryList.add(entry);if (entry.isEmpty()) {break;@@ -76,7 +76,7 @@ public class TypeLookupTable_Android10 extends TypeLookupTable {@Overridepublic DataType toDataType() throws DuplicateNameException, IOException {Structure structure = new StructureDataType(- TypeLookupTable_Android10.class.getSimpleName() + "_" + entryList.size(), 0);+ TypeLookupTable_Q.class.getSimpleName() + "_" + entryList.size(), 0);structure.add(DWORD, "dex_file_begin_", null);structure.add(DWORD, "mask_bits_", null);structure.add(DWORD, "entries_", null);diff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/tlt/TypeLookupTable_Android11.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/tlt/TypeLookupTable_R.javasimilarity index 73%rename from Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/tlt/TypeLookupTable_Android11.javarename to Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/tlt/TypeLookupTable_R.javaindex e6fd61ab19..6ac326c39a 100644--- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/tlt/TypeLookupTable_Android11.java+++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/tlt/TypeLookupTable_R.java@@ -22,12 +22,11 @@ import ghidra.program.model.data.DataType;import ghidra.util.exception.DuplicateNameException;/**- * https://android.googlesource.com/platform/art/+/refs/heads/android11-release/libdexfile/dex/type_lookup_table.h#35- *+ * <a href="https://android.googlesource.com/platform/art/+/refs/heads/android11-release/libdexfile/dex/type_lookup_table.h#35">android11-release/libdexfile/dex/type_lookup_table.h</a>*/-public class TypeLookupTable_Android11 extends TypeLookupTable_Android10 {+public class TypeLookupTable_R extends TypeLookupTable_Q {- public TypeLookupTable_Android11(BinaryReader reader) throws IOException {+ public TypeLookupTable_R(BinaryReader reader) throws IOException {super(reader);}@@ -36,7 +35,7 @@ public class TypeLookupTable_Android11 extends TypeLookupTable_Android10 {DataType dataType = super.toDataType();try {dataType.setName(- TypeLookupTable_Android11.class.getSimpleName() + "_" + entryList.size());+ TypeLookupTable_R.class.getSimpleName() + "_" + entryList.size());}catch (Exception e) {//ignorediff --git a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/tlt/TypeLookupTable_Android12.java b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/tlt/TypeLookupTable_S_T.javasimilarity index 64%rename from Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/tlt/TypeLookupTable_Android12.javarename to Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/tlt/TypeLookupTable_S_T.javaindex efe0012d60..b58164da14 100644--- a/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/tlt/TypeLookupTable_Android12.java+++ b/Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/android/oat/tlt/TypeLookupTable_S_T.java@@ -22,11 +22,13 @@ import ghidra.program.model.data.DataType;import ghidra.util.exception.DuplicateNameException;/**- * https://android.googlesource.com/platform/art/+/refs/heads/android12-release/libdexfile/dex/type_lookup_table.h#35+ * <a href="https://android.googlesource.com/platform/art/+/refs/heads/android12-release/libdexfile/dex/type_lookup_table.h#35">android12-release/libdexfile/dex/type_lookup_table.h</a>+ * <br>+ * <a href="https://android.googlesource.com/platform/art/+/refs/heads/android13-release/libdexfile/dex/type_lookup_table.h#35">android13-release/libdexfile/dex/type_lookup_table.h</a>*/-public class TypeLookupTable_Android12 extends TypeLookupTable_Android10 {+public class TypeLookupTable_S_T extends TypeLookupTable_Q {- public TypeLookupTable_Android12(BinaryReader reader) throws IOException {+ public TypeLookupTable_S_T(BinaryReader reader) throws IOException {super(reader);}@@ -35,7 +37,7 @@ public class TypeLookupTable_Android12 extends TypeLookupTable_Android10 {DataType dataType = super.toDataType();try {dataType.setName(- TypeLookupTable_Android12.class.getSimpleName() + "_" + entryList.size());+ TypeLookupTable_S_T.class.getSimpleName() + "_" + entryList.size());}catch (Exception e) {//ignore