Fix minor issues that prevented DexFuzz to run on host.
BUG=27036745
Change-Id: I8715efb9219f25c6b8ae2d14c5bdcfd83f881d40
diff --git a/tools/dexfuzz/src/dexfuzz/executors/Device.java b/tools/dexfuzz/src/dexfuzz/executors/Device.java
index 4a53957..45538fe 100644
--- a/tools/dexfuzz/src/dexfuzz/executors/Device.java
+++ b/tools/dexfuzz/src/dexfuzz/executors/Device.java
@@ -68,7 +68,13 @@
return envVars.get(key);
}
- private String getHostCoreImagePath() {
+ private String getHostCoreImagePathWithArch() {
+ // TODO: Using host currently implies x86 (see Options.java), change this when generalized.
+ assert(Options.useArchX86);
+ return androidHostOut + "/framework/x86/core.art";
+ }
+
+ private String getHostCoreImagePathNoArch() {
return androidHostOut + "/framework/core.art";
}
@@ -80,7 +86,7 @@
androidHostOut = checkForEnvVar(envVars, "ANDROID_HOST_OUT");
if (Options.executeOnHost) {
- File coreImage = new File(getHostCoreImagePath());
+ File coreImage = new File(getHostCoreImagePathWithArch());
if (!coreImage.exists()) {
Log.errorAndQuit("Host core image not found at " + coreImage.getPath()
+ ". Did you forget to build it?");
@@ -156,7 +162,7 @@
* Get any extra flags required to execute ART on the host.
*/
public String getHostExecutionFlags() {
- return String.format("-Xnorelocate -Ximage:%s", getHostCoreImagePath());
+ return String.format("-Xnorelocate -Ximage:%s", getHostCoreImagePathNoArch());
}
public String getAndroidHostOut() {