Disable StrictMode when booting with art

Change-Id: I2a19136ec960399f2d492d010e74f4d05817af86
diff --git a/Android.mk b/Android.mk
index 61e5e9a..995ddae 100644
--- a/Android.mk
+++ b/Android.mk
@@ -188,6 +188,8 @@
 	cp $(TARGET_OUT_SHARED_LIBRARIES_UNSTRIPPED)/libartd.so $(TARGET_OUT_SHARED_LIBRARIES_UNSTRIPPED)/libdvm.so
 	cp $(TARGET_OUT_EXECUTABLES)/oatoptd $(TARGET_OUT_EXECUTABLES)/dexopt
 	cp $(TARGET_OUT_EXECUTABLES_UNSTRIPPED)/oatoptd $(TARGET_OUT_EXECUTABLES_UNSTRIPPED)/dexopt
+	mkdir -p $(TARGET_OUT_DATA)/property
+	echo -n 1 > $(TARGET_OUT_DATA)/property/persist.sys.strictmode.disabled
 	adb remount
 	adb sync
 
@@ -207,6 +209,7 @@
 	cp $(call intermediates-dir-for,SHARED_LIBRARIES,libdvm)/LINKED/libdvm.so $(TARGET_OUT_SHARED_LIBRARIES_UNSTRIPPED)/libdvm.so
 	cp $(call intermediates-dir-for,EXECUTABLES,dexopt)/dexopt $(TARGET_OUT_EXECUTABLES)/dexopt
 	cp $(call intermediates-dir-for,EXECUTABLES,dexopt)/LINKED/dexopt $(TARGET_OUT_EXECUTABLES_UNSTRIPPED)/dexopt
+	adb shell rm /data/property/persist.sys.strictmode.disabled
 	adb remount
 	adb sync
 	cp system/core/rootdir/init.rc $(ANDROID_PRODUCT_OUT)/root/init.rc
diff --git a/build/Android.oat.mk b/build/Android.oat.mk
index 846cda3..00aa8cf 100644
--- a/build/Android.oat.mk
+++ b/build/Android.oat.mk
@@ -47,12 +47,12 @@
 TARGET_CORE_IMG := $(ART_TEST_OUT)/core.art
 
 $(HOST_CORE_OAT): $(HOST_CORE_DEX) $(DEX2OAT_DEPENDENCY)
-	@echo "host dex2oat: $@ ($<)"
+	@echo "host dex2oat: $@ ($?)"
 	@mkdir -p $(dir $@)
 	$(hide) $(DEX2OAT) -Xms16m -Xmx16m $(addprefix --dex-file=,$(filter-out $(DEX2OAT),$^)) --oat=$@ --image=$(HOST_CORE_IMG) --base=$(IMG_HOST_BASE_ADDRESS)
 
 $(TARGET_CORE_OAT): $(TARGET_CORE_DEX) $(DEX2OAT_DEPENDENCY)
-	@echo "target dex2oat: $@ ($<)"
+	@echo "target dex2oat: $@ ($?)"
 	@mkdir -p $(dir $@)
 	$(hide) $(DEX2OAT) -Xms32m -Xmx32m $(addprefix --dex-file=,$(filter-out $(DEX2OAT),$^)) --oat=$@ --image=$(TARGET_CORE_IMG) --base=$(IMG_TARGET_BASE_ADDRESS) --host-prefix=$(PRODUCT_OUT)
 
@@ -68,7 +68,7 @@
 TARGET_BOOT_IMG := $(ART_CACHE_OUT)/boot.art
 
 $(TARGET_BOOT_OAT): $(TARGET_BOOT_DEX) $(DEX2OAT_DEPENDENCY)
-	@echo "target dex2oat: $@ ($<)"
+	@echo "target dex2oat: $@ ($?)"
 	@mkdir -p $(dir $@)
 	$(hide) $(DEX2OAT) -Xms256m -Xmx256m $(addprefix --dex-file=,$(filter-out $(DEX2OAT),$^)) --oat=$@ --image=$(TARGET_BOOT_IMG) --base=$(IMG_TARGET_BASE_ADDRESS) --host-prefix=$(PRODUCT_OUT)
 
diff --git a/build/Android.oattest.mk b/build/Android.oattest.mk
index 876a7d3..77b843d 100644
--- a/build/Android.oattest.mk
+++ b/build/Android.oattest.mk
@@ -39,7 +39,7 @@
 # $(3): boot image
 define build-art-oat
 $(2): $(1) $(3) $(DEX2OAT_DEPENDENCY)
-	@echo "target dex2oat: $$@ ($$<)"
+	@echo "target dex2oat: $$@ ($$?)"
 	$(hide) $(DEX2OAT) -Xms16m -Xmx16m --boot-image=$(3) $(addprefix --dex-file=,$$<) --oat=$$@ --host-prefix=$(PRODUCT_OUT)
 endef