Merge "Fix audio broken for sdk builds."
diff --git a/core/Makefile b/core/Makefile
index 11a897a..cf09b36 100644
--- a/core/Makefile
+++ b/core/Makefile
@@ -347,9 +347,13 @@
BUILT_RAMDISK_TARGET := $(PRODUCT_OUT)/ramdisk.img
+ifeq ($(HAVE_SELINUX),true)
+SELINUX_DEPENDS := sepolicy file_contexts seapp_contexts
+endif
+
# We just build this directly to the install location.
INSTALLED_RAMDISK_TARGET := $(BUILT_RAMDISK_TARGET)
-$(INSTALLED_RAMDISK_TARGET): $(MKBOOTFS) $(INTERNAL_RAMDISK_FILES) | $(MINIGZIP)
+$(INSTALLED_RAMDISK_TARGET): $(MKBOOTFS) $(INTERNAL_RAMDISK_FILES) $(SELINUX_DEPENDS) | $(MINIGZIP)
$(call pretty,"Target ram disk: $@")
$(hide) $(MKBOOTFS) $(TARGET_ROOT_OUT) | $(MINIGZIP) > $@
@@ -443,7 +447,8 @@
define combine-notice-files
$(1) $(2): PRIVATE_MESSAGE := $(3)
$(1) $(2): PRIVATE_DIR := $(4)
-$(1) $(2): $(5) $(BUILD_SYSTEM)/Makefile build/tools/generate-notice-files.py
+$(1) : $(2)
+$(2) : $(5) $(BUILD_SYSTEM)/Makefile build/tools/generate-notice-files.py
build/tools/generate-notice-files.py $(1) $(2) $$(PRIVATE_MESSAGE) $$(PRIVATE_DIR)/src
notice_files: $(1) $(2)
endef
@@ -459,13 +464,14 @@
tools_notice_file_html := $(HOST_OUT_INTERMEDIATES)/NOTICE.html
kernel_notice_file := $(TARGET_OUT_NOTICE_FILES)/src/kernel.txt
+pdk_fusion_notice_files := $(filter $(TARGET_OUT_NOTICE_FILES)/%, $(ALL_PDK_FUSION_FILES))
$(eval $(call combine-notice-files, \
$(target_notice_file_txt), \
$(target_notice_file_html), \
"Notices for files contained in the filesystem images in this directory:", \
$(TARGET_OUT_NOTICE_FILES), \
- $(ALL_DEFAULT_INSTALLED_MODULES) $(kernel_notice_file)))
+ $(ALL_DEFAULT_INSTALLED_MODULES) $(kernel_notice_file) $(pdk_fusion_notice_files)))
$(eval $(call combine-notice-files, \
$(tools_notice_file_txt), \
@@ -558,6 +564,7 @@
$(if $(BOARD_CACHEIMAGE_PARTITION_SIZE),$(hide) echo "cache_size=$(BOARD_CACHEIMAGE_PARTITION_SIZE)" >> $(1))
$(if $(INTERNAL_USERIMAGES_SPARSE_EXT_FLAG),$(hide) echo "extfs_sparse_flag=$(INTERNAL_USERIMAGES_SPARSE_EXT_FLAG)" >> $(1))
$(if $(mkyaffs2_extra_flags),$(hide) echo "mkyaffs2_extra_flags=$(mkyaffs2_extra_flags)" >> $(1))
+$(if $(filter true, $(strip $(HAVE_SELINUX))), echo "selinux_fc=$(TARGET_ROOT_OUT)/file_contexts" >> $(1))
endef
# -----------------------------------------------------------------
@@ -695,7 +702,7 @@
# $(tests_MODULES))
endif
-FULL_SYSTEMIMAGE_DEPS := $(INTERNAL_SYSTEMIMAGE_FILES) $(INTERNAL_USERIMAGES_DEPS)
+FULL_SYSTEMIMAGE_DEPS := $(INTERNAL_SYSTEMIMAGE_FILES) $(INTERNAL_USERIMAGES_DEPS) $(SELINUX_DEPENDS)
# -----------------------------------------------------------------
# installed file list
# Depending on anything that $(BUILT_SYSTEMIMAGE) depends on.
@@ -804,12 +811,15 @@
stnod: systemtarball-nodeps
#######
-## platform.zip: system in a zip file
+## platform.zip: system, plus other files to be used in PDK fusion build,
+## in a zip file
INSTALLED_PLATFROM_ZIP := $(PRODUCT_OUT)/platform.zip
$(INSTALLED_PLATFROM_ZIP) : $(INTERNAL_SYSTEMIMAGE_FILES)
$(call pretty,"Platform zip package: $(INSTALLED_PLATFROM_ZIP)")
$(hide) rm -f $@
- $(hide) cd $(dir $@) && zip -qry $(notdir $@) system
+ $(hide) cd $(dir $@) && zip -qry $(notdir $@) \
+ $(TARGET_COPY_OUT_SYSTEM) \
+ $(patsubst $(PRODUCT_OUT)/%, %, $(TARGET_OUT_NOTICE_FILES))
.PHONY: platform
platform: $(INSTALLED_PLATFROM_ZIP)
@@ -1130,12 +1140,12 @@
$(INTERNAL_OTA_PACKAGE_TARGET): KEY_CERT_PAIR := $(DEFAULT_KEY_CERT_PAIR)
-$(INTERNAL_OTA_PACKAGE_TARGET): $(BUILT_TARGET_FILES_PACKAGE) $(OTATOOLS)
+$(INTERNAL_OTA_PACKAGE_TARGET): $(BUILT_TARGET_FILES_PACKAGE) $(OTATOOLS) $(SELINUX_DEPENDS)
@echo "Package OTA: $@"
$(hide) ./build/tools/releasetools/ota_from_target_files -v \
-p $(HOST_OUT) \
- -k $(KEY_CERT_PAIR) \
- $(BUILT_TARGET_FILES_PACKAGE) $@
+ -k $(KEY_CERT_PAIR) \
+ $(BUILT_TARGET_FILES_PACKAGE) $@
.PHONY: otapackage
otapackage: $(INTERNAL_OTA_PACKAGE_TARGET)
@@ -1158,7 +1168,7 @@
$(INTERNAL_UPDATE_PACKAGE_TARGET): extensions := $(TARGET_RELEASETOOLS_EXTENSIONS)
endif
-$(INTERNAL_UPDATE_PACKAGE_TARGET): $(BUILT_TARGET_FILES_PACKAGE) $(OTATOOLS)
+$(INTERNAL_UPDATE_PACKAGE_TARGET): $(BUILT_TARGET_FILES_PACKAGE) $(OTATOOLS) $(SELINUX_DEPENDS)
@echo "Package: $@"
$(hide) ./build/tools/releasetools/img_from_target_files -v \
-s $(extensions) \
diff --git a/core/binary.mk b/core/binary.mk
index 852ac46..00a9073 100644
--- a/core/binary.mk
+++ b/core/binary.mk
@@ -510,6 +510,26 @@
asm_objects := $(asm_objects_S) $(asm_objects_s)
+####################################################
+## Import includes
+####################################################
+import_includes := $(intermediates)/import_includes
+import_includes_deps := $(strip \
+ $(foreach l, $(installed_shared_library_module_names), \
+ $(call intermediates-dir-for,SHARED_LIBRARIES,$(l),$(LOCAL_IS_HOST_MODULE))/export_includes) \
+ $(foreach l, $(LOCAL_STATIC_LIBRARIES) $(LOCAL_WHOLE_STATIC_LIBRARIES), \
+ $(call intermediates-dir-for,STATIC_LIBRARIES,$(l),$(LOCAL_IS_HOST_MODULE))/export_includes))
+$(import_includes) : $(import_includes_deps)
+ @echo Import includes file: $@
+ $(hide) mkdir -p $(dir $@) && rm -f $@
+ifdef import_includes_deps
+ $(hide) for f in $^; do \
+ cat $$f >> $@; \
+ done
+else
+ $(hide) touch $@
+endif
+
###########################################################
## Common object handling.
###########################################################
@@ -535,7 +555,7 @@
LOCAL_C_INCLUDES += $(JNI_H_INCLUDE)
endif
-$(all_objects) : | $(LOCAL_GENERATED_SOURCES)
+$(all_objects) : | $(LOCAL_GENERATED_SOURCES) $(import_includes)
ALL_C_CPP_ETC_OBJECTS += $(all_objects)
###########################################################
@@ -635,6 +655,7 @@
$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_RTTI_FLAG := $(LOCAL_RTTI_FLAG)
$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_DEBUG_CFLAGS := $(debug_cflags)
$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_C_INCLUDES := $(LOCAL_C_INCLUDES)
+$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_IMPORT_INCLUDES := $(import_includes)
$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_LDFLAGS := $(LOCAL_LDFLAGS)
$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_LDLIBS := $(LOCAL_LDLIBS)
$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_NO_CRT := $(LOCAL_NO_CRT)
@@ -659,3 +680,19 @@
# are linked into this module. This will force them to be installed
# when this module is.
$(LOCAL_INSTALLED_MODULE): | $(installed_static_library_notice_file_targets)
+
+###########################################################
+# Export includes
+###########################################################
+export_includes := $(intermediates)/export_includes
+$(export_includes): PRIVATE_EXPORT_C_INCLUDE_DIRS := $(LOCAL_EXPORT_C_INCLUDE_DIRS)
+$(export_includes) :
+ @echo Export includes file: $< -- $@
+ $(hide) mkdir -p $(dir $@) && rm -f $@
+ifdef LOCAL_EXPORT_C_INCLUDE_DIRS
+ $(hide) for d in $(PRIVATE_EXPORT_C_INCLUDE_DIRS); do \
+ echo "-I $$d" >> $@; \
+ done
+else
+ $(hide) touch $@
+endif
diff --git a/core/clear_vars.mk b/core/clear_vars.mk
index 6131be7..e3f146e 100644
--- a/core/clear_vars.mk
+++ b/core/clear_vars.mk
@@ -44,6 +44,7 @@
LOCAL_CPPFLAGS:=
LOCAL_RTTI_FLAG:=
LOCAL_C_INCLUDES:=
+LOCAL_EXPORT_C_INCLUDE_DIRS:=
LOCAL_LDFLAGS:=
LOCAL_LDLIBS:=
LOCAL_AAPT_FLAGS:=
diff --git a/core/definitions.mk b/core/definitions.mk
index 0b7092f..6bf3daa 100644
--- a/core/definitions.mk
+++ b/core/definitions.mk
@@ -879,6 +879,7 @@
@echo "target $(PRIVATE_ARM_MODE) C++: $(PRIVATE_MODULE) <= $<"
$(hide) $(PRIVATE_CXX) \
$(addprefix -I , $(PRIVATE_C_INCLUDES)) \
+ @$(PRIVATE_IMPORT_INCLUDES) \
$(addprefix -isystem ,\
$(if $(PRIVATE_NO_DEFAULT_COMPILER_FLAGS),, \
$(filter-out $(PRIVATE_C_INCLUDES), \
@@ -908,6 +909,7 @@
@mkdir -p $(dir $@)
$(hide) $(PRIVATE_CC) \
$(addprefix -I , $(PRIVATE_C_INCLUDES)) \
+ @$(PRIVATE_IMPORT_INCLUDES) \
$(addprefix -isystem ,\
$(if $(PRIVATE_NO_DEFAULT_COMPILER_FLAGS),, \
$(filter-out $(PRIVATE_C_INCLUDES), \
@@ -969,6 +971,7 @@
@echo "host C++: $(PRIVATE_MODULE) <= $<"
$(hide) $(PRIVATE_CXX) \
$(addprefix -I , $(PRIVATE_C_INCLUDES)) \
+ @$(PRIVATE_IMPORT_INCLUDES) \
$(addprefix -isystem ,\
$(if $(PRIVATE_NO_DEFAULT_COMPILER_FLAGS),, \
$(filter-out $(PRIVATE_C_INCLUDES), \
@@ -996,6 +999,7 @@
@mkdir -p $(dir $@)
$(hide) $(PRIVATE_CC) \
$(addprefix -I , $(PRIVATE_C_INCLUDES)) \
+ @$(PRIVATE_IMPORT_INCLUDES) \
$(addprefix -isystem ,\
$(if $(PRIVATE_NO_DEFAULT_COMPILER_FLAGS),, \
$(filter-out $(PRIVATE_C_INCLUDES), \
diff --git a/core/host_shared_library.mk b/core/host_shared_library.mk
index f78b17b..976a942 100644
--- a/core/host_shared_library.mk
+++ b/core/host_shared_library.mk
@@ -18,6 +18,9 @@
ifneq ($(strip $(OVERRIDE_BUILT_MODULE_PATH)),)
$(error $(LOCAL_PATH): Illegal use of OVERRIDE_BUILT_MODULE_PATH)
endif
+ifneq ($(strip $(LOCAL_MODULE_STEM)$(LOCAL_BUILT_MODULE_STEM)),)
+$(error $(LOCAL_PATH): Can not set module stem for a library)
+endif
# Put the built modules of all shared libraries in a common directory
# to simplify the link line.
diff --git a/core/host_static_library.mk b/core/host_static_library.mk
index 39c99ee..b04291b 100644
--- a/core/host_static_library.mk
+++ b/core/host_static_library.mk
@@ -13,6 +13,9 @@
ifeq ($(strip $(LOCAL_MODULE_SUFFIX)),)
LOCAL_MODULE_SUFFIX := .a
endif
+ifneq ($(strip $(LOCAL_MODULE_STEM)$(LOCAL_BUILT_MODULE_STEM)),)
+$(error $(LOCAL_PATH): Can not set module stem for a library)
+endif
LOCAL_UNINSTALLABLE_MODULE := true
LOCAL_IS_HOST_MODULE := true
diff --git a/core/legacy_prebuilts.mk b/core/legacy_prebuilts.mk
index c25880d..f883b02 100644
--- a/core/legacy_prebuilts.mk
+++ b/core/legacy_prebuilts.mk
@@ -85,7 +85,6 @@
libGLESv1_CM_tegra.so \
libGLESv2_POWERVR_SGX530_121.so \
libGLESv2_tegra.so \
- libmdmctrl.a \
libmoto_ril.so \
libpppd_plugin-ril.so \
libril_rds.so \
diff --git a/core/pathmap.mk b/core/pathmap.mk
index 71fc638..581cf83 100644
--- a/core/pathmap.mk
+++ b/core/pathmap.mk
@@ -31,6 +31,7 @@
bluez:external/bluetooth/bluez \
glib:external/bluetooth/glib \
bootloader:bootable/bootloader/legacy/include \
+ camera:system/media/camera/include \
corecg:external/skia/include/core \
dbus:external/dbus \
frameworks-base:frameworks/base/include \
diff --git a/core/prebuilt.mk b/core/prebuilt.mk
index 54a7fa9..0c46341 100644
--- a/core/prebuilt.mk
+++ b/core/prebuilt.mk
@@ -27,6 +27,14 @@
OVERRIDE_BUILT_MODULE_PATH := $($(my_prefix)OUT_INTERMEDIATE_LIBRARIES)
endif
+# Deal with the OSX library timestamp issue when installing
+# a prebuilt simulator library.
+ifneq ($(filter STATIC_LIBRARIES SHARED_LIBRARIES,$(LOCAL_MODULE_CLASS)),)
+ prebuilt_module_is_a_library := true
+else
+ prebuilt_module_is_a_library :=
+endif
+
ifeq ($(LOCAL_STRIP_MODULE),true)
ifdef LOCAL_IS_HOST_MODULE
$(error Cannot strip host module LOCAL_PATH=$(LOCAL_PATH))
@@ -42,14 +50,13 @@
else
include $(BUILD_SYSTEM)/base_rules.mk
built_module := $(LOCAL_BUILT_MODULE)
-endif
-# Deal with the OSX library timestamp issue when installing
-# a prebuilt simulator library.
-ifneq ($(filter STATIC_LIBRARIES SHARED_LIBRARIES,$(LOCAL_MODULE_CLASS)),)
- prebuilt_module_is_a_library := true
-else
- prebuilt_module_is_a_library :=
+ifdef prebuilt_module_is_a_library
+# Create a dummy export_includes.
+$(intermediates)/export_includes:
+ $(hide) mkdir -p $(dir $@) && rm -f $@
+ $(hide) touch $@
+endif
endif
PACKAGES.$(LOCAL_MODULE).OVERRIDES := $(strip $(LOCAL_OVERRIDES_PACKAGES))
@@ -115,6 +122,13 @@
else
$(built_module) : $(LOCAL_PATH)/$(LOCAL_SRC_FILES) | $(ACP)
$(transform-prebuilt-to-target)
+ifneq ($(prebuilt_module_is_a_library),)
+ ifneq ($(LOCAL_IS_HOST_MODULE),)
+ $(transform-host-ranlib-copy-hack)
+ else
+ $(transform-ranlib-copy-hack)
+ endif
+endif
endif
endif
@@ -135,11 +149,3 @@
# make sure the classes.jar and javalib.jar are built before $(LOCAL_BUILT_MODULE)
$(built_module) : $(common_javalib_jar)
endif # TARGET JAVA_LIBRARIES
-
-ifneq ($(prebuilt_module_is_a_library),)
- ifneq ($(LOCAL_IS_HOST_MODULE),)
- $(transform-host-ranlib-copy-hack)
- else
- $(transform-ranlib-copy-hack)
- endif
-endif
diff --git a/core/shared_library.mk b/core/shared_library.mk
index ca639eb..d715349 100644
--- a/core/shared_library.mk
+++ b/core/shared_library.mk
@@ -16,6 +16,9 @@
ifneq ($(strip $(OVERRIDE_BUILT_MODULE_PATH)),)
$(error $(LOCAL_PATH): Illegal use of OVERRIDE_BUILT_MODULE_PATH)
endif
+ifneq ($(strip $(LOCAL_MODULE_STEM)$(LOCAL_BUILT_MODULE_STEM)),)
+$(error $(LOCAL_PATH): Can not set module stem for a library)
+endif
# Put the built targets of all shared libraries in a common directory
# to simplify the link line.
diff --git a/core/static_library.mk b/core/static_library.mk
index 4ff5a34..66e091b 100644
--- a/core/static_library.mk
+++ b/core/static_library.mk
@@ -14,6 +14,9 @@
LOCAL_MODULE_SUFFIX := .a
endif
LOCAL_UNINSTALLABLE_MODULE := true
+ifneq ($(strip $(LOCAL_MODULE_STEM)$(LOCAL_BUILT_MODULE_STEM)),)
+$(error $(LOCAL_PATH): Can not set module stem for a library)
+endif
include $(BUILD_SYSTEM)/binary.mk
diff --git a/core/tasks/factory_ramdisk.mk b/core/tasks/factory_ramdisk.mk
index 2cbea87..576a159 100644
--- a/core/tasks/factory_ramdisk.mk
+++ b/core/tasks/factory_ramdisk.mk
@@ -75,10 +75,15 @@
TARGET_RAMDISK_KERNEL := $(INSTALLED_KERNEL_TARGET)
INSTALLED_FACTORY_RAMDISK_TARGET := $(BUILT_FACTORY_RAMDISK_TARGET)
+ifneq (,$(BOARD_KERNEL_CMDLINE_FACTORY_BOOT))
+ RAMDISK_CMDLINE := --cmdline "$(BOARD_KERNEL_CMDLINE_FACTORY_BOOT)"
+else
+ RAMDISK_CMDLINE :=
+endif
$(INSTALLED_FACTORY_RAMDISK_TARGET) : $(MKBOOTIMG) $(TARGET_RAMDISK_KERNEL) $(INSTALLED_FACTORY_RAMDISK_FS)
$(call pretty,"Target factory ram disk img format: $@")
$(MKBOOTIMG) --kernel $(TARGET_RAMDISK_KERNEL) --ramdisk $(INSTALLED_FACTORY_RAMDISK_FS) \
- --base $(BOARD_KERNEL_BASE) --output $@
+ --base $(BOARD_KERNEL_BASE) $(RAMDISK_CMDLINE) --output $@
endif
diff --git a/target/board/vbox_x86/BoardConfig.mk b/target/board/vbox_x86/BoardConfig.mk
index 94df57c..c2adac3 100644
--- a/target/board/vbox_x86/BoardConfig.mk
+++ b/target/board/vbox_x86/BoardConfig.mk
@@ -10,14 +10,13 @@
BOARD_USES_GENERIC_AUDIO := true
USE_CAMERA_STUB := true
TARGET_PROVIDES_INIT_RC := true
-USE_CUSTOM_RUNTIME_HEAP_MAX := "32M"
TARGET_CPU_ABI := x86
TARGET_USERIMAGES_USE_EXT4 := true
TARGET_BOOTIMAGE_USE_EXT2 := true
# For VirtualBox and likely other emulators
BOARD_INSTALLER_CMDLINE := init=/init console=ttyS0 console=tty0 vga=788 verbose
-BOARD_KERNEL_CMDLINE := init=/init qemu=1 console=ttyS0 console=tty0 vga=788 verbose androidboot.hardware=vbox_x86 androidboot.console=ttyS0 android.qemud=ttyS1
+BOARD_KERNEL_CMDLINE := init=/init qemu=1 console=tty0 vga=788 verbose androidboot.hardware=vbox_x86 androidboot.console=tty0 android.qemud=tty0
TARGET_USE_DISKINSTALLER := true
TARGET_DISK_LAYOUT_CONFIG := build/target/board/vbox_x86/disk_layout.conf
diff --git a/target/board/vbox_x86/device.mk b/target/board/vbox_x86/device.mk
index a650ed6..c7cc189 100644
--- a/target/board/vbox_x86/device.mk
+++ b/target/board/vbox_x86/device.mk
@@ -31,6 +31,8 @@
development/data/etc/vold.conf:system/etc/vold.conf \
development/tools/emulator/system/camera/media_profiles.xml:system/etc/media_profiles.xml \
development/tools/emulator/system/camera/media_codecs.xml:system/etc/media_codecs.xml \
- build/target/board/vbox_x86/init.rc:root/init.rc \
+ system/core/rootdir/init.rc:root/init.rc \
build/target/board/vbox_x86/init.vbox_x86.rc:root/init.vbox_x86.rc \
$(LOCAL_KERNEL):kernel
+
+$(call inherit-product, frameworks/native/build/phone-xhdpi-1024-dalvik-heap.mk)
diff --git a/target/board/vbox_x86/init.rc b/target/board/vbox_x86/init.rc
deleted file mode 100644
index 100cc09..0000000
--- a/target/board/vbox_x86/init.rc
+++ /dev/null
@@ -1,426 +0,0 @@
-on early-init
- start ueventd
-
-on init
-
-sysclktz 0
-
-loglevel 3
-
-# setup the global environment
- export PATH /sbin:/vendor/bin:/system/sbin:/system/bin:/system/xbin
- export LD_LIBRARY_PATH /vendor/lib:/system/lib
- export ANDROID_BOOTLOGO 1
- export ANDROID_ROOT /system
- export ANDROID_ASSETS /system/app
- export ANDROID_DATA /data
- export EXTERNAL_STORAGE /mnt/sdcard
- export ASEC_MOUNTPOINT /mnt/asec
- export LOOP_MOUNTPOINT /mnt/obb
- export BOOTCLASSPATH /system/framework/core.jar:/system/framework/bouncycastle.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/android.policy.jar:/system/framework/services.jar:/system/framework/core-junit.jar
-
-# Backward compatibility
- symlink /system/etc /etc
- symlink /sys/kernel/debug /d
-
-# Right now vendor lives on the same filesystem as system,
-# but someday that may change.
- symlink /system/vendor /vendor
-
-# create mountpoints
- mkdir /mnt 0775 root system
- mkdir /mnt/sdcard 0000 system system
-
-# Create cgroup mount point for cpu accounting
- mkdir /acct
- mount cgroup none /acct cpuacct
- mkdir /acct/uid
-
-# Backwards Compat - XXX: Going away in G*
- symlink /mnt/sdcard /sdcard
-
- mkdir /system
- mkdir /data 0771 system system
- mkdir /cache 0770 system cache
- mkdir /config 0500 root root
-
- # Directory for putting things only root should see.
- mkdir /mnt/secure 0700 root root
-
- # Directory for staging bindmounts
- mkdir /mnt/secure/staging 0700 root root
-
- # Directory-target for where the secure container
- # imagefile directory will be bind-mounted
- mkdir /mnt/secure/asec 0700 root root
-
- # Secure container public mount points.
- mkdir /mnt/asec 0700 root system
- mount tmpfs tmpfs /mnt/asec mode=0755,gid=1000
-
- # Filesystem image public mount points.
- mkdir /mnt/obb 0700 root system
- mount tmpfs tmpfs /mnt/obb mode=0755,gid=1000
-
- write /proc/sys/kernel/panic_on_oops 1
- write /proc/sys/kernel/hung_task_timeout_secs 0
- write /proc/cpu/alignment 4
- write /proc/sys/kernel/sched_latency_ns 10000000
- write /proc/sys/kernel/sched_wakeup_granularity_ns 2000000
- write /proc/sys/kernel/sched_compat_yield 1
- write /proc/sys/kernel/sched_child_runs_first 0
-
-# Create cgroup mount points for process groups
- mkdir /dev/cpuctl
- mount cgroup none /dev/cpuctl cpu
- chown system system /dev/cpuctl
- chown system system /dev/cpuctl/tasks
- chmod 0777 /dev/cpuctl/tasks
- write /dev/cpuctl/cpu.shares 1024
-
- mkdir /dev/cpuctl/fg_boost
- chown system system /dev/cpuctl/fg_boost/tasks
- chmod 0777 /dev/cpuctl/fg_boost/tasks
- write /dev/cpuctl/fg_boost/cpu.shares 1024
-
- mkdir /dev/cpuctl/bg_non_interactive
- chown system system /dev/cpuctl/bg_non_interactive/tasks
- chmod 0777 /dev/cpuctl/bg_non_interactive/tasks
- # 5.0 %
- write /dev/cpuctl/bg_non_interactive/cpu.shares 52
-
-on fs
-# mount sda partitions
- mount ext4 /dev/block/sda6 /system
- mount ext4 /dev/block/sda6 /system ro remount
- mount ext4 /dev/block/sda7 /data nosuid nodev
- mount ext4 /dev/block/sda8 /cache nosuid nodev
-
-on post-fs
- # once everything is setup, no need to modify /
- mount rootfs rootfs / ro remount
-
- # We chown/chmod /data again so because mount is run as root + defaults
- chown system system /data
- chmod 0771 /data
-
- # Create dump dir and collect dumps.
- # Do this before we mount cache so eventually we can use cache for
- # storing dumps on platforms which do not have a dedicated dump partition.
-
- mkdir /data/dontpanic
- chown root log /data/dontpanic
- chmod 0750 /data/dontpanic
-
- # Collect apanic data, free resources and re-arm trigger
- copy /proc/apanic_console /data/dontpanic/apanic_console
- chown root log /data/dontpanic/apanic_console
- chmod 0640 /data/dontpanic/apanic_console
-
- copy /proc/apanic_threads /data/dontpanic/apanic_threads
- chown root log /data/dontpanic/apanic_threads
- chmod 0640 /data/dontpanic/apanic_threads
-
- write /proc/apanic_console 1
-
- # Same reason as /data above
- chown system cache /cache
- chmod 0770 /cache
-
- # This may have been created by the recovery system with odd permissions
- chown system cache /cache/recovery
- chmod 0770 /cache/recovery
-
- #change permissions on vmallocinfo so we can grab it from bugreports
- chown root log /proc/vmallocinfo
- chmod 0440 /proc/vmallocinfo
-
- #change permissions on kmsg & sysrq-trigger so bugreports can grab kthread stacks
- chown root system /proc/kmsg
- chmod 0440 /proc/kmsg
- chown root system /proc/sysrq-trigger
- chmod 0220 /proc/sysrq-trigger
-
-# create basic filesystem structure
- mkdir /data/misc 01771 system misc
- mkdir /data/misc/bluetoothd 0770 bluetooth bluetooth
- mkdir /data/misc/bluetooth 0770 system system
- mkdir /data/misc/keystore 0700 keystore keystore
- mkdir /data/misc/vpn 0770 system system
- mkdir /data/misc/systemkeys 0700 system system
- mkdir /data/misc/vpn/profiles 0770 system system
- # give system access to wpa_supplicant.conf for backup and restore
- mkdir /data/misc/wifi 0770 wifi wifi
- chmod 0770 /data/misc/wifi
- chmod 0660 /data/misc/wifi/wpa_supplicant.conf
- mkdir /data/local 0771 shell shell
- mkdir /data/local/tmp 0771 shell shell
- mkdir /data/data 0771 system system
- mkdir /data/app-private 0771 system system
- mkdir /data/app 0771 system system
- mkdir /data/property 0700 root root
-
- # create dalvik-cache and double-check the perms
- mkdir /data/dalvik-cache 0771 system system
- chown system system /data/dalvik-cache
- chmod 0771 /data/dalvik-cache
-
- # create the lost+found directories, so as to enforce our permissions
- mkdir /data/lost+found 0770
- mkdir /cache/lost+found 0770
-
- # double check the perms, in case lost+found already exists, and set owner
- chown root root /data/lost+found
- chmod 0770 /data/lost+found
- chown root root /cache/lost+found
- chmod 0770 /cache/lost+found
-
- # create data/drm directory
- mkdir /data/drm 0774 drm drm
- chown drm drm /data/drm
- chmod 0774 /data/drm
-
-on boot
-# basic network init
- ifup lo
- hostname localhost
- domainname localdomain
-
-# set RLIMIT_NICE to allow priorities from 19 to -20
- setrlimit 13 40 40
-
-# Define the oom_adj values for the classes of processes that can be
-# killed by the kernel. These are used in ActivityManagerService.
- setprop ro.FOREGROUND_APP_ADJ 0
- setprop ro.VISIBLE_APP_ADJ 1
- setprop ro.PERCEPTIBLE_APP_ADJ 2
- setprop ro.HEAVY_WEIGHT_APP_ADJ 3
- setprop ro.SECONDARY_SERVER_ADJ 4
- setprop ro.BACKUP_APP_ADJ 5
- setprop ro.HOME_APP_ADJ 6
- setprop ro.HIDDEN_APP_MIN_ADJ 7
- setprop ro.EMPTY_APP_ADJ 15
-
-# Define the memory thresholds at which the above process classes will
-# be killed. These numbers are in pages (4k).
- setprop ro.FOREGROUND_APP_MEM 2048
- setprop ro.VISIBLE_APP_MEM 3072
- setprop ro.PERCEPTIBLE_APP_MEM 4096
- setprop ro.HEAVY_WEIGHT_APP_MEM 4096
- setprop ro.SECONDARY_SERVER_MEM 6144
- setprop ro.BACKUP_APP_MEM 6144
- setprop ro.HOME_APP_MEM 6144
- setprop ro.HIDDEN_APP_MEM 7168
- setprop ro.EMPTY_APP_MEM 8192
-
-# Write value must be consistent with the above properties.
-# Note that the driver only supports 6 slots, so we have combined some of
-# the classes into the same memory level; the associated processes of higher
-# classes will still be killed first.
- write /sys/module/lowmemorykiller/parameters/adj 0,1,2,4,7,15
-
- write /proc/sys/vm/overcommit_memory 1
- write /proc/sys/vm/min_free_order_shift 4
- write /sys/module/lowmemorykiller/parameters/minfree 2048,3072,4096,6144,7168,8192
-
- # Set init its forked children's oom_adj.
- write /proc/1/oom_adj -16
-
- # Tweak background writeout
- write /proc/sys/vm/dirty_expire_centisecs 200
- write /proc/sys/vm/dirty_background_ratio 5
-
- # Permissions for System Server and daemons.
- chown radio system /sys/android_power/state
- chown radio system /sys/android_power/request_state
- chown radio system /sys/android_power/acquire_full_wake_lock
- chown radio system /sys/android_power/acquire_partial_wake_lock
- chown radio system /sys/android_power/release_wake_lock
- chown radio system /sys/power/state
- chown radio system /sys/power/wake_lock
- chown radio system /sys/power/wake_unlock
- chmod 0660 /sys/power/state
- chmod 0660 /sys/power/wake_lock
- chmod 0660 /sys/power/wake_unlock
- chown system system /sys/class/timed_output/vibrator/enable
- chown system system /sys/class/leds/keyboard-backlight/brightness
- chown system system /sys/class/leds/lcd-backlight/brightness
- chown system system /sys/class/leds/button-backlight/brightness
- chown system system /sys/class/leds/jogball-backlight/brightness
- chown system system /sys/class/leds/red/brightness
- chown system system /sys/class/leds/green/brightness
- chown system system /sys/class/leds/blue/brightness
- chown system system /sys/class/leds/red/device/grpfreq
- chown system system /sys/class/leds/red/device/grppwm
- chown system system /sys/class/leds/red/device/blink
- chown system system /sys/class/leds/red/brightness
- chown system system /sys/class/leds/green/brightness
- chown system system /sys/class/leds/blue/brightness
- chown system system /sys/class/leds/red/device/grpfreq
- chown system system /sys/class/leds/red/device/grppwm
- chown system system /sys/class/leds/red/device/blink
- chown system system /sys/class/timed_output/vibrator/enable
- chown system system /sys/module/sco/parameters/disable_esco
- chown system system /sys/kernel/ipv4/tcp_wmem_min
- chown system system /sys/kernel/ipv4/tcp_wmem_def
- chown system system /sys/kernel/ipv4/tcp_wmem_max
- chown system system /sys/kernel/ipv4/tcp_rmem_min
- chown system system /sys/kernel/ipv4/tcp_rmem_def
- chown system system /sys/kernel/ipv4/tcp_rmem_max
- chown root radio /proc/cmdline
-
-# Define TCP buffer sizes for various networks
-# ReadMin, ReadInitial, ReadMax, WriteMin, WriteInitial, WriteMax,
- setprop net.tcp.buffersize.default 4096,87380,110208,4096,16384,110208
- setprop net.tcp.buffersize.wifi 4095,87380,110208,4096,16384,110208
- setprop net.tcp.buffersize.umts 4094,87380,110208,4096,16384,110208
- setprop net.tcp.buffersize.edge 4093,26280,35040,4096,16384,35040
- setprop net.tcp.buffersize.gprs 4092,8760,11680,4096,8760,11680
-
- class_start default
-
-## Daemon processes to be run by init.
-##
-service ueventd /sbin/ueventd
- critical
-
-service console /system/bin/sh
- console
- disabled
- user shell
- group log
-
-on property:ro.secure=0
- start console
-
-# adbd is controlled by the persist.service.adb.enable system property
-service adbd /sbin/adbd
- disabled
-
-# adbd on at boot in emulator
-on property:ro.kernel.qemu=1
- start adbd
-
-on property:persist.service.adb.enable=1
- start adbd
-
-on property:persist.service.adb.enable=0
- stop adbd
-
-service servicemanager /system/bin/servicemanager
- user system
- critical
- onrestart restart zygote
- onrestart restart media
-
-service vold /system/bin/vold
- socket vold stream 0660 root mount
- ioprio be 2
-
-service netd /system/bin/netd
- socket netd stream 0660 root system
- socket dnsproxyd stream 0660 root inet
-
-service debuggerd /system/bin/debuggerd
-
-service ril-daemon /system/bin/rild
- socket rild stream 660 root radio
- socket rild-debug stream 660 radio system
- user root
- group radio cache inet misc audio sdcard_rw
-
-service zygote /system/bin/app_process -Xzygote /system/bin --zygote --start-system-server
- socket zygote stream 666
- onrestart write /sys/android_power/request_state wake
- onrestart write /sys/power/state on
- onrestart restart media
- onrestart restart netd
-
-service drm /system/bin/drmserver
- user drm
- group system root inet
-
-service drmio /system/bin/drmioserver
- user drmio
-
-service media /system/bin/mediaserver
- user media
- group system audio camera graphics inet net_bt net_bt_admin net_raw
- ioprio rt 4
-
-service bootanim /system/bin/bootanimation
- user graphics
- group graphics
- disabled
- oneshot
-
-service dbus /system/bin/dbus-daemon --system --nofork
- socket dbus stream 660 bluetooth bluetooth
- user bluetooth
- group bluetooth net_bt_admin
-
-service bluetoothd /system/bin/bluetoothd -n
- socket bluetooth stream 660 bluetooth bluetooth
- socket dbus_bluetooth stream 660 bluetooth bluetooth
- # init.rc does not yet support applying capabilities, so run as root and
- # let bluetoothd drop uid to bluetooth with the right linux capabilities
- group bluetooth net_bt_admin misc
- disabled
-
-service hfag /system/bin/sdptool add --channel=10 HFAG
- user bluetooth
- group bluetooth net_bt_admin
- disabled
- oneshot
-
-service hsag /system/bin/sdptool add --channel=11 HSAG
- user bluetooth
- group bluetooth net_bt_admin
- disabled
- oneshot
-
-service opush /system/bin/sdptool add --channel=12 OPUSH
- user bluetooth
- group bluetooth net_bt_admin
- disabled
- oneshot
-
-service pbap /system/bin/sdptool add --channel=19 PBAP
- user bluetooth
- group bluetooth net_bt_admin
- disabled
- oneshot
-
-service installd /system/bin/installd
- socket installd stream 600 system system
-
-service flash_recovery /system/etc/install-recovery.sh
- oneshot
-
-service racoon /system/bin/racoon
- socket racoon stream 600 system system
- # racoon will setuid to vpn after getting necessary resources.
- group net_admin
- disabled
- oneshot
-
-service mtpd /system/bin/mtpd
- socket mtpd stream 600 system system
- user vpn
- group vpn net_admin net_raw
- disabled
- oneshot
-
-service keystore /system/bin/keystore /data/misc/keystore
- user keystore
- group keystore
- socket keystore stream 666
-
-service dumpstate /system/bin/dumpstate -s
- socket dumpstate stream 0660 shell log
- disabled
- oneshot
-
-# Enable networking so that adb can connect
-service netcfg /system/bin/netcfg eth0 dhcp
- oneshot
diff --git a/target/board/vbox_x86/init.vbox_x86.rc b/target/board/vbox_x86/init.vbox_x86.rc
index 4c5d55c..15ca572 100644
--- a/target/board/vbox_x86/init.vbox_x86.rc
+++ b/target/board/vbox_x86/init.vbox_x86.rc
@@ -1,5 +1,12 @@
+on early-init
+ export EXTERNAL_STORAGE /mnt/sdcard
+ mkdir /mnt/sdcard 0000 system system
+ # for backwards compatibility
+ symlink /mnt/sdcard /sdcard
+
on boot
setprop ARGH ARGH
+ setprop net.eth0.gw 10.0.2.2
setprop net.eth0.dns1 10.0.2.3
setprop net.gprs.local-ip 10.0.2.15
setprop ro.radio.use-ppp no
@@ -16,8 +23,21 @@
stop dund
stop akmd
+# start essential services
+ start qemud
+ start goldfish-logcat
+# start goldfish-setup
+ start netcfg
+
setprop ro.setupwizard.mode EMULATOR
+on fs
+# mount sda (system) and sdb (data) partitions
+ mount ext4 /dev/block/sda6 /system
+ mount ext4 /dev/block/sda6 /system ro remount
+ mount ext4 /dev/block/sdb6 /data nosuid nodev
+ mount ext4 /dev/block/sdb7 /cache nosuid nodev
+
# enable Google-specific location features,
# like NetworkLocationProvider and LocationCollector
setprop ro.com.google.locationfeatures 1
@@ -36,7 +56,21 @@
# something else.
service goldfish-setup /system/etc/init.goldfish.sh
- oneshot
+ user root
+ group root
+ oneshot
+
+# The qemu-props program is used to set various system
+# properties on boot. It must be run early during the boot
+# process to avoid race conditions with other daemons that
+# might read them (e.g. surface flinger), so define it in
+# class 'core'
+#
+service qemu-props /system/bin/qemu-props
+ class core
+ user root
+ group root
+ oneshot
service qemud /system/bin/qemud
socket qemud stream 666
@@ -46,7 +80,11 @@
# program to check wether it runs on the emulator
# if it does, it redirects its output to the device
# named by the androidboot.console kernel option
-# if not, is simply exit immediately
+# if not, it simply exits immediately
service goldfish-logcat /system/bin/logcat -Q
oneshot
+
+# Enable networking so that adb can connect
+service netcfg /system/bin/netcfg eth0 dhcp
+ oneshot
diff --git a/target/product/sdk.mk b/target/product/sdk.mk
index 233d4e0..2d7c07a 100644
--- a/target/product/sdk.mk
+++ b/target/product/sdk.mk
@@ -136,6 +136,7 @@
PRODUCT_PACKAGE_OVERLAYS := development/sdk_overlay
PRODUCT_COPY_FILES := \
+ development/data/etc/apns-conf.xml:system/etc/apns-conf.xml \
system/core/rootdir/etc/vold.fstab:system/etc/vold.fstab \
frameworks/base/data/sounds/effects/camera_click.ogg:system/media/audio/ui/camera_click.ogg \
frameworks/base/data/sounds/effects/VideoRecord.ogg:system/media/audio/ui/VideoRecord.ogg \
diff --git a/tools/droiddoc/templates-sdk/assets/design/default.css b/tools/droiddoc/templates-sdk/assets/design/default.css
index 5000ce8..c568424 100644
--- a/tools/droiddoc/templates-sdk/assets/design/default.css
+++ b/tools/droiddoc/templates-sdk/assets/design/default.css
@@ -18,8 +18,8 @@
background-image: -moz-linear-gradient(top, #dddddd, #f2f2f2, #f2f2f2, #dddddd);
-webkit-font-smoothing: antialiased;
/* prevent subpixel antialiasing, which thickens the text */
- text-rendering: optimizeLegibility;
- /* opentype ftw */ }
+ /* text-rendering: optimizeLegibility; */
+ /* turned off ligatures due to bug 5945455 */ }
body {
color: #555555;
@@ -552,7 +552,7 @@
/* video containers */
.framed-galaxynexus-land-span-13 {
- background: transparent url(content/misc_full_galaxynexus_blank_land_span13.png) no-repeat scroll top left;
+ background: transparent url(device_galaxynexus_blank_land_span13.png) no-repeat scroll top left;
padding: 42px 122px 62px 126px;
overflow: hidden; }
.framed-galaxynexus-land-span-13, .framed-galaxynexus-land-span-13 video, .framed-galaxynexus-land-span-13 img {
@@ -560,7 +560,7 @@
height: 286px; }
.framed-galaxynexus-port-span-9 {
- background: transparent url(content/misc_full_galaxynexus_blank_port_span9.png) no-repeat scroll top left;
+ background: transparent url(device_galaxynexus_blank_port_span9.png) no-repeat scroll top left;
padding: 95px 122px 107px 124px;
overflow: hidden; }
.framed-galaxynexus-port-span-9, .framed-galaxynexus-port-span-9 video, .framed-galaxynexus-port-span-9 img {
@@ -568,7 +568,7 @@
height: 488px; }
.framed-galaxynexus-port-span-5 {
- background: transparent url(content/misc_full_galaxynexus_blank_port_span5.png) no-repeat scroll top left;
+ background: transparent url(device_galaxynexus_blank_port_span5.png) no-repeat scroll top left;
padding: 75px 31px 76px 33px;
overflow: hidden; }
.framed-galaxynexus-port-span-5, .framed-galaxynexus-port-span-5 video, .framed-galaxynexus-port-span-5 img {
@@ -639,3 +639,38 @@
color: #fff !important; }
.download-button:active {
background-color: #006699; }
+
+/* UI tables and other things found in Writing style and Settings pattern */
+.ui-table {
+ width: 100%;
+ background: #282828;
+ color: #fff;
+ border-radius: 2px;
+ box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
+ border-collapse: separate; }
+ .ui-table th,
+ .ui-table td {
+ padding: 5px 10px; }
+ .ui-table thead th {
+ font-weight: 600; }
+ .ui-table tfoot td {
+ border-top: 1px solid #494949;
+ border-right: 1px solid #494949;
+ text-align: center; }
+ .ui-table tfoot td:last-child {
+ border-right: 0; }
+
+.layout-with-list-item-margins {
+ margin-left: 30px !important; }
+
+.emulate-content-left-padding {
+ margin-left: 10px; }
+
+.do-dont-label {
+ margin-bottom: 10px;
+ padding-left: 20px;
+ background: transparent none no-repeat scroll 0px 3px; }
+ .do-dont-label.bad {
+ background-image: url(ico_wrong.png); }
+ .do-dont-label.good {
+ background-image: url(ico_good.png); }
diff --git a/tools/droiddoc/templates-sdk/assets/design/default.scss b/tools/droiddoc/templates-sdk/assets/design/default.scss
index 536ee16..d874ee5 100644
--- a/tools/droiddoc/templates-sdk/assets/design/default.scss
+++ b/tools/droiddoc/templates-sdk/assets/design/default.scss
@@ -79,7 +79,7 @@
background-image: -webkit-gradient(linear, 100% 0%, 100% 100%, from(#ddd), color-stop(25%, #f2f2f2), color-stop(75%, #f2f2f2), to(#ddd));
background-image: -moz-linear-gradient(top, #ddd, #f2f2f2, #f2f2f2, #ddd);
-webkit-font-smoothing: antialiased; /* prevent subpixel antialiasing, which thickens the text */
- text-rendering: optimizeLegibility; /* opentype ftw */
+ /* text-rendering: optimizeLegibility; */ /* turned off ligatures due to bug 5945455 */
}
body {
@@ -617,7 +617,7 @@
/* video containers */
.framed-galaxynexus-land-span-13 {
- background: transparent url(content/misc_full_galaxynexus_blank_land_span13.png) no-repeat scroll top left;
+ background: transparent url(device_galaxynexus_blank_land_span13.png) no-repeat scroll top left;
padding: 42px 122px 62px 126px;
overflow: hidden;
@@ -630,7 +630,7 @@
}
.framed-galaxynexus-port-span-9 {
- background: transparent url(content/misc_full_galaxynexus_blank_port_span9.png) no-repeat scroll top left;
+ background: transparent url(device_galaxynexus_blank_port_span9.png) no-repeat scroll top left;
padding: 95px 122px 107px 124px;
overflow: hidden;
@@ -643,7 +643,7 @@
}
.framed-galaxynexus-port-span-5 {
- background: transparent url(content/misc_full_galaxynexus_blank_port_span5.png) no-repeat scroll top left;
+ background: transparent url(device_galaxynexus_blank_port_span5.png) no-repeat scroll top left;
padding: 75px 31px 76px 33px;
overflow: hidden;
@@ -737,4 +737,56 @@
&:active {
background-color: $ics_blue_darkest;
}
+}
+
+/* UI tables and other things found in Writing style and Settings pattern */
+
+.ui-table {
+ width: 100%;
+ background: #282828;
+ color: #fff;
+ border-radius: 2px;
+ box-shadow: 0 2px 4px rgba(0,0,0,0.25);
+ border-collapse: separate;
+
+ th,
+ td {
+ padding: 5px 10px;
+ }
+
+ thead th {
+ font-weight: 600;
+ }
+
+ tfoot td {
+ border-top: 1px solid #494949;
+ border-right: 1px solid #494949;
+ text-align: center;
+
+ &:last-child {
+ border-right: 0;
+ }
+ }
+}
+
+.layout-with-list-item-margins {
+ margin-left: 30px !important;
+}
+
+.emulate-content-left-padding {
+ margin-left: 10px;
+}
+
+.do-dont-label {
+ margin-bottom: 10px;
+ padding-left: 20px;
+ background: transparent none no-repeat scroll 0px 3px;
+
+ &.bad {
+ background-image: url(ico_wrong.png);
+ }
+
+ &.good {
+ background-image: url(ico_good.png);
+ }
}
\ No newline at end of file
diff --git a/tools/droiddoc/templates-sdk/assets/design/device_galaxynexus_blank_land_span13.png b/tools/droiddoc/templates-sdk/assets/design/device_galaxynexus_blank_land_span13.png
new file mode 100644
index 0000000..bab6aca
--- /dev/null
+++ b/tools/droiddoc/templates-sdk/assets/design/device_galaxynexus_blank_land_span13.png
Binary files differ
diff --git a/tools/droiddoc/templates-sdk/assets/design/device_galaxynexus_blank_port_span5.png b/tools/droiddoc/templates-sdk/assets/design/device_galaxynexus_blank_port_span5.png
new file mode 100644
index 0000000..bdccc2f
--- /dev/null
+++ b/tools/droiddoc/templates-sdk/assets/design/device_galaxynexus_blank_port_span5.png
Binary files differ
diff --git a/tools/droiddoc/templates-sdk/assets/design/device_galaxynexus_blank_port_span9.png b/tools/droiddoc/templates-sdk/assets/design/device_galaxynexus_blank_port_span9.png
new file mode 100644
index 0000000..5e0135b
--- /dev/null
+++ b/tools/droiddoc/templates-sdk/assets/design/device_galaxynexus_blank_port_span9.png
Binary files differ
diff --git a/tools/releasetools/build_image.py b/tools/releasetools/build_image.py
index 15acddc..a615d1a 100755
--- a/tools/releasetools/build_image.py
+++ b/tools/releasetools/build_image.py
@@ -46,12 +46,17 @@
prop_dict["mount_point"]])
if "partition_size" in prop_dict:
build_command.append(prop_dict["partition_size"])
+ if "selinux_fc" in prop_dict:
+ build_command.append(prop_dict["selinux_fc"])
else:
build_command = ["mkyaffs2image", "-f"]
if prop_dict.get("mkyaffs2_extra_flags", None):
build_command.extend(prop_dict["mkyaffs2_extra_flags"].split())
build_command.append(in_dir)
build_command.append(out_file)
+ if "selinux_fc" in prop_dict:
+ build_command.append(prop_dict["selinux_fc"])
+ build_command.append(prop_dict["mount_point"])
print "Running: ", " ".join(build_command)
p = subprocess.Popen(build_command);
@@ -75,6 +80,7 @@
common_props = (
"extfs_sparse_flag",
"mkyaffs2_extra_flags",
+ "selinux_fc",
)
for p in common_props:
copy_prop(p, p)
diff --git a/tools/releasetools/edify_generator.py b/tools/releasetools/edify_generator.py
index 8c31927..5672b5a 100644
--- a/tools/releasetools/edify_generator.py
+++ b/tools/releasetools/edify_generator.py
@@ -165,9 +165,9 @@
fstab = self.info.get("fstab", None)
if fstab:
p = fstab[partition]
- self.script.append('format("%s", "%s", "%s", "%s");' %
+ self.script.append('format("%s", "%s", "%s", "%s", "%s");' %
(p.fs_type, common.PARTITION_TYPES[p.fs_type],
- p.device, p.length))
+ p.device, p.length, p.mount_point))
def DeleteFiles(self, file_list):
"""Delete all files in file_list."""
diff --git a/tools/releasetools/ota_from_target_files b/tools/releasetools/ota_from_target_files
index 7e855ce..3dcfbee 100755
--- a/tools/releasetools/ota_from_target_files
+++ b/tools/releasetools/ota_from_target_files
@@ -48,6 +48,10 @@
-e (--extra_script) <file>
Insert the contents of file at the end of the update script.
+
+ -a (--aslr_mode) <on|off>
+ Specify whether to turn on ASLR for the package (on by default).
+
"""
import sys
@@ -381,6 +385,9 @@
if OPTIONS.wipe_user_data:
script.FormatPartition("/data")
+ if "selinux_fc" in OPTIONS.info_dict:
+ WritePolicyConfig(OPTIONS.info_dict["selinux_fc"], output_zip)
+
script.FormatPartition("/system")
script.Mount("/system")
script.UnpackPackageDir("recovery", "/system")
@@ -415,15 +422,17 @@
script.AddToZip(input_zip, output_zip)
WriteMetadata(metadata, output_zip)
+def WritePolicyConfig(file_context, output_zip):
+ f = open(file_context, 'r');
+ basename = os.path.basename(file_context)
+ common.ZipWriteStr(output_zip, basename, f.read())
+
def WriteMetadata(metadata, output_zip):
common.ZipWriteStr(output_zip, "META-INF/com/android/metadata",
"".join(["%s=%s\n" % kv
for kv in sorted(metadata.iteritems())]))
-
-
-
def LoadSystemFiles(z):
"""Load all the files from SYSTEM/... in a given target-files
ZipFile, and return a dict of {filename: File object}."""