Merge "Include privileged apps with app zip file."
diff --git a/core/64_bit_blacklist.mk b/core/64_bit_blacklist.mk
index 9ae2aa5..4302c47 100644
--- a/core/64_bit_blacklist.mk
+++ b/core/64_bit_blacklist.mk
@@ -21,7 +21,6 @@
 	external/bluetooth/bluedroid \
 	external/oprofile/daemon \
 	external/oprofile/opcontrol \
-	external/tcpdump \
 	frameworks/av \
 	frameworks/base \
 	frameworks/ex \
diff --git a/core/main.mk b/core/main.mk
index d568f8a..2399d2e 100644
--- a/core/main.mk
+++ b/core/main.mk
@@ -1004,6 +1004,7 @@
 
 .PHONY: lintall
 
+ifneq (,$(filter samplecode, $(MAKECMDGOALS)))
 .PHONY: samplecode
 sample_MODULES := $(sort $(call get-tagged-modules,samples))
 sample_APKS_DEST_PATH := $(TARGET_COMMON_OUT_ROOT)/samples
@@ -1017,6 +1018,7 @@
 	@echo "Collect sample code apks: $^"
 	# remove apks that are not intended to be installed.
 	rm -f $(sample_ADDITIONAL_INSTALLED)
+endif  # samplecode in $(MAKECMDGOALS)
 
 .PHONY: findbugs
 findbugs: $(INTERNAL_FINDBUGS_HTML_TARGET) $(INTERNAL_FINDBUGS_XML_TARGET)
diff --git a/target/board/generic_mips/BoardConfig.mk b/target/board/generic_mips/BoardConfig.mk
index e16374b..85bf7d7 100644
--- a/target/board/generic_mips/BoardConfig.mk
+++ b/target/board/generic_mips/BoardConfig.mk
@@ -56,3 +56,17 @@
 BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE := ext4
 BOARD_FLASH_BLOCK_SIZE := 512
 TARGET_USERIMAGES_SPARSE_EXT_DISABLED := true
+
+BOARD_SEPOLICY_DIRS += build/target/board/generic/sepolicy
+BOARD_SEPOLICY_UNION += \
+        adbd.te \
+        bootanim.te \
+        device.te \
+        domain.te \
+        file.te \
+        file_contexts \
+        mediaserver.te \
+        qemud.te \
+        rild.te \
+        surfaceflinger.te \
+        system_server.te
diff --git a/target/board/generic_x86/sepolicy/domain.te b/target/board/generic_x86/sepolicy/domain.te
index 0bc8d87..c17950d 100644
--- a/target/board/generic_x86/sepolicy/domain.te
+++ b/target/board/generic_x86/sepolicy/domain.te
@@ -1 +1,3 @@
+# For /sys/qemu_trace files in the emulator.
+allow domain sysfs_writable:file rw_file_perms;
 allow domain cpuctl_device:dir search;