Merge remote-tracking branch 'origin/GP-0_lazybinding-dev_android_refactor'

This commit is contained in:
Ryan Kurtz
2022-09-27 01:54:18 -04:00
139 changed files with 1395 additions and 1214 deletions
@@ -72,7 +72,7 @@ public class ArtAnalyzer extends FileFormatAnalyzer {
BinaryReader reader = new BinaryReader(provider, !program.getLanguage().isBigEndian()); BinaryReader reader = new BinaryReader(provider, !program.getLanguage().isBigEndian());
try { try {
ArtHeader header = ArtFactory.newArtHeader(reader); ArtHeader header = ArtHeaderFactory.newArtHeader(reader);
DataType headerDataType = header.toDataType(); DataType headerDataType = header.toDataType();
@@ -30,54 +30,54 @@ public final class ArtConstants {
public final static int VERSION_LENGTH = 4; public final static int VERSION_LENGTH = 4;
/** <a href="https://android.googlesource.com/platform/art/+/refs/heads/kitkat-release/runtime/image.cc#26">kitkat-release/runtime/image.c */ /** <a href="https://android.googlesource.com/platform/art/+/refs/heads/kitkat-release/runtime/image.cc#26">kitkat-release/runtime/image.c</a> */
public final static String VERSION_KITKAT_RELEASE = "005"; public final static String ART_VERSION_005 = "005";
/** <a href="https://android.googlesource.com/platform/art/+/refs/heads/lollipop-release/runtime/image.cc#26">lollipop-release/runtime/image.c */ /** <a href="https://android.googlesource.com/platform/art/+/refs/heads/lollipop-release/runtime/image.cc#26">lollipop-release/runtime/image.c</a> */
public final static String VERSION_LOLLIPOP_RELEASE = "009"; public final static String ART_VERSION_009 = "009";
/** <a href="https://android.googlesource.com/platform/art/+/refs/heads/lollipop-mr1-wfc-release/runtime/image.cc#26">lollipop-mr1-wfc-release/runtime/image.c */ /** <a href="https://android.googlesource.com/platform/art/+/refs/heads/lollipop-mr1-wfc-release/runtime/image.cc#26">lollipop-mr1-wfc-release/runtime/image.c</a> */
public final static String VERSION_LOLLIPOP_MR1_WFC_RELEASE = "012"; public final static String ART_VERSION_012 = "012";
/** <a href="https://android.googlesource.com/platform/art/+/marshmallow-release/runtime/image.cc#26">marshmallow-release/runtime/image.c */ /** <a href="https://android.googlesource.com/platform/art/+/marshmallow-release/runtime/image.cc#26">marshmallow-release/runtime/image.c</a> */
public final static String VERSION_MARSHMALLOW_RELEASE = "017"; public final static String ART_VERSION_017 = "017";
/** <a href="https://android.googlesource.com/platform/art/+/nougat-release/runtime/image.cc#26">nougat-release/runtime/image.c */ /** <a href="https://android.googlesource.com/platform/art/+/nougat-release/runtime/image.cc#26">nougat-release/runtime/image.c</a> */
public final static String VERSION_NOUGAT_RELEASE = "029"; public final static String ART_VERSION_029 = "029";
/** <a href="https://android.googlesource.com/platform/art/+/nougat-mr2-pixel-release/runtime/image.cc#26">nougat-mr2-pixel-release/runtime/image.c */ /** <a href="https://android.googlesource.com/platform/art/+/nougat-mr2-pixel-release/runtime/image.cc#26">nougat-mr2-pixel-release/runtime/image.c</a> */
public final static String VERSION_NOUGAT_MR2_PIXEL_RELEASE = "030"; public final static String ART_VERSION_030 = "030";
/** <a href="https://android.googlesource.com/platform/art/+/oreo-release/runtime/image.cc#28">oreo-release/runtime/image.c */ /** <a href="https://android.googlesource.com/platform/art/+/oreo-release/runtime/image.cc#28">oreo-release/runtime/image.c</a> */
public final static String VERSION_OREO_RELEASE = "043"; public final static String ART_VERSION_043 = "043";
/** <a href="https://android.googlesource.com/platform/art/+/oreo-dr1-release/runtime/image.cc#28">oreo-dr1-release/runtime/image.c */ /** <a href="https://android.googlesource.com/platform/art/+/oreo-dr1-release/runtime/image.cc#28">oreo-dr1-release/runtime/image.c</a> */
public final static String VERSION_OREO_DR1_RELEASE = "044"; public final static String ART_VERSION_044 = "044";
/** <a href="https://android.googlesource.com/platform/art/+/oreo-mr1-release/runtime/image.cc#28">oreo-mr1-release/runtime/image.c */ /** <a href="https://android.googlesource.com/platform/art/+/oreo-mr1-release/runtime/image.cc#28">oreo-mr1-release/runtime/image.c</a> */
public final static String VERSION_OREO_MR1_RELEASE = "046"; public final static String ART_VERSION_046 = "046";
/** <a href="https://android.googlesource.com/platform/art/+/pie-release/runtime/image.cc#28">pie-release/runtime/image.c */ /** <a href="https://android.googlesource.com/platform/art/+/pie-release/runtime/image.cc#28">pie-release/runtime/image.c</a> */
public final static String VERSION_PIE_RELEASE = "056"; public final static String ART_VERSION_056 = "056";
/** <a href="https://android.googlesource.com/platform/art/+/android10-release/runtime/image.cc#31">android10-release/runtime/image.c */ /** <a href="https://android.googlesource.com/platform/art/+/android10-release/runtime/image.cc#31">android10-release/runtime/image.c</a> */
public final static String VERSION_10_RELEASE = "074";//Q public final static String ART_VERSION_074 = "074";//Q
/** <a href="https://android.googlesource.com/platform/art/+/android11-release/runtime/image.cc#31">android11-release/runtime/image.c */ /** <a href="https://android.googlesource.com/platform/art/+/android11-release/runtime/image.cc#31">android11-release/runtime/image.c</a> */
public final static String VERSION_11_RELEASE = "085";//R public final static String ART_VERSION_085 = "085";//R
/** <a href="https://android.googlesource.com/platform/art/+/android12-release/runtime/image.cc#31">android12-release/runtime/image.c */ /** <a href="https://android.googlesource.com/platform/art/+/android12-release/runtime/image.cc#31">android12-release/runtime/image.c</a> */
public final static String VERSION_12_RELEASE = "099";//S public final static String ART_VERSION_099 = "099";//S
/** <a href="https://android.googlesource.com/platform/art/+/android13-release/runtime/image.cc#31">android13-release/runtime/image.c */ /** <a href="https://android.googlesource.com/platform/art/+/android13-release/runtime/image.cc#31">android13-release/runtime/image.c</a> */
public final static String VERSION_13_RELEASE = "106";//S v2, 13 public final static String ART_VERSION_106 = "106";//S v2, 13
/** /**
* NOTE: only going to support RELEASE versions * NOTE: only going to support RELEASE versions
*/ */
public final static String[] SUPPORTED_VERSIONS = new String[] { public final static String[] SUPPORTED_VERSIONS = new String[] {
//@formatter:off //@formatter:off
VERSION_KITKAT_RELEASE, ART_VERSION_005,
VERSION_LOLLIPOP_RELEASE, ART_VERSION_009,
VERSION_LOLLIPOP_MR1_WFC_RELEASE, ART_VERSION_012,
VERSION_MARSHMALLOW_RELEASE, ART_VERSION_017,
VERSION_NOUGAT_RELEASE, ART_VERSION_029,
VERSION_NOUGAT_MR2_PIXEL_RELEASE, ART_VERSION_030,
VERSION_OREO_RELEASE, ART_VERSION_043,
VERSION_OREO_DR1_RELEASE, ART_VERSION_044,
VERSION_OREO_MR1_RELEASE, ART_VERSION_046,
VERSION_PIE_RELEASE, ART_VERSION_056,
VERSION_10_RELEASE, ART_VERSION_074,
VERSION_11_RELEASE, ART_VERSION_085,
VERSION_12_RELEASE, ART_VERSION_099,
VERSION_13_RELEASE, ART_VERSION_106,
//@formatter:on //@formatter:on
}; };
@@ -1,83 +0,0 @@
/* ###
* 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.art;
import java.io.IOException;
import ghidra.app.util.bin.BinaryReader;
import ghidra.file.formats.android.art.android10.ArtHeader_10;
import ghidra.file.formats.android.art.android11.ArtHeader_11;
import ghidra.file.formats.android.art.android12.ArtHeader_12;
import ghidra.file.formats.android.art.kitkat.ArtHeader_KitKat;
import ghidra.file.formats.android.art.lollipop.ArtHeader_Lollipop;
import ghidra.file.formats.android.art.lollipop.ArtHeader_LollipopMR1WFC;
import ghidra.file.formats.android.art.marshmallow.ArtHeader_Marshmallow;
import ghidra.file.formats.android.art.nougat.ArtHeader_Nougat;
import ghidra.file.formats.android.art.nougat.ArtHeader_NougatMR2Pixel;
import ghidra.file.formats.android.art.oreo.ArtHeader_Oreo;
import ghidra.file.formats.android.art.oreo.ArtHeader_OreoMR1;
import ghidra.file.formats.android.art.pie.ArtHeader_Pie;
public final class ArtFactory {
/**
* Returns an ArtHeader of the correct version.
* @param reader the BinaryReader to the ART header
* @return the specific version of the ART header
* @throws IOException should an error occur during reading or parsing
* @throws UnsupportedArtVersionException when the provided version is invalid or not yet implemented.
*/
public final static ArtHeader newArtHeader(BinaryReader reader)
throws IOException, UnsupportedArtVersionException {
String magic = new String(reader.readByteArray(0, ArtConstants.MAGIC.length()));
String version = reader.readAsciiString(4, 4);
if (magic.equals(ArtConstants.MAGIC)) {
if (ArtConstants.isSupportedVersion(version)) {
switch (version) {
case ArtConstants.VERSION_KITKAT_RELEASE:
return new ArtHeader_KitKat(reader);
case ArtConstants.VERSION_LOLLIPOP_RELEASE:
return new ArtHeader_Lollipop(reader);
case ArtConstants.VERSION_LOLLIPOP_MR1_WFC_RELEASE:
return new ArtHeader_LollipopMR1WFC(reader);
case ArtConstants.VERSION_MARSHMALLOW_RELEASE:
return new ArtHeader_Marshmallow(reader);
case ArtConstants.VERSION_NOUGAT_RELEASE:
return new ArtHeader_Nougat(reader);
case ArtConstants.VERSION_NOUGAT_MR2_PIXEL_RELEASE:
return new ArtHeader_NougatMR2Pixel(reader);
case ArtConstants.VERSION_OREO_RELEASE:
return new ArtHeader_Oreo(reader);
case ArtConstants.VERSION_OREO_DR1_RELEASE:
return new ArtHeader_Oreo(reader);//v043 and v044 are same format
case ArtConstants.VERSION_OREO_MR1_RELEASE:
return new ArtHeader_OreoMR1(reader);
case ArtConstants.VERSION_PIE_RELEASE:
return new ArtHeader_Pie(reader);
case ArtConstants.VERSION_10_RELEASE:
return new ArtHeader_10(reader);
case ArtConstants.VERSION_11_RELEASE:
return new ArtHeader_11(reader);
case ArtConstants.VERSION_12_RELEASE:
case ArtConstants.VERSION_13_RELEASE:
return new ArtHeader_12(reader);
}
}
}
throw new UnsupportedArtVersionException(magic, version);
}
}
@@ -138,7 +138,8 @@ public abstract class ArtHeader implements StructConverter {
@Override @Override
public DataType toDataType() throws DuplicateNameException, IOException { public DataType toDataType() throws DuplicateNameException, IOException {
Structure structure = new StructureDataType(ArtHeader.class.getSimpleName(), 0); Structure structure =
new StructureDataType(ArtHeader.class.getSimpleName() + "_" + version_, 0);
structure.add(STRING, 4, "magic_", null); structure.add(STRING, 4, "magic_", null);
structure.add(STRING, 4, "version_", null); structure.add(STRING, 4, "version_", null);
structure.setCategoryPath(new CategoryPath("/art")); structure.setCategoryPath(new CategoryPath("/art"));
@@ -0,0 +1,73 @@
/* ###
* 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.art;
import java.io.IOException;
import ghidra.app.util.bin.BinaryReader;
import ghidra.file.formats.android.art.headers.*;
public final class ArtHeaderFactory {
/**
* Returns an ArtHeader of the correct version.
* @param reader the BinaryReader to the ART header
* @return the specific version of the ART header
* @throws IOException should an error occur during reading or parsing
* @throws UnsupportedArtVersionException when the provided version is invalid or not yet implemented.
*/
public final static ArtHeader newArtHeader(BinaryReader reader)
throws IOException, UnsupportedArtVersionException {
String magic = new String(reader.readByteArray(0, ArtConstants.MAGIC.length()));
String version = reader.readAsciiString(4, 4);
if (magic.equals(ArtConstants.MAGIC)) {
if (ArtConstants.isSupportedVersion(version)) {
switch (version) {
case ArtConstants.ART_VERSION_005:
return new ArtHeader_005(reader);
case ArtConstants.ART_VERSION_009:
return new ArtHeader_009(reader);
case ArtConstants.ART_VERSION_012:
return new ArtHeader_012(reader);
case ArtConstants.ART_VERSION_017:
return new ArtHeader_017(reader);
case ArtConstants.ART_VERSION_029:
return new ArtHeader_029(reader);
case ArtConstants.ART_VERSION_030:
return new ArtHeader_030(reader);
case ArtConstants.ART_VERSION_043:
return new ArtHeader_043(reader);
case ArtConstants.ART_VERSION_044:
return new ArtHeader_044(reader);
case ArtConstants.ART_VERSION_046:
return new ArtHeader_046(reader);
case ArtConstants.ART_VERSION_056:
return new ArtHeader_056(reader);
case ArtConstants.ART_VERSION_074:
return new ArtHeader_074(reader);
case ArtConstants.ART_VERSION_085:
return new ArtHeader_085(reader);
case ArtConstants.ART_VERSION_099:
return new ArtHeader_099(reader);
case ArtConstants.ART_VERSION_106:
return new ArtHeader_106(reader);
}
}
}
throw new UnsupportedArtVersionException(magic, version);
}
}
@@ -115,7 +115,7 @@ public abstract class ArtImageSections {
reader.setPointerIndex(kSectionArtFields.getOffset()); reader.setPointerIndex(kSectionArtFields.getOffset());
while (reader.getPointerIndex() < Integer while (reader.getPointerIndex() < Integer
.toUnsignedLong(kSectionArtFields.getEnd())) { .toUnsignedLong(kSectionArtFields.getEnd())) {
if (ArtConstants.VERSION_MARSHMALLOW_RELEASE.equals(header.getVersion())) { if (ArtConstants.ART_VERSION_017.equals(header.getVersion())) {
ArtField field = new ArtField(reader); ArtField field = new ArtField(reader);
fieldList.add(field); fieldList.add(field);
} }
@@ -135,7 +135,7 @@ public abstract class ArtImageSections {
reader.setPointerIndex(kSectionArtMethods.getOffset()); reader.setPointerIndex(kSectionArtMethods.getOffset());
while (reader.getPointerIndex() < Integer while (reader.getPointerIndex() < Integer
.toUnsignedLong(kSectionArtMethods.getEnd())) { .toUnsignedLong(kSectionArtMethods.getEnd())) {
if (ArtConstants.VERSION_MARSHMALLOW_RELEASE.equals(header.getVersion())) { if (ArtConstants.ART_VERSION_017.equals(header.getVersion())) {
ArtMethod method = ArtMethod method =
new ArtMethod(reader, header.getPointerSize(), header.getVersion()); new ArtMethod(reader, header.getPointerSize(), header.getVersion());
methodList.add(method); methodList.add(method);
@@ -18,14 +18,7 @@ package ghidra.file.formats.android.art;
import java.io.IOException; import java.io.IOException;
import ghidra.app.util.bin.BinaryReader; import ghidra.app.util.bin.BinaryReader;
import ghidra.file.formats.android.art.android10.ImageSections_10; import ghidra.file.formats.android.art.image_sections.*;
import ghidra.file.formats.android.art.android12.ImageSections_12;
import ghidra.file.formats.android.art.marshmallow.ImageSections_Marshmallow;
import ghidra.file.formats.android.art.nougat.ImageSections_Nougat;
import ghidra.file.formats.android.art.nougat.ImageSections_NougatMR2Pixel;
import ghidra.file.formats.android.art.oreo.ImageSections_Oreo;
import ghidra.file.formats.android.art.oreo.ImageSections_OreoMR1;
import ghidra.file.formats.android.art.pie.ImageSections_Pie;
public final class ArtImageSectionsFactory { public final class ArtImageSectionsFactory {
@@ -39,25 +32,25 @@ public final class ArtImageSectionsFactory {
public static ArtImageSections getArtImageSections(BinaryReader reader, ArtHeader artHeader) public static ArtImageSections getArtImageSections(BinaryReader reader, ArtHeader artHeader)
throws IOException { throws IOException {
switch (artHeader.getVersion()) { switch (artHeader.getVersion()) {
case ArtConstants.VERSION_MARSHMALLOW_RELEASE: case ArtConstants.ART_VERSION_017:
return new ImageSections_Marshmallow(reader, artHeader); return new ImageSections_Marshmallow(reader, artHeader);
case ArtConstants.VERSION_NOUGAT_RELEASE: case ArtConstants.ART_VERSION_029:
return new ImageSections_Nougat(reader, artHeader); return new ImageSections_Nougat(reader, artHeader);
case ArtConstants.VERSION_NOUGAT_MR2_PIXEL_RELEASE: case ArtConstants.ART_VERSION_030:
return new ImageSections_NougatMR2Pixel(reader, artHeader); return new ImageSections_NougatMR2Pixel(reader, artHeader);
case ArtConstants.VERSION_OREO_RELEASE: case ArtConstants.ART_VERSION_043:
case ArtConstants.VERSION_OREO_DR1_RELEASE: case ArtConstants.ART_VERSION_044:
return new ImageSections_Oreo(reader, artHeader); return new ImageSections_Oreo(reader, artHeader);
case ArtConstants.VERSION_OREO_MR1_RELEASE: case ArtConstants.ART_VERSION_046:
return new ImageSections_OreoMR1(reader, artHeader); return new ImageSections_OreoMR1(reader, artHeader);
case ArtConstants.VERSION_PIE_RELEASE: case ArtConstants.ART_VERSION_056:
return new ImageSections_Pie(reader, artHeader); return new ImageSections_Pie(reader, artHeader);
case ArtConstants.VERSION_10_RELEASE: case ArtConstants.ART_VERSION_074:
case ArtConstants.VERSION_11_RELEASE: case ArtConstants.ART_VERSION_085:
return new ImageSections_10(reader, artHeader); return new ImageSections_Q_R(reader, artHeader);
case ArtConstants.VERSION_12_RELEASE: case ArtConstants.ART_VERSION_099:
case ArtConstants.VERSION_13_RELEASE: case ArtConstants.ART_VERSION_106:
return new ImageSections_12(reader, artHeader); return new ImageSections_S_T(reader, artHeader);
} }
throw new IOException( throw new IOException(
"Unsupported ART version for ImageSections: " + artHeader.getVersion()); "Unsupported ART version for ImageSections: " + artHeader.getVersion());
@@ -51,7 +51,7 @@ public class ArtMethod implements StructConverter {
this.pointerSize = pointerSize; this.pointerSize = pointerSize;
this.artVersion = artVersion; this.artVersion = artVersion;
if (ArtConstants.VERSION_MARSHMALLOW_RELEASE.equals(artVersion)) { if (ArtConstants.ART_VERSION_017.equals(artVersion)) {
if (pointerSize == 4) { if (pointerSize == 4) {
declaring_class_ = reader.readNextInt(); declaring_class_ = reader.readNextInt();
dex_cache_resolved_methods_ = Integer.toUnsignedLong(reader.readNextInt()); dex_cache_resolved_methods_ = Integer.toUnsignedLong(reader.readNextInt());
@@ -70,8 +70,8 @@ public class ArtMethod implements StructConverter {
throw new IOException("Unsupported 64-bit ART method format: " + artVersion); throw new IOException("Unsupported 64-bit ART method format: " + artVersion);
} }
} }
else if (ArtConstants.VERSION_NOUGAT_RELEASE.equals(artVersion) || else if (ArtConstants.ART_VERSION_029.equals(artVersion) ||
ArtConstants.VERSION_NOUGAT_MR2_PIXEL_RELEASE.equals(artVersion)) { ArtConstants.ART_VERSION_030.equals(artVersion)) {
if (pointerSize == 4) { if (pointerSize == 4) {
declaring_class_ = reader.readNextInt(); declaring_class_ = reader.readNextInt();
@@ -101,9 +101,9 @@ public class ArtMethod implements StructConverter {
entry_point_from_quick_compiled_code_ = reader.readNextLong(); entry_point_from_quick_compiled_code_ = reader.readNextLong();
} }
} }
else if (ArtConstants.VERSION_OREO_RELEASE.equals(artVersion) || else if (ArtConstants.ART_VERSION_043.equals(artVersion) ||
ArtConstants.VERSION_OREO_DR1_RELEASE.equals(artVersion) || ArtConstants.ART_VERSION_044.equals(artVersion) ||
ArtConstants.VERSION_OREO_MR1_RELEASE.equals(artVersion)) { ArtConstants.ART_VERSION_046.equals(artVersion)) {
if (pointerSize == 4) { if (pointerSize == 4) {
declaring_class_ = reader.readNextInt(); declaring_class_ = reader.readNextInt();
@@ -130,7 +130,7 @@ public class ArtMethod implements StructConverter {
entry_point_from_quick_compiled_code_ = reader.readNextLong(); entry_point_from_quick_compiled_code_ = reader.readNextLong();
} }
} }
else if (ArtConstants.VERSION_PIE_RELEASE.equals(artVersion)) { else if (ArtConstants.ART_VERSION_056.equals(artVersion)) {
declaring_class_ = reader.readNextInt(); declaring_class_ = reader.readNextInt();
access_flags_ = reader.readNextInt(); access_flags_ = reader.readNextInt();
dex_code_item_offset_ = reader.readNextInt(); dex_code_item_offset_ = reader.readNextInt();
@@ -149,7 +149,7 @@ public class ArtMethod implements StructConverter {
} }
} }
/** https://android.googlesource.com/platform/art/+/refs/heads/android10-release/runtime/art_method.h#741 */ /** https://android.googlesource.com/platform/art/+/refs/heads/android10-release/runtime/art_method.h#741 */
else if (ArtConstants.VERSION_10_RELEASE.equals(artVersion)) { else if (ArtConstants.ART_VERSION_074.equals(artVersion)) {
declaring_class_ = reader.readNextInt(); declaring_class_ = reader.readNextInt();
access_flags_ = reader.readNextInt(); access_flags_ = reader.readNextInt();
dex_code_item_offset_ = reader.readNextInt(); dex_code_item_offset_ = reader.readNextInt();
@@ -168,7 +168,7 @@ public class ArtMethod implements StructConverter {
} }
} }
/** https://android.googlesource.com/platform/art/+/refs/heads/android11-release/runtime/art_method.h#798 */ /** https://android.googlesource.com/platform/art/+/refs/heads/android11-release/runtime/art_method.h#798 */
else if (ArtConstants.VERSION_11_RELEASE.equals(artVersion)) { else if (ArtConstants.ART_VERSION_085.equals(artVersion)) {
declaring_class_ = reader.readNextInt(); declaring_class_ = reader.readNextInt();
access_flags_ = reader.readNextInt(); access_flags_ = reader.readNextInt();
dex_code_item_offset_ = reader.readNextInt(); dex_code_item_offset_ = reader.readNextInt();
@@ -187,7 +187,7 @@ public class ArtMethod implements StructConverter {
} }
} }
/** https://android.googlesource.com/platform/art/+/refs/heads/android12-release/runtime/art_method.h#787 */ /** https://android.googlesource.com/platform/art/+/refs/heads/android12-release/runtime/art_method.h#787 */
else if (ArtConstants.VERSION_12_RELEASE.equals(artVersion)) { else if (ArtConstants.ART_VERSION_099.equals(artVersion)) {
declaring_class_ = reader.readNextInt(); declaring_class_ = reader.readNextInt();
access_flags_ = reader.readNextInt(); access_flags_ = reader.readNextInt();
dex_method_index_ = reader.readNextInt(); dex_method_index_ = reader.readNextInt();
@@ -206,7 +206,7 @@ public class ArtMethod implements StructConverter {
} }
} }
/** https://android.googlesource.com/platform/art/+/refs/heads/android13-release/runtime/art_method.h#787 */ /** https://android.googlesource.com/platform/art/+/refs/heads/android13-release/runtime/art_method.h#787 */
else if (ArtConstants.VERSION_13_RELEASE.equals(artVersion)) { else if (ArtConstants.ART_VERSION_106.equals(artVersion)) {
declaring_class_ = reader.readNextInt(); declaring_class_ = reader.readNextInt();
access_flags_ = reader.readNextInt(); access_flags_ = reader.readNextInt();
dex_method_index_ = reader.readNextInt(); dex_method_index_ = reader.readNextInt();
@@ -300,7 +300,7 @@ public class ArtMethod implements StructConverter {
Structure struct = new StructureDataType(ArtMethod.class.getSimpleName(), 0); Structure struct = new StructureDataType(ArtMethod.class.getSimpleName(), 0);
struct.setCategoryPath(new CategoryPath("/art")); struct.setCategoryPath(new CategoryPath("/art"));
if (ArtConstants.VERSION_MARSHMALLOW_RELEASE.equals(artVersion)) { if (ArtConstants.ART_VERSION_017.equals(artVersion)) {
if (pointerSize == 4) { if (pointerSize == 4) {
struct.add(DWORD, "declaring_class_", null); struct.add(DWORD, "declaring_class_", null);
struct.add(DWORD, "dex_cache_resolved_methods_", null); struct.add(DWORD, "dex_cache_resolved_methods_", null);
@@ -318,8 +318,8 @@ public class ArtMethod implements StructConverter {
throw new IOException("Unsupported 64-bit ART method format: " + artVersion); throw new IOException("Unsupported 64-bit ART method format: " + artVersion);
} }
} }
else if (ArtConstants.VERSION_NOUGAT_RELEASE.equals(artVersion) || else if (ArtConstants.ART_VERSION_029.equals(artVersion) ||
ArtConstants.VERSION_NOUGAT_MR2_PIXEL_RELEASE.equals(artVersion)) { ArtConstants.ART_VERSION_030.equals(artVersion)) {
if (pointerSize == 4) { if (pointerSize == 4) {
struct.add(ptr32, "declaring_class_", null); struct.add(ptr32, "declaring_class_", null);
@@ -348,9 +348,9 @@ public class ArtMethod implements StructConverter {
struct.add(ptr64, "entry_point_from_quick_compiled_code_", null); struct.add(ptr64, "entry_point_from_quick_compiled_code_", null);
} }
} }
else if (ArtConstants.VERSION_OREO_RELEASE.equals(artVersion) || else if (ArtConstants.ART_VERSION_043.equals(artVersion) ||
ArtConstants.VERSION_OREO_DR1_RELEASE.equals(artVersion) || ArtConstants.ART_VERSION_044.equals(artVersion) ||
ArtConstants.VERSION_OREO_MR1_RELEASE.equals(artVersion)) { ArtConstants.ART_VERSION_046.equals(artVersion)) {
if (pointerSize == 4) { if (pointerSize == 4) {
struct.add(ptr32, "declaring_class_", null); struct.add(ptr32, "declaring_class_", null);
@@ -376,7 +376,7 @@ public class ArtMethod implements StructConverter {
struct.add(ptr64, "entry_point_from_quick_compiled_code_", null); struct.add(ptr64, "entry_point_from_quick_compiled_code_", null);
} }
} }
else if (ArtConstants.VERSION_PIE_RELEASE.equals(artVersion)) { else if (ArtConstants.ART_VERSION_056.equals(artVersion)) {
struct.add(ptr32, "declaring_class_", null); struct.add(ptr32, "declaring_class_", null);
struct.add(DWORD, "access_flags_", null); struct.add(DWORD, "access_flags_", null);
struct.add(DWORD, "dex_code_item_offset_", null); struct.add(DWORD, "dex_code_item_offset_", null);
@@ -394,7 +394,7 @@ public class ArtMethod implements StructConverter {
struct.add(QWORD, "entry_point_from_quick_compiled_code_", null); struct.add(QWORD, "entry_point_from_quick_compiled_code_", null);
} }
} }
else if (ArtConstants.VERSION_10_RELEASE.equals(artVersion)) { else if (ArtConstants.ART_VERSION_074.equals(artVersion)) {
struct.add(ptr32, "declaring_class_", null); struct.add(ptr32, "declaring_class_", null);
struct.add(DWORD, "access_flags_", null); struct.add(DWORD, "access_flags_", null);
struct.add(DWORD, "dex_code_item_offset_", null); struct.add(DWORD, "dex_code_item_offset_", null);
@@ -412,7 +412,7 @@ public class ArtMethod implements StructConverter {
struct.add(ptr64, "entry_point_from_quick_compiled_code_", null); struct.add(ptr64, "entry_point_from_quick_compiled_code_", null);
} }
} }
else if (ArtConstants.VERSION_11_RELEASE.equals(artVersion)) { else if (ArtConstants.ART_VERSION_085.equals(artVersion)) {
struct.add(ptr32, "declaring_class_", null); struct.add(ptr32, "declaring_class_", null);
struct.add(DWORD, "access_flags_", null); struct.add(DWORD, "access_flags_", null);
struct.add(DWORD, "dex_code_item_offset_", null); struct.add(DWORD, "dex_code_item_offset_", null);
@@ -430,7 +430,7 @@ public class ArtMethod implements StructConverter {
struct.add(QWORD, "entry_point_from_quick_compiled_code_", null); struct.add(QWORD, "entry_point_from_quick_compiled_code_", null);
} }
} }
else if (ArtConstants.VERSION_12_RELEASE.equals(artVersion)) { else if (ArtConstants.ART_VERSION_099.equals(artVersion)) {
struct.add(ptr32, "declaring_class_", null); struct.add(ptr32, "declaring_class_", null);
struct.add(DWORD, "access_flags_", null); struct.add(DWORD, "access_flags_", null);
struct.add(DWORD, "dex_method_index_", null); struct.add(DWORD, "dex_method_index_", null);
@@ -448,7 +448,7 @@ public class ArtMethod implements StructConverter {
struct.add(QWORD, "entry_point_from_quick_compiled_code_", null); struct.add(QWORD, "entry_point_from_quick_compiled_code_", null);
} }
} }
else if (ArtConstants.VERSION_13_RELEASE.equals(artVersion)) { else if (ArtConstants.ART_VERSION_106.equals(artVersion)) {
struct.add(ptr32, "declaring_class_", null); struct.add(ptr32, "declaring_class_", null);
struct.add(DWORD, "access_flags_", null); struct.add(DWORD, "access_flags_", null);
struct.add(DWORD, "dex_method_index_", null); struct.add(DWORD, "dex_method_index_", null);
@@ -1,34 +0,0 @@
/* ###
* 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.art.android11;
/**
* https://android.googlesource.com/platform/art/+/refs/heads/android11-release/runtime/image.h
*/
public enum BootImageLiveObjects {
/** Pre-allocated OOME when throwing exception. */
kOomeWhenThrowingException,
/** Pre-allocated OOME when throwing OOME. */
kOomeWhenThrowingOome,
/** Pre-allocated OOME when handling StackOverflowError. */
kOomeWhenHandlingStackOverflow,
/** Pre-allocated NoClassDefFoundError. */
kNoClassDefFoundError,
/** Pre-allocated sentinel for cleared weak JNI references. */
kClearedJniWeakSentinel,
kIntrinsicObjectsStart;
}
@@ -1,54 +0,0 @@
/* ###
* 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.art.android12;
import java.io.IOException;
import ghidra.app.util.bin.BinaryReader;
import ghidra.file.formats.android.art.android11.ArtHeader_11;
import ghidra.program.model.data.DataType;
import ghidra.program.model.data.Structure;
import ghidra.util.InvalidNameException;
import ghidra.util.exception.DuplicateNameException;
/**
* https://android.googlesource.com/platform/art/+/refs/heads/android-s-beta-4/runtime/image.h#418
* https://android.googlesource.com/platform/art/+/refs/heads/android-s-beta-4/runtime/image.cc#33
*
* https://android.googlesource.com/platform/art/+/refs/heads/android-s-beta-5/runtime/image.h#418
* https://android.googlesource.com/platform/art/+/refs/heads/android-s-beta-5/runtime/image.cc#33
*
* https://android.googlesource.com/platform/art/+/refs/heads/android12-release/runtime/image.h#418
* https://android.googlesource.com/platform/art/+/refs/heads/android12-release/runtime/image.cc#33
*/
public class ArtHeader_12 extends ArtHeader_11 {
public ArtHeader_12(BinaryReader reader) throws IOException {
super(reader);
}
@Override
public DataType toDataType() throws DuplicateNameException, IOException {
Structure structure = (Structure) super.toDataType();
try {
structure.setName(ArtHeader_12.class.getSimpleName());
}
catch (InvalidNameException e) {
// ignore
}
return structure;
}
}
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package ghidra.file.formats.android.art.kitkat; package ghidra.file.formats.android.art.headers;
import java.io.IOException; import java.io.IOException;
@@ -22,14 +22,13 @@ import ghidra.file.formats.android.art.ArtHeader;
import ghidra.program.model.data.DataType; import ghidra.program.model.data.DataType;
import ghidra.program.model.data.Structure; import ghidra.program.model.data.Structure;
import ghidra.program.model.listing.Program; import ghidra.program.model.listing.Program;
import ghidra.util.InvalidNameException;
import ghidra.util.exception.DuplicateNameException; import ghidra.util.exception.DuplicateNameException;
import ghidra.util.task.TaskMonitor; import ghidra.util.task.TaskMonitor;
/** /**
* @see https://android.googlesource.com/platform/art/+/refs/heads/kitkat-release/runtime/image.cc * <a href="https://android.googlesource.com/platform/art/+/refs/heads/kitkat-release/runtime/image.cc#26">kitkat-release/runtime/image.c</a>
*/ */
public class ArtHeader_KitKat extends ArtHeader { public class ArtHeader_005 extends ArtHeader {
protected int image_begin_; protected int image_begin_;
protected int image_size_; protected int image_size_;
@@ -42,7 +41,7 @@ public class ArtHeader_KitKat extends ArtHeader {
protected int oat_file_end_; protected int oat_file_end_;
protected int image_roots_; protected int image_roots_;
public ArtHeader_KitKat(BinaryReader reader) throws IOException { public ArtHeader_005(BinaryReader reader) throws IOException {
super(reader); super(reader);
parse(reader); parse(reader);
} }
@@ -151,13 +150,6 @@ public class ArtHeader_KitKat extends ArtHeader {
public DataType toDataType() throws DuplicateNameException, IOException { public DataType toDataType() throws DuplicateNameException, IOException {
Structure structure = (Structure) super.toDataType(); Structure structure = (Structure) super.toDataType();
try {
structure.setName(ArtHeader_KitKat.class.getSimpleName());
}
catch (InvalidNameException e) {
//ignore
}
structure.add(DWORD, "image_begin_", null); structure.add(DWORD, "image_begin_", null);
structure.add(DWORD, "image_size_", null); structure.add(DWORD, "image_size_", null);
structure.add(DWORD, "image_bitmap_offset_", null); structure.add(DWORD, "image_bitmap_offset_", null);
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package ghidra.file.formats.android.art.lollipop; package ghidra.file.formats.android.art.headers;
import java.io.IOException; import java.io.IOException;
@@ -22,14 +22,13 @@ import ghidra.file.formats.android.art.ArtHeader;
import ghidra.program.model.data.DataType; import ghidra.program.model.data.DataType;
import ghidra.program.model.data.Structure; import ghidra.program.model.data.Structure;
import ghidra.program.model.listing.Program; import ghidra.program.model.listing.Program;
import ghidra.util.InvalidNameException;
import ghidra.util.exception.DuplicateNameException; import ghidra.util.exception.DuplicateNameException;
import ghidra.util.task.TaskMonitor; import ghidra.util.task.TaskMonitor;
/** /**
* @see https://android.googlesource.com/platform/art/+/refs/heads/lollipop-release/runtime/image.cc * <a href="https://android.googlesource.com/platform/art/+/refs/heads/lollipop-release/runtime/image.cc#26">lollipop-release/runtime/image.c</a>
*/ */
public class ArtHeader_Lollipop extends ArtHeader { public class ArtHeader_009 extends ArtHeader {
protected int image_begin_; protected int image_begin_;
protected int image_size_; protected int image_size_;
@@ -43,7 +42,7 @@ public class ArtHeader_Lollipop extends ArtHeader {
protected int patch_delta_; protected int patch_delta_;
protected int image_roots_; protected int image_roots_;
public ArtHeader_Lollipop(BinaryReader reader) throws IOException { public ArtHeader_009(BinaryReader reader) throws IOException {
super(reader); super(reader);
parse(reader); parse(reader);
} }
@@ -127,13 +126,6 @@ public class ArtHeader_Lollipop extends ArtHeader {
public DataType toDataType() throws DuplicateNameException, IOException { public DataType toDataType() throws DuplicateNameException, IOException {
Structure structure = (Structure) super.toDataType(); Structure structure = (Structure) super.toDataType();
try {
structure.setName(ArtHeader_Lollipop.class.getSimpleName());
}
catch (InvalidNameException e) {
//ignore
}
structure.add(DWORD, "image_begin_", null); structure.add(DWORD, "image_begin_", null);
structure.add(DWORD, "image_size_", null); structure.add(DWORD, "image_size_", null);
structure.add(DWORD, "image_bitmap_offset_", null); structure.add(DWORD, "image_bitmap_offset_", null);
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package ghidra.file.formats.android.art.lollipop; package ghidra.file.formats.android.art.headers;
import java.io.IOException; import java.io.IOException;
@@ -22,14 +22,13 @@ import ghidra.file.formats.android.art.ArtHeader;
import ghidra.program.model.data.DataType; import ghidra.program.model.data.DataType;
import ghidra.program.model.data.Structure; import ghidra.program.model.data.Structure;
import ghidra.program.model.listing.Program; import ghidra.program.model.listing.Program;
import ghidra.util.InvalidNameException;
import ghidra.util.exception.DuplicateNameException; import ghidra.util.exception.DuplicateNameException;
import ghidra.util.task.TaskMonitor; import ghidra.util.task.TaskMonitor;
/** /**
* @see https://android.googlesource.com/platform/art/+/lollipop-mr1-wfc-release/runtime/image.h * <a href="https://android.googlesource.com/platform/art/+/refs/heads/lollipop-mr1-wfc-release/runtime/image.cc#26">lollipop-mr1-wfc-release/runtime/image.c</a>
*/ */
public class ArtHeader_LollipopMR1WFC extends ArtHeader { public class ArtHeader_012 extends ArtHeader {
protected int image_begin_; protected int image_begin_;
protected int image_size_; protected int image_size_;
@@ -44,7 +43,7 @@ public class ArtHeader_LollipopMR1WFC extends ArtHeader {
protected int image_roots_; protected int image_roots_;
protected int compile_pic_; protected int compile_pic_;
public ArtHeader_LollipopMR1WFC(BinaryReader reader) throws IOException { public ArtHeader_012(BinaryReader reader) throws IOException {
super(reader); super(reader);
parse(reader); parse(reader);
} }
@@ -126,13 +125,6 @@ public class ArtHeader_LollipopMR1WFC extends ArtHeader {
public DataType toDataType() throws DuplicateNameException, IOException { public DataType toDataType() throws DuplicateNameException, IOException {
Structure structure = (Structure) super.toDataType(); Structure structure = (Structure) super.toDataType();
try {
structure.setName(ArtHeader_LollipopMR1WFC.class.getSimpleName());
}
catch (InvalidNameException e) {
//ignore
}
structure.add(DWORD, "image_begin_", null); structure.add(DWORD, "image_begin_", null);
structure.add(DWORD, "image_size_", null); structure.add(DWORD, "image_size_", null);
structure.add(DWORD, "image_bitmap_offset_", null); structure.add(DWORD, "image_bitmap_offset_", null);
@@ -13,23 +13,23 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package ghidra.file.formats.android.art.marshmallow; package ghidra.file.formats.android.art.headers;
import java.io.IOException; import java.io.IOException;
import ghidra.app.util.bin.BinaryReader; import ghidra.app.util.bin.BinaryReader;
import ghidra.file.formats.android.art.*; import ghidra.file.formats.android.art.*;
import ghidra.file.formats.android.art.image_method.ImageMethod_Marshmallow;
import ghidra.program.model.data.DataType; import ghidra.program.model.data.DataType;
import ghidra.program.model.data.Structure; import ghidra.program.model.data.Structure;
import ghidra.program.model.listing.Program; import ghidra.program.model.listing.Program;
import ghidra.util.InvalidNameException;
import ghidra.util.exception.DuplicateNameException; import ghidra.util.exception.DuplicateNameException;
import ghidra.util.task.TaskMonitor; import ghidra.util.task.TaskMonitor;
/** /**
* @see https://android.googlesource.com/platform/art/+/marshmallow-release/runtime/image.h * <a href="https://android.googlesource.com/platform/art/+/marshmallow-release/runtime/image.cc#26">marshmallow-release/runtime/image.c</a>
*/ */
public class ArtHeader_Marshmallow extends ArtHeader { public class ArtHeader_017 extends ArtHeader {
protected int image_begin_; protected int image_begin_;
protected int image_size_; protected int image_size_;
@@ -48,7 +48,7 @@ public class ArtHeader_Marshmallow extends ArtHeader {
protected ArtImageSections sections; protected ArtImageSections sections;
public ArtHeader_Marshmallow(BinaryReader reader) throws IOException { public ArtHeader_017(BinaryReader reader) throws IOException {
super(reader); super(reader);
parse(reader); parse(reader);
} }
@@ -142,12 +142,6 @@ public class ArtHeader_Marshmallow extends ArtHeader {
public DataType toDataType() throws DuplicateNameException, IOException { public DataType toDataType() throws DuplicateNameException, IOException {
Structure structure = (Structure) super.toDataType(); Structure structure = (Structure) super.toDataType();
try {
structure.setName(ArtHeader_Marshmallow.class.getSimpleName());
}
catch (InvalidNameException e) {
}
structure.add(DWORD, "image_begin_", null); structure.add(DWORD, "image_begin_", null);
structure.add(DWORD, "image_size_", null); structure.add(DWORD, "image_size_", null);
structure.add(DWORD, "oat_checksum_", null); structure.add(DWORD, "oat_checksum_", null);
@@ -13,25 +13,24 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package ghidra.file.formats.android.art.nougat; package ghidra.file.formats.android.art.headers;
import java.io.IOException; import java.io.IOException;
import ghidra.app.util.bin.BinaryReader; import ghidra.app.util.bin.BinaryReader;
import ghidra.file.formats.android.art.*; import ghidra.file.formats.android.art.*;
import ghidra.file.formats.android.art.image_method.ImageMethod_Nougat;
import ghidra.file.formats.android.util.DecompressionManager; import ghidra.file.formats.android.util.DecompressionManager;
import ghidra.program.model.data.DataType; import ghidra.program.model.data.DataType;
import ghidra.program.model.data.Structure; import ghidra.program.model.data.Structure;
import ghidra.program.model.listing.Program; import ghidra.program.model.listing.Program;
import ghidra.util.InvalidNameException;
import ghidra.util.exception.DuplicateNameException; import ghidra.util.exception.DuplicateNameException;
import ghidra.util.task.TaskMonitor; import ghidra.util.task.TaskMonitor;
/** /**
* https://android.googlesource.com/platform/art/+/nougat-release/runtime/image.h * <a href="https://android.googlesource.com/platform/art/+/nougat-release/runtime/image.cc#26">nougat-release/runtime/image.c</a>
* https://android.googlesource.com/platform/art/+/nougat-release/runtime/image.cc
*/ */
public class ArtHeader_Nougat extends ArtHeader implements ArtCompression { public class ArtHeader_029 extends ArtHeader implements ArtCompression {
protected int image_begin_; protected int image_begin_;
protected int image_size_; protected int image_size_;
@@ -56,7 +55,7 @@ public class ArtHeader_Nougat extends ArtHeader implements ArtCompression {
private long _compressedOffset; private long _compressedOffset;
public ArtHeader_Nougat(BinaryReader reader) throws IOException { public ArtHeader_029(BinaryReader reader) throws IOException {
super(reader); super(reader);
parse(reader); parse(reader);
} }
@@ -207,13 +206,6 @@ public class ArtHeader_Nougat extends ArtHeader implements ArtCompression {
public DataType toDataType() throws DuplicateNameException, IOException { public DataType toDataType() throws DuplicateNameException, IOException {
Structure structure = (Structure) super.toDataType(); Structure structure = (Structure) super.toDataType();
try {
structure.setName(ArtHeader_Nougat.class.getSimpleName());
}
catch (InvalidNameException e) {
//ignore, just use original name should this fail
}
structure.add(DWORD, "image_begin_", null); structure.add(DWORD, "image_begin_", null);
structure.add(DWORD, "image_size_", null); structure.add(DWORD, "image_size_", null);
structure.add(DWORD, "oat_checksum_", null); structure.add(DWORD, "oat_checksum_", null);
@@ -13,29 +13,25 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package ghidra.file.formats.android.oat; package ghidra.file.formats.android.art.headers;
import java.io.IOException; import java.io.IOException;
import ghidra.app.util.bin.BinaryReader; import ghidra.app.util.bin.BinaryReader;
import ghidra.program.model.data.DataType; import ghidra.file.formats.android.art.image_method.ImageMethod_Nougat;
import ghidra.util.exception.DuplicateNameException;
public class OatHeader_Oreo extends OatHeader_Marshmallow { /**
* <a href="https://android.googlesource.com/platform/art/+/nougat-mr2-pixel-release/runtime/image.cc#26">nougat-mr2-pixel-release/runtime/image.c</a>
*/
public class ArtHeader_030 extends ArtHeader_029 {
OatHeader_Oreo(BinaryReader reader) throws IOException { public ArtHeader_030(BinaryReader reader) throws IOException {
super(reader); super(reader);
} }
@Override @Override
public DataType toDataType() throws DuplicateNameException, IOException { public int getArtMethodCountForVersion() {
DataType dataType = super.toDataType(); return ImageMethod_Nougat.kImageMethodsCount.ordinal();
try {
dataType.setName(OatHeader_Oreo.class.getSimpleName());
}
catch (Exception e) {
//ignore
}
return dataType;
} }
} }
@@ -13,29 +13,25 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package ghidra.file.formats.android.oat; package ghidra.file.formats.android.art.headers;
import java.io.IOException; import java.io.IOException;
import ghidra.app.util.bin.BinaryReader; import ghidra.app.util.bin.BinaryReader;
import ghidra.program.model.data.DataType; import ghidra.file.formats.android.art.image_method.ImageMethod_Oreo;
import ghidra.util.exception.DuplicateNameException;
public class OatHeader_Nougat extends OatHeader_Marshmallow { /**
* <a href="https://android.googlesource.com/platform/art/+/oreo-release/runtime/image.cc#28">oreo-release/runtime/image.c</a>
*/
public class ArtHeader_043 extends ArtHeader_030 {
OatHeader_Nougat(BinaryReader reader) throws IOException { public ArtHeader_043(BinaryReader reader) throws IOException {
super(reader); super(reader);
} }
@Override @Override
public DataType toDataType() throws DuplicateNameException, IOException { public int getArtMethodCountForVersion() {
DataType dataType = super.toDataType(); return ImageMethod_Oreo.kImageMethodsCount.ordinal();
try {
dataType.setName(OatHeader_Nougat.class.getSimpleName());
}
catch (Exception e) {
//ignore
}
return dataType;
} }
} }
@@ -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.art.headers;
import java.io.IOException;
import ghidra.app.util.bin.BinaryReader;
/**
* <a href="https://android.googlesource.com/platform/art/+/oreo-dr1-release/runtime/image.cc#28">oreo-dr1-release/runtime/image.c</a>
*/
public class ArtHeader_044 extends ArtHeader_043 {
public ArtHeader_044(BinaryReader reader) throws IOException {
super(reader);
}
}
@@ -13,29 +13,25 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package ghidra.file.formats.android.vdex; package ghidra.file.formats.android.art.headers;
import java.io.IOException; import java.io.IOException;
import ghidra.app.util.bin.BinaryReader; import ghidra.app.util.bin.BinaryReader;
import ghidra.program.model.data.DataType; import ghidra.file.formats.android.art.image_method.ImageMethod_Oreo;
import ghidra.util.exception.DuplicateNameException;
public class VdexHeader_11 extends VdexHeader_10 { /**
* <a href="https://android.googlesource.com/platform/art/+/oreo-mr1-release/runtime/image.cc#28">oreo-mr1-release/runtime/image.c</a>
*/
public class ArtHeader_046 extends ArtHeader_044 {
public VdexHeader_11(BinaryReader reader) throws IOException, UnsupportedVdexVersionException { public ArtHeader_046(BinaryReader reader) throws IOException {
super(reader); super(reader);
} }
@Override @Override
public DataType toDataType() throws DuplicateNameException, IOException { public int getArtMethodCountForVersion() {
DataType dataType = super.toDataType(); return ImageMethod_Oreo.kImageMethodsCount.ordinal();
try {
dataType.setName(VdexHeader_11.class.getSimpleName());
}
catch (Exception e) {
//ignore...
}
return dataType;
} }
} }
@@ -13,24 +13,24 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package ghidra.file.formats.android.art.pie; package ghidra.file.formats.android.art.headers;
import java.io.IOException; import java.io.IOException;
import ghidra.app.util.bin.BinaryReader; import ghidra.app.util.bin.BinaryReader;
import ghidra.file.formats.android.art.*; import ghidra.file.formats.android.art.*;
import ghidra.file.formats.android.art.image_method.ImageMethod_Pie;
import ghidra.file.formats.android.util.DecompressionManager; import ghidra.file.formats.android.util.DecompressionManager;
import ghidra.program.model.data.DataType; import ghidra.program.model.data.DataType;
import ghidra.program.model.data.Structure; import ghidra.program.model.data.Structure;
import ghidra.program.model.listing.Program; import ghidra.program.model.listing.Program;
import ghidra.util.InvalidNameException;
import ghidra.util.exception.DuplicateNameException; import ghidra.util.exception.DuplicateNameException;
import ghidra.util.task.TaskMonitor; import ghidra.util.task.TaskMonitor;
/** /**
* https://android.googlesource.com/platform/art/+/refs/heads/pie-release/runtime/image.h * <a href="https://android.googlesource.com/platform/art/+/pie-release/runtime/image.cc#28">pie-release/runtime/image.c</a>
*/ */
public class ArtHeader_Pie extends ArtHeader implements ArtCompression { public class ArtHeader_056 extends ArtHeader implements ArtCompression {
protected int image_begin_; protected int image_begin_;
protected int image_size_; protected int image_size_;
@@ -57,7 +57,7 @@ public class ArtHeader_Pie extends ArtHeader implements ArtCompression {
private long _compressedOffset; private long _compressedOffset;
public ArtHeader_Pie(BinaryReader reader) throws IOException { public ArtHeader_056(BinaryReader reader) throws IOException {
super(reader); super(reader);
parse(reader); parse(reader);
} }
@@ -204,13 +204,6 @@ public class ArtHeader_Pie extends ArtHeader implements ArtCompression {
public DataType toDataType() throws DuplicateNameException, IOException { public DataType toDataType() throws DuplicateNameException, IOException {
Structure structure = (Structure) super.toDataType(); Structure structure = (Structure) super.toDataType();
try {
structure.setName(ArtHeader_Pie.class.getSimpleName());
}
catch (InvalidNameException e) {
//ignore
}
structure.add(DWORD, "image_begin_", null); structure.add(DWORD, "image_begin_", null);
structure.add(DWORD, "image_size_", null); structure.add(DWORD, "image_size_", null);
structure.add(DWORD, "oat_checksum_", null); structure.add(DWORD, "oat_checksum_", null);
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package ghidra.file.formats.android.art.android10; package ghidra.file.formats.android.art.headers;
import java.io.IOException; import java.io.IOException;
import java.util.ArrayList; import java.util.ArrayList;
@@ -21,18 +21,18 @@ import java.util.List;
import ghidra.app.util.bin.BinaryReader; import ghidra.app.util.bin.BinaryReader;
import ghidra.file.formats.android.art.*; import ghidra.file.formats.android.art.*;
import ghidra.file.formats.android.art.image_method.ImageMethod_Q;
import ghidra.file.formats.android.util.DecompressionManager; import ghidra.file.formats.android.util.DecompressionManager;
import ghidra.program.model.data.DataType; import ghidra.program.model.data.DataType;
import ghidra.program.model.data.Structure; import ghidra.program.model.data.Structure;
import ghidra.program.model.listing.Program; import ghidra.program.model.listing.Program;
import ghidra.util.InvalidNameException;
import ghidra.util.exception.DuplicateNameException; import ghidra.util.exception.DuplicateNameException;
import ghidra.util.task.TaskMonitor; import ghidra.util.task.TaskMonitor;
/** /**
* https://android.googlesource.com/platform/art/+/refs/heads/android10-release/runtime/image.h * <a href="https://android.googlesource.com/platform/art/+/android10-release/runtime/image.cc#31">android10-release/runtime/image.c</a>
*/ */
public class ArtHeader_10 extends ArtHeader { public class ArtHeader_074 extends ArtHeader {
private int image_reservation_size_; private int image_reservation_size_;
private int component_count_; private int component_count_;
@@ -48,7 +48,7 @@ public class ArtHeader_10 extends ArtHeader {
private int boot_image_size_; private int boot_image_size_;
private int image_roots_; private int image_roots_;
private int pointer_size_; private int pointer_size_;
private long[] image_methods_ = new long[ImageMethod_10.kImageMethodsCount.ordinal()]; private long[] image_methods_ = new long[ImageMethod_Q.kImageMethodsCount.ordinal()];
private int data_size_; private int data_size_;
private int blocks_offset_; private int blocks_offset_;
private int blocks_count_; private int blocks_count_;
@@ -56,7 +56,7 @@ public class ArtHeader_10 extends ArtHeader {
private ArtImageSections sections; private ArtImageSections sections;
public ArtHeader_10(BinaryReader reader) throws IOException { public ArtHeader_074(BinaryReader reader) throws IOException {
super(reader); super(reader);
parse(reader); parse(reader);
} }
@@ -104,7 +104,7 @@ public class ArtHeader_10 extends ArtHeader {
@Override @Override
public int getArtMethodCountForVersion() { public int getArtMethodCountForVersion() {
return ImageMethod_10.kImageMethodsCount.ordinal(); return ImageMethod_Q.kImageMethodsCount.ordinal();
} }
@Override @Override
@@ -196,13 +196,6 @@ public class ArtHeader_10 extends ArtHeader {
public DataType toDataType() throws DuplicateNameException, IOException { public DataType toDataType() throws DuplicateNameException, IOException {
Structure structure = (Structure) super.toDataType(); Structure structure = (Structure) super.toDataType();
try {
structure.setName(ArtHeader_10.class.getSimpleName());
}
catch (InvalidNameException e) {
// ignore, just use original name should this fail
}
structure.add(DWORD, "image_reservation_size_", null); structure.add(DWORD, "image_reservation_size_", null);
structure.add(DWORD, "component_count_", null); structure.add(DWORD, "component_count_", null);
structure.add(DWORD, "image_begin_", null); structure.add(DWORD, "image_begin_", null);
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package ghidra.file.formats.android.art.android11; package ghidra.file.formats.android.art.headers;
import java.io.IOException; import java.io.IOException;
import java.util.ArrayList; import java.util.ArrayList;
@@ -21,19 +21,18 @@ import java.util.List;
import ghidra.app.util.bin.BinaryReader; import ghidra.app.util.bin.BinaryReader;
import ghidra.file.formats.android.art.*; import ghidra.file.formats.android.art.*;
import ghidra.file.formats.android.art.android10.ImageMethod_10; import ghidra.file.formats.android.art.image_method.ImageMethod_Q;
import ghidra.file.formats.android.util.DecompressionManager; import ghidra.file.formats.android.util.DecompressionManager;
import ghidra.program.model.data.DataType; import ghidra.program.model.data.DataType;
import ghidra.program.model.data.Structure; import ghidra.program.model.data.Structure;
import ghidra.program.model.listing.Program; import ghidra.program.model.listing.Program;
import ghidra.util.InvalidNameException;
import ghidra.util.exception.DuplicateNameException; import ghidra.util.exception.DuplicateNameException;
import ghidra.util.task.TaskMonitor; import ghidra.util.task.TaskMonitor;
/** /**
* https://android.googlesource.com/platform/art/+/refs/heads/android10-release/runtime/image.h * <a href="https://android.googlesource.com/platform/art/+/android11-release/runtime/image.cc#31">android11-release/runtime/image.c</a>
*/ */
public class ArtHeader_11 extends ArtHeader { public class ArtHeader_085 extends ArtHeader {
private int image_reservation_size_; private int image_reservation_size_;
private int component_count_; private int component_count_;
@@ -51,7 +50,7 @@ public class ArtHeader_11 extends ArtHeader {
private int boot_image_checksum_; private int boot_image_checksum_;
private int image_roots_; private int image_roots_;
private int pointer_size_; private int pointer_size_;
private long[] image_methods_ = new long[ImageMethod_10.kImageMethodsCount.ordinal()]; private long[] image_methods_ = new long[ImageMethod_Q.kImageMethodsCount.ordinal()];
private int data_size_; private int data_size_;
private int blocks_offset_; private int blocks_offset_;
private int blocks_count_; private int blocks_count_;
@@ -59,7 +58,7 @@ public class ArtHeader_11 extends ArtHeader {
private ArtImageSections sections; private ArtImageSections sections;
public ArtHeader_11(BinaryReader reader) throws IOException { public ArtHeader_085(BinaryReader reader) throws IOException {
super(reader); super(reader);
parse(reader); parse(reader);
} }
@@ -109,7 +108,7 @@ public class ArtHeader_11 extends ArtHeader {
@Override @Override
public int getArtMethodCountForVersion() { public int getArtMethodCountForVersion() {
return ImageMethod_10.kImageMethodsCount.ordinal(); return ImageMethod_Q.kImageMethodsCount.ordinal();
} }
@Override @Override
@@ -208,13 +207,6 @@ public class ArtHeader_11 extends ArtHeader {
public DataType toDataType() throws DuplicateNameException, IOException { public DataType toDataType() throws DuplicateNameException, IOException {
Structure structure = (Structure) super.toDataType(); Structure structure = (Structure) super.toDataType();
try {
structure.setName(ArtHeader_11.class.getSimpleName());
}
catch (InvalidNameException e) {
//ignore
}
structure.add(DWORD, "image_reservation_size_", null); structure.add(DWORD, "image_reservation_size_", null);
structure.add(DWORD, "component_count_", null); structure.add(DWORD, "component_count_", null);
structure.add(DWORD, "image_begin_", null); structure.add(DWORD, "image_begin_", null);
@@ -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.art.headers;
import java.io.IOException;
import ghidra.app.util.bin.BinaryReader;
/**
* <a href="https://android.googlesource.com/platform/art/+/android12-release/runtime/image.cc#31">android12-release/runtime/image.c</a>
*/
public class ArtHeader_099 extends ArtHeader_085 {
public ArtHeader_099(BinaryReader reader) throws IOException {
super(reader);
}
}
@@ -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.art.headers;
import java.io.IOException;
import ghidra.app.util.bin.BinaryReader;
/**
* <a href="https://android.googlesource.com/platform/art/+/android13-release/runtime/image.cc#31">android13-release/runtime/image.c</a>
*/
public class ArtHeader_106 extends ArtHeader_099 {
public ArtHeader_106(BinaryReader reader) throws IOException {
super(reader);
}
}
@@ -13,10 +13,10 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package ghidra.file.formats.android.art.marshmallow; package ghidra.file.formats.android.art.image_method;
/** /**
* https://android.googlesource.com/platform/art/+/refs/heads/pie-release/runtime/image.h * <a href="https://android.googlesource.com/platform/art/+/refs/heads/marshmallow-release/runtime/image.h#125">marshmallow-release/runtime/image.h</a>
*/ */
public enum ImageMethod_Marshmallow { public enum ImageMethod_Marshmallow {
kResolutionMethod, kResolutionMethod,
@@ -13,10 +13,10 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package ghidra.file.formats.android.art.nougat; package ghidra.file.formats.android.art.image_method;
/** /**
* https://android.googlesource.com/platform/art/+/refs/heads/pie-release/runtime/image.h * <a href="https://android.googlesource.com/platform/art/+/refs/heads/nougat-release/runtime/image.h#177">nougat-release/runtime/image.h</a>
*/ */
public enum ImageMethod_Nougat { public enum ImageMethod_Nougat {
kResolutionMethod, kResolutionMethod,
@@ -13,10 +13,10 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package ghidra.file.formats.android.art.oreo; package ghidra.file.formats.android.art.image_method;
/** /**
* https://android.googlesource.com/platform/art/+/refs/heads/oreo-release/runtime/image.h * <a href="https://android.googlesource.com/platform/art/+/refs/heads/oreo-release/runtime/image.h#178">oreo-release/runtime/image.h</a>
*/ */
public enum ImageMethod_Oreo { public enum ImageMethod_Oreo {
kResolutionMethod, kResolutionMethod,
@@ -13,10 +13,10 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package ghidra.file.formats.android.art.pie; package ghidra.file.formats.android.art.image_method;
/** /**
* https://android.googlesource.com/platform/art/+/refs/heads/pie-release/runtime/image.h * <a href="https://android.googlesource.com/platform/art/+/refs/heads/pie-release/runtime/image.h#194">pie-release/runtime/image.h</a>
*/ */
public enum ImageMethod_Pie { public enum ImageMethod_Pie {
kResolutionMethod, kResolutionMethod,
@@ -13,12 +13,12 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package ghidra.file.formats.android.art.android10; package ghidra.file.formats.android.art.image_method;
/** /**
* https://android.googlesource.com/platform/art/+/refs/heads/android10-release/runtime/image.h * <a href="https://android.googlesource.com/platform/art/+/refs/heads/android10-release/runtime/image.h#209">android10-release/runtime/image.h</a>
*/ */
public enum ImageMethod_10 { public enum ImageMethod_Q {
kResolutionMethod, kResolutionMethod,
kImtConflictMethod, kImtConflictMethod,
kImtUnimplementedMethod, kImtUnimplementedMethod,
@@ -13,10 +13,10 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package ghidra.file.formats.android.art.kitkat; package ghidra.file.formats.android.art.image_root;
/** /**
* @see https://android.googlesource.com/platform/art/+/refs/heads/kitkat-release/runtime/image.h * <a href="https://android.googlesource.com/platform/art/+/refs/heads/kitkat-release/runtime/image.h#91">kitkat-release/runtime/image.h</a>
*/ */
public enum ImageRoot_KitKat { public enum ImageRoot_KitKat {
kResolutionMethod, kResolutionMethod,
@@ -13,10 +13,10 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package ghidra.file.formats.android.art.lollipop; package ghidra.file.formats.android.art.image_root;
/** /**
* @see https://android.googlesource.com/platform/art/+/refs/heads/lollipop-release/runtime/image.h * <a href="https://android.googlesource.com/platform/art/+/refs/heads/lollipop-release/runtime/image.h#105">lollipop-release/runtime/image.h</a>
*/ */
public enum ImageRoot_Lollipop { public enum ImageRoot_Lollipop {
kResolutionMethod, kResolutionMethod,
@@ -13,10 +13,10 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package ghidra.file.formats.android.art.lollipop; package ghidra.file.formats.android.art.image_root;
/** /**
* @see https://android.googlesource.com/platform/art/+/lollipop-mr1-wfc-release/runtime/image.h * <a href="https://android.googlesource.com/platform/art/+/refs/heads/lollipop-mr1-wfc-release/runtime/image.h#106">lollipop-mr1-wfc-release/runtime/image.h</a>
*/ */
public enum ImageRoot_LollipopMR1WRC { public enum ImageRoot_LollipopMR1WRC {
kResolutionMethod, kResolutionMethod,
@@ -13,10 +13,10 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package ghidra.file.formats.android.art.marshmallow; package ghidra.file.formats.android.art.image_root;
/** /**
* @see https://android.googlesource.com/platform/art/+/marshmallow-release/runtime/image.h * <a href="https://android.googlesource.com/platform/art/+/refs/heads/marshmallow-release/runtime/image.h#125">marshmallow-release/runtime/image.h</a>
*/ */
public enum ImageRoot_Marshmallow { public enum ImageRoot_Marshmallow {
kResolutionMethod, kResolutionMethod,
@@ -13,11 +13,13 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package ghidra.file.formats.android.art.nougat; package ghidra.file.formats.android.art.image_root;
/** /**
* @see https://android.googlesource.com/platform/art/+/nougat-release/runtime/image.h * <a href="https://android.googlesource.com/platform/art/+/refs/heads/nougat-release/runtime/image.h#187">nougat-release/runtime/image.h</a>
*/ */
public enum ImageRoot_Nougat { public enum ImageRoot_Nougat {
kDexCaches, kClassRoots, kImageRootsMax, kDexCaches,
kClassRoots,
kImageRootsMax,
} }
@@ -13,10 +13,10 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package ghidra.file.formats.android.art.oreo; package ghidra.file.formats.android.art.image_root;
/** /**
* https://android.googlesource.com/platform/art/+/refs/heads/oreo-release/runtime/image.h * <a href="https://android.googlesource.com/platform/art/+/refs/heads/oreo-release/runtime/image.h#189">oreo-release/runtime/image.h</a>
*/ */
public enum ImageRoot_Oreo { public enum ImageRoot_Oreo {
kDexCaches, kDexCaches,
@@ -13,10 +13,10 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package ghidra.file.formats.android.art.pie; package ghidra.file.formats.android.art.image_root;
/** /**
* https://android.googlesource.com/platform/art/+/nougat-release/runtime/image.h * <a href="https://android.googlesource.com/platform/art/+/refs/heads/pie-release/runtime/image.h#207">pie-release/runtime/image.h</a>
*/ */
public enum ImageRoot_Pie { public enum ImageRoot_Pie {
kDexCaches, kDexCaches,
@@ -13,12 +13,12 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package ghidra.file.formats.android.art.android10; package ghidra.file.formats.android.art.image_root;
/** /**
* https://android.googlesource.com/platform/art/+/refs/heads/android10-release/runtime/image.h * <a href="https://android.googlesource.com/platform/art/+/refs/heads/android10-release/runtime/image.h#222">android10-release/runtime/image.h</a>
*/ */
public enum ImageRoot_10 { public enum ImageRoot_Q {
kDexCaches, kDexCaches,
kClassRoots, kClassRoots,
/** Pre-allocated OOME when throwing exception.*/ /** Pre-allocated OOME when throwing exception.*/
@@ -36,8 +36,8 @@ public enum ImageRoot_10 {
//Aliases //Aliases
/** The class loader used to build the app image.*/ /** The class loader used to build the app image.*/
public final static ImageRoot_10 kAppImageClassLoader = kSpecialRoots; public final static ImageRoot_Q kAppImageClassLoader = kSpecialRoots;
/** Array of boot image objects that must be kept live. */ /** Array of boot image objects that must be kept live. */
public final static ImageRoot_10 kBootImageLiveObjects = kSpecialRoots; public final static ImageRoot_Q kBootImageLiveObjects = kSpecialRoots;
} }
@@ -13,19 +13,19 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package ghidra.file.formats.android.art.android11; package ghidra.file.formats.android.art.image_root;
/** /**
* https://android.googlesource.com/platform/art/+/refs/heads/android11-release/runtime/image.h * <a href="https://android.googlesource.com/platform/art/+/refs/heads/android11-release/runtime/image.h#224">android11-release/runtime/image.h</a>
*/ */
public enum ImageRoot_11 { public enum ImageRoot_R {
kDexCaches, kClassRoots, kSpecialRoots, kImageRootsMax; kDexCaches, kClassRoots, kSpecialRoots, kImageRootsMax;
//Aliases //Aliases
/** The class loader used to build the app image.*/ /** The class loader used to build the app image.*/
public final static ImageRoot_11 kAppImageClassLoader = kSpecialRoots; public final static ImageRoot_R kAppImageClassLoader = kSpecialRoots;
/** Array of boot image objects that must be kept live. */ /** Array of boot image objects that must be kept live. */
public final static ImageRoot_11 kBootImageLiveObjects = kSpecialRoots; public final static ImageRoot_R kBootImageLiveObjects = kSpecialRoots;
} }
@@ -13,12 +13,15 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package ghidra.file.formats.android.art.marshmallow; package ghidra.file.formats.android.art.image_sections;
import ghidra.app.util.bin.BinaryReader; import ghidra.app.util.bin.BinaryReader;
import ghidra.file.formats.android.art.ArtHeader; import ghidra.file.formats.android.art.ArtHeader;
import ghidra.file.formats.android.art.ArtImageSections; import ghidra.file.formats.android.art.ArtImageSections;
/**
* <a href="https://android.googlesource.com/platform/art/+/refs/heads/marshmallow-release/runtime/image.h#141">marshmallow-release/runtime/image.h</a>
*/
public class ImageSections_Marshmallow extends ArtImageSections { public class ImageSections_Marshmallow extends ArtImageSections {
public final static int kSectionObjects = 0; public final static int kSectionObjects = 0;
public final static int kSectionArtFields = 1; public final static int kSectionArtFields = 1;
@@ -13,12 +13,15 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package ghidra.file.formats.android.art.nougat; package ghidra.file.formats.android.art.image_sections;
import ghidra.app.util.bin.BinaryReader; import ghidra.app.util.bin.BinaryReader;
import ghidra.file.formats.android.art.ArtHeader; import ghidra.file.formats.android.art.ArtHeader;
import ghidra.file.formats.android.art.ArtImageSections; import ghidra.file.formats.android.art.ArtImageSections;
/**
* <a href="https://android.googlesource.com/platform/art/+/refs/heads/nougat-release/runtime/image.h#193">nougat-release/runtime/image.h</a>
*/
public class ImageSections_Nougat extends ArtImageSections { public class ImageSections_Nougat extends ArtImageSections {
public final static int kSectionObjects = 0; public final static int kSectionObjects = 0;
public final static int kSectionArtFields = 1; public final static int kSectionArtFields = 1;
@@ -13,12 +13,15 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package ghidra.file.formats.android.art.nougat; package ghidra.file.formats.android.art.image_sections;
import ghidra.app.util.bin.BinaryReader; import ghidra.app.util.bin.BinaryReader;
import ghidra.file.formats.android.art.ArtHeader; import ghidra.file.formats.android.art.ArtHeader;
import ghidra.file.formats.android.art.ArtImageSections; import ghidra.file.formats.android.art.ArtImageSections;
/**
* <a href="https://android.googlesource.com/platform/art/+/refs/heads/nougat-mr2-pixel-release/runtime/image.h#193">nougat-mr2-pixel-release/runtime/image.h</a>
*/
public class ImageSections_NougatMR2Pixel extends ArtImageSections { public class ImageSections_NougatMR2Pixel extends ArtImageSections {
public final static int kSectionObjects = 0; public final static int kSectionObjects = 0;
public final static int kSectionArtFields = 1; public final static int kSectionArtFields = 1;
@@ -13,12 +13,15 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package ghidra.file.formats.android.art.oreo; package ghidra.file.formats.android.art.image_sections;
import ghidra.app.util.bin.BinaryReader; import ghidra.app.util.bin.BinaryReader;
import ghidra.file.formats.android.art.ArtHeader; import ghidra.file.formats.android.art.ArtHeader;
import ghidra.file.formats.android.art.ArtImageSections; import ghidra.file.formats.android.art.ArtImageSections;
/**
* <a href="https://android.googlesource.com/platform/art/+/refs/heads/oreo-release/runtime/image.h#196">oreo-release/runtime/image.h</a>
*/
public class ImageSections_Oreo extends ArtImageSections { public class ImageSections_Oreo extends ArtImageSections {
public final static int kSectionObjects = 0; public final static int kSectionObjects = 0;
public final static int kSectionArtFields = 1; public final static int kSectionArtFields = 1;
@@ -13,12 +13,15 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package ghidra.file.formats.android.art.oreo; package ghidra.file.formats.android.art.image_sections;
import ghidra.app.util.bin.BinaryReader; import ghidra.app.util.bin.BinaryReader;
import ghidra.file.formats.android.art.ArtHeader; import ghidra.file.formats.android.art.ArtHeader;
import ghidra.file.formats.android.art.ArtImageSections; import ghidra.file.formats.android.art.ArtImageSections;
/**
* <a href="https://android.googlesource.com/platform/art/+/refs/heads/oreo-mr1-release/runtime/image.h#203">oreo-mr1-release/runtime/image.h</a>
*/
public class ImageSections_OreoMR1 extends ArtImageSections { public class ImageSections_OreoMR1 extends ArtImageSections {
public final static int kSectionObjects = 0; public final static int kSectionObjects = 0;
public final static int kSectionArtFields = 1; public final static int kSectionArtFields = 1;
@@ -13,12 +13,15 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package ghidra.file.formats.android.art.pie; package ghidra.file.formats.android.art.image_sections;
import ghidra.app.util.bin.BinaryReader; import ghidra.app.util.bin.BinaryReader;
import ghidra.file.formats.android.art.ArtHeader; import ghidra.file.formats.android.art.ArtHeader;
import ghidra.file.formats.android.art.ArtImageSections; import ghidra.file.formats.android.art.ArtImageSections;
/**
* <a href="https://android.googlesource.com/platform/art/+/refs/heads/pie-release/runtime/image.h#214">pie-release/runtime/image.h</a>
*/
public class ImageSections_Pie extends ArtImageSections { public class ImageSections_Pie extends ArtImageSections {
public final static int kSectionObjects = 0; public final static int kSectionObjects = 0;
public final static int kSectionArtFields = 1; public final static int kSectionArtFields = 1;
@@ -13,16 +13,18 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package ghidra.file.formats.android.art.android10; package ghidra.file.formats.android.art.image_sections;
import ghidra.app.util.bin.BinaryReader; import ghidra.app.util.bin.BinaryReader;
import ghidra.file.formats.android.art.ArtHeader; import ghidra.file.formats.android.art.ArtHeader;
import ghidra.file.formats.android.art.ArtImageSections; import ghidra.file.formats.android.art.ArtImageSections;
/** /**
* https://android.googlesource.com/platform/art/+/refs/heads/android10-release/runtime/image.h * <a href="https://android.googlesource.com/platform/art/+/refs/heads/android10-release/runtime/image.h#254">android10-release/runtime/image.h</a>
*
* <a href="https://android.googlesource.com/platform/art/+/refs/heads/android11-release/runtime/image.h#254">android11-release/runtime/image.h</a>
*/ */
public class ImageSections_10 extends ArtImageSections { public class ImageSections_Q_R extends ArtImageSections {
public final static int kSectionObjects = 0; public final static int kSectionObjects = 0;
public final static int kSectionArtFields = 1; public final static int kSectionArtFields = 1;
public final static int kSectionArtMethods = 2; public final static int kSectionArtMethods = 2;
@@ -37,7 +39,7 @@ public class ImageSections_10 extends ArtImageSections {
public final static int kSectionImageBitmap = 11; public final static int kSectionImageBitmap = 11;
public final static int kSectionCount = 12; // Number of elements in enum. public final static int kSectionCount = 12; // Number of elements in enum.
public ImageSections_10(BinaryReader reader, ArtHeader header) { public ImageSections_Q_R(BinaryReader reader, ArtHeader header) {
super(reader, header); super(reader, header);
} }
@@ -13,18 +13,18 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package ghidra.file.formats.android.art.android12; package ghidra.file.formats.android.art.image_sections;
import ghidra.app.util.bin.BinaryReader; import ghidra.app.util.bin.BinaryReader;
import ghidra.file.formats.android.art.ArtHeader; import ghidra.file.formats.android.art.ArtHeader;
import ghidra.file.formats.android.art.ArtImageSections; import ghidra.file.formats.android.art.ArtImageSections;
/** /**
* https://android.googlesource.com/platform/art/+/refs/heads/android-s-beta-4/runtime/image.h#254 * <a href="https://android.googlesource.com/platform/art/+/refs/heads/android12-release/runtime/image.h#254">android12-release/runtime/image.h</a>
* *
* https://android.googlesource.com/platform/art/+/refs/heads/android-s-beta-4/runtime/image.h#254 * <a href="https://android.googlesource.com/platform/art/+/refs/heads/android13-release/runtime/image.h#254">android13-release/runtime/image.h</a>
*/ */
public class ImageSections_12 extends ArtImageSections { public class ImageSections_S_T extends ArtImageSections {
public final static int kSectionObjects = 0; public final static int kSectionObjects = 0;
public final static int kSectionArtFields = 1; public final static int kSectionArtFields = 1;
public final static int kSectionArtMethods = 2; public final static int kSectionArtMethods = 2;
@@ -38,7 +38,7 @@ public class ImageSections_12 extends ArtImageSections {
public final static int kSectionImageBitmap = 10; public final static int kSectionImageBitmap = 10;
public final static int kSectionCount = 11; // Number of elements in enum. public final static int kSectionCount = 11; // Number of elements in enum.
public ImageSections_12(BinaryReader reader, ArtHeader header) { public ImageSections_S_T(BinaryReader reader, ArtHeader header) {
super(reader, header); super(reader, header);
} }
@@ -1,52 +0,0 @@
/* ###
* 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.art.nougat;
import java.io.IOException;
import ghidra.app.util.bin.BinaryReader;
import ghidra.program.model.data.DataType;
import ghidra.program.model.data.Structure;
import ghidra.util.InvalidNameException;
import ghidra.util.exception.DuplicateNameException;
/**
* https://android.googlesource.com/platform/art/+/nougat-mr2-pixel-release/runtime/image.h
*/
public class ArtHeader_NougatMR2Pixel extends ArtHeader_Nougat {
public ArtHeader_NougatMR2Pixel(BinaryReader reader) throws IOException {
super(reader);
}
@Override
public int getArtMethodCountForVersion() {
return ImageMethod_Nougat.kImageMethodsCount.ordinal();
}
@Override
public DataType toDataType() throws DuplicateNameException, IOException {
Structure structure = (Structure) super.toDataType();
try {
structure.setName(ArtHeader_NougatMR2Pixel.class.getSimpleName());
}
catch (InvalidNameException e) {
//ignore
}
return structure;
}
}
@@ -1,53 +0,0 @@
/* ###
* 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.art.oreo;
import java.io.IOException;
import ghidra.app.util.bin.BinaryReader;
import ghidra.file.formats.android.art.nougat.ArtHeader_NougatMR2Pixel;
import ghidra.program.model.data.DataType;
import ghidra.program.model.data.Structure;
import ghidra.util.InvalidNameException;
import ghidra.util.exception.DuplicateNameException;
/**
* https://android.googlesource.com/platform/art/+/oreo-release/runtime/image.h
*/
public class ArtHeader_Oreo extends ArtHeader_NougatMR2Pixel {
public ArtHeader_Oreo(BinaryReader reader) throws IOException {
super(reader);
}
@Override
public int getArtMethodCountForVersion() {
return ImageMethod_Oreo.kImageMethodsCount.ordinal();
}
@Override
public DataType toDataType() throws DuplicateNameException, IOException {
Structure structure = (Structure) super.toDataType();
try {
structure.setName(ArtHeader_Oreo.class.getSimpleName());
}
catch (InvalidNameException e) {
//ignore
}
return structure;
}
}
@@ -1,52 +0,0 @@
/* ###
* 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.art.oreo;
import java.io.IOException;
import ghidra.app.util.bin.BinaryReader;
import ghidra.program.model.data.DataType;
import ghidra.program.model.data.Structure;
import ghidra.util.InvalidNameException;
import ghidra.util.exception.DuplicateNameException;
/**
* https://android.googlesource.com/platform/art/+/oreo-mr1-release/runtime/image.h
*/
public class ArtHeader_OreoMR1 extends ArtHeader_Oreo {
public ArtHeader_OreoMR1(BinaryReader reader) throws IOException {
super(reader);
}
@Override
public int getArtMethodCountForVersion() {
return ImageMethod_Oreo.kImageMethodsCount.ordinal();
}
@Override
public DataType toDataType() throws DuplicateNameException, IOException {
Structure structure = (Structure) super.toDataType();
try {
structure.setName(ArtHeader_OreoMR1.class.getSimpleName());
}
catch (InvalidNameException e) {
//ignore
}
return structure;
}
}
@@ -67,94 +67,94 @@ public final class OatConstants {
// NOTE: we plan to only support RELEASE versions... // NOTE: we plan to only support RELEASE versions...
// Upper case indicates supported version. // Upper case indicates supported version.
/** https://android.googlesource.com/platform/art/+/refs/heads/kitkat-release/runtime/oat.cc#24 */ /** <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 VERSION_KITKAT_RELEASE = "007"; public final static String OAT_VERSION_007 = "007";
/** https://android.googlesource.com/platform/art/+/refs/heads/kitkat-dev/runtime/oat.cc#24 */ /** <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 version_kitkat_dev = "008"; public final static String oat_version_008 = "008";
/** https://android.googlesource.com/platform/art/+/refs/heads/lollipop-release/runtime/oat.cc#25 */ /** <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 VERSION_LOLLIPOP_RELEASE = "039"; public final static String OAT_VERSION_039 = "039";
/** https://android.googlesource.com/platform/art/+/refs/heads/lollipop-mr1-release/runtime/oat.cc#25 */ /** <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 VERSION_LOLLIPOP_MR1_FI_RELEASE = "045"; public final static String OAT_VERSION_045 = "045";
/** https://android.googlesource.com/platform/art/+/refs/heads/lollipop-wear-release/runtime/oat.cc#27 */ /** <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 VERSION_LOLLIPOP_WEAR_RELEASE = "051"; public final static String OAT_VERSION_051 = "051";
/** https://android.googlesource.com/platform/art/+/refs/heads/marshmallow-release/runtime/oat.h#34 */ /** <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 VERSION_MARSHMALLOW_RELEASE = "064"; public final static String OAT_VERSION_064 = "064";
/** https://android.googlesource.com/platform/art/+/refs/heads/nougat-release/runtime/oat.h#34 */ /** <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 VERSION_NOUGAT_RELEASE = "079"; public final static String OAT_VERSION_079 = "079";
/** https://android.googlesource.com/platform/art/+/refs/heads/n-iot-preview-2/runtime/oat.h#34 */ /** <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 version_n_iot_preview_2 = "083"; public final static String oat_version_083 = "083";
/** https://android.googlesource.com/platform/art/+/refs/heads/nougat-mr1-release/runtime/oat.h#34 */ /** <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 VERSION_NOUGAT_MR1_RELEASE = "088"; public final static String OAT_VERSION_088 = "088";
/** https://android.googlesource.com/platform/art/+/refs/heads/o-preview/runtime/oat.h#34 */ /** <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 version_o_preview = "114"; public final static String oat_version_114 = "114";
/** https://android.googlesource.com/platform/art/+/refs/heads/oreo-release/runtime/oat.h#34 */ /** <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 VERSION_OREO_RELEASE = "124"; public final static String OAT_VERSION_124 = "124";
/** https://android.googlesource.com/platform/art/+/refs/heads/n-iot-preview-4/runtime/oat.h#34 */ /** <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 version_n_iot_preview_4 = "125"; public final static String oat_version_125 = "125";
/** https://android.googlesource.com/platform/art/+/refs/heads/oreo-dr3-release/runtime/oat.h#34 */ /** <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 VERSION_OREO_DR3_RELEASE = "126"; public final static String OAT_VERSION_126 = "126";
/** https://android.googlesource.com/platform/art/+/refs/heads/oreo-m2-release/runtime/oat.h#34 */ /** <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 VERSION_OREO_M2_RELEASE = "131"; public final static String OAT_VERSION_131 = "131";
/** https://android.googlesource.com/platform/art/+/refs/heads/o-iot-preview-5/runtime/oat.h#34 */ /** <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 version_o_iot_preview_5 = "132"; public final static String oat_version_132 = "132";
/** https://android.googlesource.com/platform/art/+/refs/heads/o-mr1-iot-preview-6/runtime/oat.h#34 */ /** <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 version_o_mr1_iot_preview_6 = "135"; public final static String oat_version_135 = "135";
/** https://android.googlesource.com/platform/art/+/refs/heads/pie-release/runtime/oat.h#34 */ /** <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 VERSION_PIE_RELEASE = "138"; public final static String OAT_VERSION_138 = "138";
/** https://android.googlesource.com/platform/art/+/refs/heads/o-mr1-iot-preview-7/runtime/oat.h#34 */ /** <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 version_o_mr1_iot_preview_7 = "139"; public final static String oat_version_139 = "139";
/** https://android.googlesource.com/platform/art/+/refs/heads/o-mr1-iot-preview-8/runtime/oat.h#34 */ /** <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 version_o_mr1_iot_preview_8 = "140"; public final static String oat_version_140 = "140";
/** https://android.googlesource.com/platform/art/+/refs/tags/android-o-mr1-iot-release-1.0.0/runtime/oat.h#34 */ /** <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 version_o_mr1_iot_release_1_0_0 = "141"; public final static String oat_version_141 = "141";
/** https://android.googlesource.com/platform/art/+/refs/tags/android-o-mr1-iot-release-1.0.1/runtime/oat.h#34 */ /** <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 version_o_mr1_iot_release_1_0_1 = "146"; public final static String oat_version_146 = "146";
/** https://android.googlesource.com/platform/art/+/refs/tags/android-n-iot-release-polk-at1/runtime/oat.h#34 */ /** <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 version_n_iot_release_polk_at1 = "147"; public final static String oat_version_147 = "147";
/** https://android.googlesource.com/platform/art/+/refs/tags/android-q-preview-1/runtime/oat.h#33 */ /** <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 version_q_preview_1 = "166"; public final static String oat_version_166 = "166";
/** https://android.googlesource.com/platform/art/+/refs/heads/android10-release/runtime/oat.h#34 */ /** <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 VERSION_10_RELEASE = "170"; public final static String OAT_VERSION_170 = "170";
/** https://android.googlesource.com/platform/art/+/refs/heads/android11-release/runtime/oat.h#34 */ /** <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 VERSION_11_RELEASE = "183"; public final static String OAT_VERSION_183 = "183";
/** https://android.googlesource.com/platform/art/+/refs/heads/android12-release/runtime/oat.h#36 */ /** <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 VERSION_12_RELEASE = "195"; public final static String OAT_VERSION_195 = "195";
/** https://android.googlesource.com/platform/art/+/refs/heads/android-s-beta-4/runtime/oat.h#36 */ /** <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 VERSION_S_BETA4 = "197"; public final static String oat_version_197 = "197";
/** https://android.googlesource.com/platform/art/+/refs/heads/android-s-v2-preview-1/runtime/oat.h#36 */ /** <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 VERSION_S_V2_PREVIEW = "199"; public final static String OAT_VERSION_199 = "199";
/** https://android.googlesource.com/platform/art/+/refs/heads/android-t-preview-1/runtime/oat.h#36 */ /** <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 VERSION_T_PREVIEW_1 = "220"; public final static String OAT_VERSION_220 = "220";
/** https://android.googlesource.com/platform/art/+/refs/heads/android-s-v2-beta-3/runtime/oat.h#36 */ /** <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 VERSION_S_V2_BETA2 = "223"; public final static String OAT_VERSION_223 = "223";
/** https://android.googlesource.com/platform/art/+/refs/heads/android13-release/runtime/oat.h#36 */ /** <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 VERSION_13_RELEASE = "225"; public final static String OAT_VERSION_225 = "225";
/** https://android.googlesource.com/platform/art/+/master/runtime/oat.h#36 */ /** <a href="https://android.googlesource.com/platform/art/+/master/runtime/oat.h#36">master/runtime/oat.h</a> */
public final static String VERSION_227 = "227"; public final static String OAT_VERSION_227 = "227";
/** /**
* This array contains versions that have been actively tested and verified. * This array contains versions that have been actively tested and verified.
* All other versions will be considered unsupported until tested on exemplar firmware. * All other versions will be considered unsupported until tested on exemplar firmware.
*/ */
public final static String [] SUPPORTED_VERSIONS = new String [] { public final static String [] SUPPORTED_VERSIONS = new String [] {
VERSION_KITKAT_RELEASE, OAT_VERSION_007,
VERSION_LOLLIPOP_RELEASE, OAT_VERSION_039,
VERSION_LOLLIPOP_MR1_FI_RELEASE, OAT_VERSION_045,
VERSION_LOLLIPOP_WEAR_RELEASE, OAT_VERSION_051,
VERSION_MARSHMALLOW_RELEASE, OAT_VERSION_064,
VERSION_NOUGAT_RELEASE, OAT_VERSION_079,
VERSION_NOUGAT_MR1_RELEASE, OAT_VERSION_088,
VERSION_OREO_RELEASE, OAT_VERSION_124,
VERSION_OREO_DR3_RELEASE, OAT_VERSION_126,
VERSION_OREO_M2_RELEASE, OAT_VERSION_131,
VERSION_PIE_RELEASE, OAT_VERSION_138,
VERSION_10_RELEASE, OAT_VERSION_170,
VERSION_11_RELEASE, OAT_VERSION_183,
VERSION_12_RELEASE, OAT_VERSION_195,
VERSION_S_V2_PREVIEW, OAT_VERSION_199,
VERSION_T_PREVIEW_1, OAT_VERSION_220,
VERSION_S_V2_BETA2, OAT_VERSION_223,
VERSION_13_RELEASE, OAT_VERSION_225,
}; };
//@formatter:on //@formatter:on

Some files were not shown because too many files have changed in this diff Show More