runtime: Invert the default for dexopt-on-cache

The growth of /system apps and total /data space are making this
device-breaking (insufficient space to dexopt everything to
/cache), pointless (/data has more than enough room to hold
the cache), and in some cases, both.
The default behavior is now the same as mainline Android's: dexopt
everything to /data. Set dalvik.vm.dexopt-data-only=0 to change
that and dexopt /system apps to /cache. If you do that, make sure
your /cache can accomodate double the size of the dex classes in
system, since that has been observed during dex2oat

Change-Id: I8c1debee6e16a6fb162e42a7c9a47ec076eb69df
diff --git a/runtime/ b/runtime/
index 285e337..6cd5a93 100644
--- a/runtime/
+++ b/runtime/
@@ -1217,7 +1217,7 @@
   std::string dalvik_cache(GetDalvikCacheOrDie(GetAndroidData()));
   char dexoptDataOnly[PROPERTY_VALUE_MAX];
-  property_get("dalvik.vm.dexopt-data-only", dexoptDataOnly, "");
+  property_get("dalvik.vm.dexopt-data-only", dexoptDataOnly, "1");
   if ((StartsWith(location, "/system")) && (strcmp(dexoptDataOnly, "1") != 0)) {
       dalvik_cache = GetDalvikCacheOrDie(GetAndroidCache());