Merge "envsetup.sh: Fix handling of emulator prebuilts path." into lmp-dev
diff --git a/core/Makefile b/core/Makefile
index e3dd7ad..11ae7f5 100644
--- a/core/Makefile
+++ b/core/Makefile
@@ -1220,12 +1220,6 @@
endif # BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE
# -----------------------------------------------------------------
-# bring in the installer image generation defines if necessary
-ifeq ($(TARGET_USE_DISKINSTALLER),true)
-include bootable/diskinstaller/config.mk
-endif
-
-# -----------------------------------------------------------------
# host tools needed to build dist and OTA packages
DISTTOOLS := $(HOST_OUT_EXECUTABLES)/minigzip \
@@ -1416,7 +1410,7 @@
$(hide) zipinfo -1 $@ | awk 'BEGIN { FS="BOOT/RAMDISK/" } /^BOOT\/RAMDISK\// {print $$2}' | $(HOST_OUT_EXECUTABLES)/fs_config -C -S $(SELINUX_FC) > $(zip_root)/META/boot_filesystem_config.txt
$(hide) zipinfo -1 $@ | awk 'BEGIN { FS="RECOVERY/RAMDISK/" } /^RECOVERY\/RAMDISK\// {print $$2}' | $(HOST_OUT_EXECUTABLES)/fs_config -C -S $(SELINUX_FC) > $(zip_root)/META/recovery_filesystem_config.txt
$(hide) (cd $(zip_root) && zip -q ../$(notdir $@) META/*filesystem_config.txt)
- $(hide) ./build/tools/releasetools/add_img_to_target_files $@
+ $(hide) ./build/tools/releasetools/add_img_to_target_files -p $(HOST_OUT) $@
.PHONY: target-files-package
target-files-package: $(BUILT_TARGET_FILES_PACKAGE)
@@ -1744,6 +1738,9 @@
include $(sort $(wildcard $(BUILD_SYSTEM)/tasks/*.mk))
-include $(sort $(wildcard vendor/*/build/tasks/*.mk))
-include $(sort $(wildcard device/*/build/tasks/*.mk))
+# Also the project-specific tasks
+-include $(sort $(wildcard vendor/*/*/build/tasks/*.mk))
+-include $(sort $(wildcard device/*/*/build/tasks/*.mk))
endif
# -----------------------------------------------------------------
diff --git a/core/binary.mk b/core/binary.mk
index 8ab63e4..d339317 100644
--- a/core/binary.mk
+++ b/core/binary.mk
@@ -408,6 +408,8 @@
# This can be disabled with LOCAL_RENDERSCRIPT_FLAGS := -Wno-error
renderscript_flags := -Wall -Werror
renderscript_flags += $(LOCAL_RENDERSCRIPT_FLAGS)
+# -m32 or -m64
+renderscript_flags += -m$(my_32_64_bit_suffix)
renderscript_includes := \
$(TOPDIR)external/clang/lib/Headers \
diff --git a/core/clang/mips.mk b/core/clang/mips.mk
index 1624b6f..08daf40 100644
--- a/core/clang/mips.mk
+++ b/core/clang/mips.mk
@@ -7,14 +7,6 @@
# Include common unknown flags
CLANG_CONFIG_mips_UNKNOWN_CFLAGS := \
$(CLANG_CONFIG_UNKNOWN_CFLAGS) \
- -mips32 \
- -mips32r2 \
- -mips32r6 \
- -mfp32 \
- -mfp64 \
- -mfpxx \
- -modd-spreg \
- -mno-odd-spreg \
-fno-strict-volatile-bitfields \
-fgcse-after-reload \
-frerun-cse-after-loop \
diff --git a/core/clang/mips64.mk b/core/clang/mips64.mk
index a76aa08..612175c 100644
--- a/core/clang/mips64.mk
+++ b/core/clang/mips64.mk
@@ -7,7 +7,6 @@
# Include common unknown flags
CLANG_CONFIG_mips64_UNKNOWN_CFLAGS := \
$(CLANG_CONFIG_UNKNOWN_CFLAGS) \
- -mips64r6 \
-fno-strict-volatile-bitfields \
-fgcse-after-reload \
-frerun-cse-after-loop \
diff --git a/core/combo/TARGET_linux-mips64.mk b/core/combo/TARGET_linux-mips64.mk
index 938b11c..4511b47 100644
--- a/core/combo/TARGET_linux-mips64.mk
+++ b/core/combo/TARGET_linux-mips64.mk
@@ -31,7 +31,7 @@
# version.
#
ifeq ($(strip $(TARGET_ARCH_VARIANT)),)
-TARGET_ARCH_VARIANT := mips64r2
+TARGET_ARCH_VARIANT := mips64r6
endif
# Decouple NDK library selection with platform compiler version
diff --git a/core/combo/TARGET_linux-x86.mk b/core/combo/TARGET_linux-x86.mk
index 0bb218f..0af3948 100644
--- a/core/combo/TARGET_linux-x86.mk
+++ b/core/combo/TARGET_linux-x86.mk
@@ -82,18 +82,15 @@
-Werror=format-security \
-D_FORTIFY_SOURCE=2 \
-Wstrict-aliasing=2 \
- -fPIC \
-ffunction-sections \
-finline-functions \
-finline-limit=300 \
- -fno-inline-functions-called-once \
-fno-short-enums \
-fstrict-aliasing \
-funswitch-loops \
-funwind-tables \
-fstack-protector \
-m32 \
- -msse2 \
-no-canonical-prefixes \
-fno-canonical-system-headers \
-include $(android_config_h) \
diff --git a/core/combo/TARGET_linux-x86_64.mk b/core/combo/TARGET_linux-x86_64.mk
index 14fa5ed..33d6a56 100644
--- a/core/combo/TARGET_linux-x86_64.mk
+++ b/core/combo/TARGET_linux-x86_64.mk
@@ -80,11 +80,9 @@
-Werror=format-security \
-D_FORTIFY_SOURCE=2 \
-Wstrict-aliasing=2 \
- -fPIC \
-ffunction-sections \
-finline-functions \
-finline-limit=300 \
- -fno-inline-functions-called-once \
-fno-short-enums \
-fstrict-aliasing \
-funswitch-loops \
diff --git a/core/config.mk b/core/config.mk
index 716f88f..647eff3 100644
--- a/core/config.mk
+++ b/core/config.mk
@@ -588,7 +588,7 @@
$(wildcard $(HISTORICAL_SDK_VERSIONS_ROOT)/*/android.jar)))
# We don't have prebuilt system_current SDK yet.
-TARGET_AVAILABLE_SDK_VERSIONS := system_current $(TARGET_AVAILABLE_SDK_VERSIONS)
+TARGET_AVAILABLE_SDK_VERSIONS := $(TARGET_AVAILABLE_SDK_VERSIONS)
INTERNAL_PLATFORM_API_FILE := $(TARGET_OUT_COMMON_INTERMEDIATES)/PACKAGING/public_api.txt
INTERNAL_PLATFORM_REMOVED_API_FILE := $(TARGET_OUT_COMMON_INTERMEDIATES)/PACKAGING/removed.txt
diff --git a/core/dex_preopt_odex_install.mk b/core/dex_preopt_odex_install.mk
index 10b41bd..28282ec 100644
--- a/core/dex_preopt_odex_install.mk
+++ b/core/dex_preopt_odex_install.mk
@@ -69,64 +69,29 @@
# For a Java library, we build odex for both 1st arch and 2nd arch, if we have one.
# #################################################
# Odex for the 1st arch
-built_odex := $(call get-odex-file-path,$(DEX2OAT_TARGET_ARCH),$(LOCAL_BUILT_MODULE))
-ifdef LOCAL_DEX_PREOPT_IMAGE_LOCATION
-my_dex_preopt_image_location := $(LOCAL_DEX_PREOPT_IMAGE_LOCATION)
-else
-my_dex_preopt_image_location := $(DEFAULT_DEX_PREOPT_BUILT_IMAGE_LOCATION)
-endif
-my_dex_preopt_image_filename := $(call get-image-file-path,$(DEX2OAT_TARGET_ARCH),$(my_dex_preopt_image_location))
-$(built_odex): PRIVATE_2ND_ARCH_VAR_PREFIX :=
-$(built_odex): PRIVATE_DEX_LOCATION := $(patsubst $(PRODUCT_OUT)%,%,$(LOCAL_INSTALLED_MODULE))
-$(built_odex): PRIVATE_DEX_PREOPT_IMAGE_LOCATION := $(my_dex_preopt_image_location)
-$(built_odex) : $(DEXPREOPT_ONE_FILE_DEPENDENCY_BUILT_BOOT_PREOPT) \
- $(DEXPREOPT_ONE_FILE_DEPENDENCY_TOOLS) \
- $(my_dex_preopt_image_filename)
-installed_odex := $(call get-odex-file-path,$(DEX2OAT_TARGET_ARCH),$(LOCAL_INSTALLED_MODULE))
-built_installed_odex := $(built_odex):$(installed_odex)
+my_2nd_arch_prefix :=
+include $(BUILD_SYSTEM)/setup_one_odex.mk
# #################################################
# Odex for the 2nd arch
ifdef TARGET_2ND_ARCH
-built_odex2 := $(call get-odex-file-path,$($(TARGET_2ND_ARCH_VAR_PREFIX)DEX2OAT_TARGET_ARCH),$(LOCAL_BUILT_MODULE))
-ifdef LOCAL_DEX_PREOPT_IMAGE_LOCATION
-my_dex_preopt_image_location := $(LOCAL_DEX_PREOPT_IMAGE_LOCATION)
-else
-my_dex_preopt_image_location := $($(TARGET_2ND_ARCH_VAR_PREFIX)DEFAULT_DEX_PREOPT_BUILT_IMAGE_LOCATION)
-endif
-my_dex_preopt_image_filename := $(call get-image-file-path,$($(TARGET_2ND_ARCH_VAR_PREFIX)DEX2OAT_TARGET_ARCH),$(my_dex_preopt_image_location))
-$(built_odex2): PRIVATE_2ND_ARCH_VAR_PREFIX := $(TARGET_2ND_ARCH_VAR_PREFIX)
-$(built_odex2): PRIVATE_DEX_LOCATION := $(patsubst $(PRODUCT_OUT)%,%,$(LOCAL_INSTALLED_MODULE))
-$(built_odex2): PRIVATE_DEX_PREOPT_IMAGE_LOCATION := $(my_dex_preopt_image_location)
-$(built_odex2) : $($(TARGET_2ND_ARCH_VAR_PREFIX)DEXPREOPT_ONE_FILE_DEPENDENCY_BUILT_BOOT_PREOPT) \
- $(DEXPREOPT_ONE_FILE_DEPENDENCY_TOOLS) \
- $(my_dex_preopt_image_filename)
-
-installed_odex2 := $(call get-odex-file-path,$($(TARGET_2ND_ARCH_VAR_PREFIX)DEX2OAT_TARGET_ARCH),$(LOCAL_INSTALLED_MODULE))
-built_odex += $(built_odex2)
-installed_odex += $(installed_odex2)
-built_installed_odex += $(built_odex2):$(installed_odex2)
+my_2nd_arch_prefix := $(TARGET_2ND_ARCH_VAR_PREFIX)
+include $(BUILD_SYSTEM)/setup_one_odex.mk
endif # TARGET_2ND_ARCH
# #################################################
else # must be APPS
-# For an app, we build for the multilib arch it's targeted for.
-built_odex := $(call get-odex-file-path,$($(LOCAL_2ND_ARCH_VAR_PREFIX)DEX2OAT_TARGET_ARCH),$(LOCAL_BUILT_MODULE))
-ifdef LOCAL_DEX_PREOPT_IMAGE_LOCATION
-my_dex_preopt_image_location := $(LOCAL_DEX_PREOPT_IMAGE_LOCATION)
-else
-my_dex_preopt_image_location := $($(LOCAL_2ND_ARCH_VAR_PREFIX)DEFAULT_DEX_PREOPT_BUILT_IMAGE_LOCATION)
-endif
-my_dex_preopt_image_filename := $(call get-image-file-path,$($(LOCAL_2ND_ARCH_VAR_PREFIX)DEX2OAT_TARGET_ARCH),$(my_dex_preopt_image_location))
-$(built_odex): PRIVATE_2ND_ARCH_VAR_PREFIX := $(LOCAL_2ND_ARCH_VAR_PREFIX)
-$(built_odex): PRIVATE_DEX_LOCATION := $(patsubst $(PRODUCT_OUT)%,%,$(LOCAL_INSTALLED_MODULE))
-$(built_odex): PRIVATE_DEX_PREOPT_IMAGE_LOCATION := $(my_dex_preopt_image_location)
-$(built_odex) : $($(LOCAL_2ND_ARCH_VAR_PREFIX)DEXPREOPT_ONE_FILE_DEPENDENCY_BUILT_BOOT_PREOPT) \
- $(DEXPREOPT_ONE_FILE_DEPENDENCY_TOOLS) \
- $(my_dex_preopt_image_filename)
-installed_odex := $(call get-odex-file-path,$($(LOCAL_2ND_ARCH_VAR_PREFIX)DEX2OAT_TARGET_ARCH),$(LOCAL_INSTALLED_MODULE))
-built_installed_odex := $(built_odex):$(installed_odex)
+# The preferred arch
+my_2nd_arch_prefix := $(LOCAL_2ND_ARCH_VAR_PREFIX)
+include $(BUILD_SYSTEM)/setup_one_odex.mk
+ifdef TARGET_2ND_ARCH
+ifeq ($(LOCAL_MULTILIB),both)
+# The non-preferred arch
+my_2nd_arch_prefix := $(if $(LOCAL_2ND_ARCH_VAR_PREFIX),,$(TARGET_2ND_ARCH_VAR_PREFIX))
+include $(BUILD_SYSTEM)/setup_one_odex.mk
+endif # LOCAL_MULTILIB is both
+endif # TARGET_2ND_ARCH
endif # LOCAL_MODULE_CLASS
-endif # libart
-endif # boot jar
+endif # libart
+endif # boot jar
ifdef built_odex
# Use pattern rule - we may have multiple installed odex files.
diff --git a/core/java.mk b/core/java.mk
index 52d31d0..debdf53 100644
--- a/core/java.mk
+++ b/core/java.mk
@@ -386,7 +386,7 @@
# Run proguard if necessary, otherwise just copy the file.
ifdef LOCAL_PROGUARD_ENABLED
-ifneq ($(filter-out full custom nosystem obfuscation optimization,$(LOCAL_PROGUARD_ENABLED)),)
+ifneq ($(filter-out full custom nosystem obfuscation optimization shrinktests,$(LOCAL_PROGUARD_ENABLED)),)
$(warning while processing: $(LOCAL_MODULE))
$(error invalid value for LOCAL_PROGUARD_ENABLED: $(LOCAL_PROGUARD_ENABLED))
endif
@@ -403,6 +403,9 @@
# If this is a test package, add proguard keep flags for tests.
ifneq ($(LOCAL_INSTRUMENTATION_FOR)$(filter tests,$(LOCAL_MODULE_TAGS)),)
proguard_flags += -include $(BUILD_SYSTEM)/proguard_tests.flags
+ifeq ($(filter shrinktests,$(LOCAL_PROGUARD_ENABLED)),)
+proguard_flags += -dontshrink # don't shrink tests by default
+endif # shrinktests
endif # test package
ifeq ($(filter obfuscation,$(LOCAL_PROGUARD_ENABLED)),)
# By default no obfuscation
diff --git a/core/package_internal.mk b/core/package_internal.mk
index 0d6f9ea..d1e4212 100644
--- a/core/package_internal.mk
+++ b/core/package_internal.mk
@@ -403,7 +403,8 @@
## Rule to build the odex file
ifdef LOCAL_DEX_PREOPT
$(built_odex): PRIVATE_DEX_FILE := $(built_dex)
-$(built_odex) : $(built_dex)
+# Use pattern rule - we may have multiple built odex files.
+$(built_odex) : $(dir $(LOCAL_BUILT_MODULE))% : $(built_dex)
$(hide) mkdir -p $(dir $@) && rm -f $@
$(add-dex-to-package)
$(hide) mv $@ $@.input
diff --git a/core/product.mk b/core/product.mk
index 90d5851..0075acd 100644
--- a/core/product.mk
+++ b/core/product.mk
@@ -91,6 +91,7 @@
PRODUCT_SDK_ADDON_COPY_FILES \
PRODUCT_SDK_ADDON_COPY_MODULES \
PRODUCT_SDK_ADDON_DOC_MODULES \
+ PRODUCT_SDK_ADDON_SYS_IMG_SOURCE_PROP \
PRODUCT_DEFAULT_WIFI_CHANNELS \
PRODUCT_DEFAULT_DEV_CERTIFICATE \
PRODUCT_RESTRICT_VENDOR_FILES \
diff --git a/core/proguard_tests.flags b/core/proguard_tests.flags
index 4481a1b..1f840bc 100644
--- a/core/proguard_tests.flags
+++ b/core/proguard_tests.flags
@@ -1,5 +1,6 @@
# Keep everything for tests
--dontshrink
+# This flag has been moved to the makefiles and is set for tests by default.
+#-dontshrink
# But we may want to obfuscate if the main app gets obfuscated.
# This flag has been moved to the makefiles.
diff --git a/core/sdk_font.mk b/core/sdk_font.mk
index 59aed8b..204403d 100644
--- a/core/sdk_font.mk
+++ b/core/sdk_font.mk
@@ -50,9 +50,9 @@
# $2 Source font path
define sdk-extra-font-rule
fontfullname := $$(SDK_FONT_TEMP)/$1
-ifeq ($$(filter $(fontfullname),$$(sdk_fonts_device)),)
+ifeq ($$(filter $$(fontfullname),$$(sdk_fonts_device)),)
SDK_FONT_DEPS += $$(fontfullname)
-$$(fontfullname): $2 $(sdk_font_rename_script)
+$$(fontfullname): $2 $$(sdk_font_rename_script)
$$(hide) mkdir -p $$(dir $$@)
$$(hide) $$(call sdk_rename_font,$$<,$$@)
endif
diff --git a/core/setup_one_odex.mk b/core/setup_one_odex.mk
new file mode 100644
index 0000000..ec8a28a
--- /dev/null
+++ b/core/setup_one_odex.mk
@@ -0,0 +1,39 @@
+#
+# Copyright (C) 2014 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+# Set up variables and dependency for one odex file
+# Input variables: my_2nd_arch_prefix
+# Output(modified) variables: built_odex, installed_odex, built_installed_odex
+
+my_built_odex := $(call get-odex-file-path,$($(my_2nd_arch_prefix)DEX2OAT_TARGET_ARCH),$(LOCAL_BUILT_MODULE))
+ifdef LOCAL_DEX_PREOPT_IMAGE_LOCATION
+my_dex_preopt_image_location := $(LOCAL_DEX_PREOPT_IMAGE_LOCATION)
+else
+my_dex_preopt_image_location := $($(my_2nd_arch_prefix)DEFAULT_DEX_PREOPT_BUILT_IMAGE_LOCATION)
+endif
+my_dex_preopt_image_filename := $(call get-image-file-path,$($(my_2nd_arch_prefix)DEX2OAT_TARGET_ARCH),$(my_dex_preopt_image_location))
+$(my_built_odex): PRIVATE_2ND_ARCH_VAR_PREFIX := $(my_2nd_arch_prefix)
+$(my_built_odex): PRIVATE_DEX_LOCATION := $(patsubst $(PRODUCT_OUT)%,%,$(LOCAL_INSTALLED_MODULE))
+$(my_built_odex): PRIVATE_DEX_PREOPT_IMAGE_LOCATION := $(my_dex_preopt_image_location)
+$(my_built_odex) : $($(my_2nd_arch_prefix)DEXPREOPT_ONE_FILE_DEPENDENCY_BUILT_BOOT_PREOPT) \
+ $(DEXPREOPT_ONE_FILE_DEPENDENCY_TOOLS) \
+ $(my_dex_preopt_image_filename)
+
+my_installed_odex := $(call get-odex-file-path,$($(my_2nd_arch_prefix)DEX2OAT_TARGET_ARCH),$(LOCAL_INSTALLED_MODULE))
+
+built_odex += $(my_built_odex)
+installed_odex += $(my_installed_odex)
+built_installed_odex += $(my_built_odex):$(my_installed_odex)
diff --git a/core/tasks/boot_jars_package_check.mk b/core/tasks/boot_jars_package_check.mk
new file mode 100644
index 0000000..188c267
--- /dev/null
+++ b/core/tasks/boot_jars_package_check.mk
@@ -0,0 +1,46 @@
+# Copyright (C) 2014 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+#
+# Rules to check if classes in the boot jars are from the whitelisted packages.
+#
+
+ifneq ($(SKIP_BOOT_JARS_CHECK),true)
+ifneq ($(TARGET_BUILD_PDK),true)
+ifdef PRODUCT_BOOT_JARS
+
+intermediates := $(call intermediates-dir-for, PACKAGING, boot-jars-package-check,,COMMON)
+stamp := $(intermediates)/stamp
+built_boot_jars := $(foreach j, $(PRODUCT_BOOT_JARS), \
+ $(call intermediates-dir-for, JAVA_LIBRARIES, $(j),,COMMON)/classes.jar)
+script := build/core/tasks/check_boot_jars/check_boot_jars.py
+whitelist_file := build/core/tasks/check_boot_jars/package_whitelist.txt
+
+$(stamp): PRIVATE_BOOT_JARS := $(built_boot_jars)
+$(stamp): PRIVATE_SCRIPT := $(script)
+$(stamp): PRIVATE_WHITELIST := $(whitelist_file)
+$(stamp) : $(built_boot_jars) $(script) $(whitelist_file)
+ @echo "Check package name for $(PRIVATE_BOOT_JARS)"
+ $(hide) $(PRIVATE_SCRIPT) $(PRIVATE_WHITELIST) $(PRIVATE_BOOT_JARS)
+ $(hide) mkdir -p $(dir $@) && touch $@
+
+.PHONY: check-boot-jars
+check-boot-jars : $(stamp)
+
+# Run check-boot-jars by default
+droidcore : check-boot-jars
+
+endif # PRODUCT_BOOT_JARS
+endif # TARGET_BUILD_PDK not true
+endif # SKIP_BOOT_JARS_CHECK not true
diff --git a/core/tasks/check_boot_jars/check_boot_jars.py b/core/tasks/check_boot_jars/check_boot_jars.py
new file mode 100755
index 0000000..89d9ee8
--- /dev/null
+++ b/core/tasks/check_boot_jars/check_boot_jars.py
@@ -0,0 +1,83 @@
+#!/usr/bin/env python
+
+"""
+Check boot jars.
+
+Usage: check_boot_jars.py <package_whitelist_file> <jar1> <jar2> ...
+"""
+import logging
+import os.path
+import re
+import subprocess
+import sys
+
+
+# The compiled whitelist RE.
+whitelist_re = None
+
+
+def LoadWhitelist(filename):
+ """ Load and compile whitelist regular expressions from filename.
+ """
+ lines = []
+ with open(filename, 'r') as f:
+ for line in f:
+ line = line.strip()
+ if not line or line.startswith('#'):
+ continue
+ lines.append(line)
+ combined_re = r'^(%s)$' % '|'.join(lines)
+ global whitelist_re
+ try:
+ whitelist_re = re.compile(combined_re)
+ except re.error:
+ logging.exception(
+ 'Cannot compile package whitelist regular expression: %r',
+ combined_re)
+ whitelist_re = None
+ return False
+ return True
+
+
+def CheckJar(jar):
+ """Check a jar file.
+ """
+ # Get the list of files inside the jar file.
+ p = subprocess.Popen(args='jar tf %s' % jar,
+ stdout=subprocess.PIPE, shell=True)
+ stdout, _ = p.communicate()
+ if p.returncode != 0:
+ return False
+ items = stdout.split()
+ for f in items:
+ if f.endswith('.class'):
+ package_name = os.path.dirname(f)
+ package_name = package_name.replace('/', '.')
+ # Skip class without a package name
+ if package_name and not whitelist_re.match(package_name):
+ print >> sys.stderr, ('Error: %s: unknown package name of class file %s'
+ % (jar, f))
+ return False
+ return True
+
+
+def main(argv):
+ if len(argv) < 2:
+ print __doc__
+ sys.exit(1)
+
+ if not LoadWhitelist(argv[0]):
+ sys.exit(1)
+
+ passed = True
+ for jar in argv[1:]:
+ if not CheckJar(jar):
+ passed = False
+ if not passed:
+ return 1
+
+ return 0
+
+
+if __name__ == '__main__':
+ main(sys.argv[1:])
diff --git a/core/tasks/check_boot_jars/package_whitelist.txt b/core/tasks/check_boot_jars/package_whitelist.txt
new file mode 100644
index 0000000..4d62615
--- /dev/null
+++ b/core/tasks/check_boot_jars/package_whitelist.txt
@@ -0,0 +1,214 @@
+# Boot jar package name whitelist.
+# Each line is interpreted as a regular expression.
+
+###################################################
+# core-libart.jar
+java\.awt\.font
+java\.beans
+java\.io
+java\.lang
+java\.lang\.annotation
+java\.lang\.ref
+java\.lang\.reflect
+java\.math
+java\.net
+java\.nio
+java\.nio\.channels
+java\.nio\.channels\.spi
+java\.nio\.charset
+java\.nio\.charset\.spi
+java\.security
+java\.security\.acl
+java\.security\.cert
+java\.security\.interfaces
+java\.security\.spec
+java\.sql
+java\.text
+java\.util
+java\.util\.concurrent
+java\.util\.concurrent\.atomic
+java\.util\.concurrent\.locks
+java\.util\.jar
+java\.util\.logging
+java\.util\.prefs
+java\.util\.regex
+java\.util\.zip
+javax\.crypto
+javax\.crypto\.interfaces
+javax\.crypto\.spec
+javax\.net
+javax\.net\.ssl
+javax\.security\.auth
+javax\.security\.auth\.callback
+javax\.security\.auth\.login
+javax\.security\.auth\.x500
+javax\.security\.cert
+javax\.sql
+javax\.xml
+javax\.xml\.datatype
+javax\.xml\.namespace
+javax\.xml\.parsers
+javax\.xml\.transform
+javax\.xml\.transform\.dom
+javax\.xml\.transform\.sax
+javax\.xml\.transform\.stream
+javax\.xml\.validation
+javax\.xml\.xpath
+sun\.misc
+org\.w3c\.dom
+org\.w3c\.dom\.ls
+org\.w3c\.dom\.traversal
+
+# TODO: Move these internal org.apache.harmony classes to libcore.*
+org\.apache\.harmony\.crypto\.internal
+org\.apache\.harmony\.dalvik
+org\.apache\.harmony\.dalvik\.ddmc
+org\.apache\.harmony\.luni\.internal\.util
+org\.apache\.harmony\.security
+org\.apache\.harmony\.security\.asn1
+org\.apache\.harmony\.security\.fortress
+org\.apache\.harmony\.security\.pkcs10
+org\.apache\.harmony\.security\.pkcs7
+org\.apache\.harmony\.security\.pkcs8
+org\.apache\.harmony\.security\.provider\.crypto
+org\.apache\.harmony\.security\.utils
+org\.apache\.harmony\.security\.x501
+org\.apache\.harmony\.security\.x509
+org\.apache\.harmony\.security\.x509\.tsp
+org\.apache\.harmony\.xml
+org\.apache\.harmony\.xml\.dom
+org\.apache\.harmony\.xml\.parsers
+
+org\.json
+org\.xmlpull\.v1
+org\.xmlpull\.v1\.sax2
+
+# TODO: jarjar org.kxml2.io to com.android org\.kxml2\.io
+org\.kxml2\.io
+org\.xml
+org\.xml\.sax
+org\.xml\.sax\.ext
+org\.xml\.sax\.helpers
+
+dalvik\..*
+libcore\..*
+android\..*
+com\.android\..*
+
+
+###################################################
+# core-junit.jar
+junit\.extensions
+junit\.framework
+
+
+###################################################
+# ext.jar
+# TODO: jarjar javax.sip to com.android
+javax\.sip
+javax\.sip\.address
+javax\.sip\.header
+javax\.sip\.message
+
+# TODO: jarjar org.apache.commons to com.android
+org\.apache\.commons\.codec
+org\.apache\.commons\.codec\.binary
+org\.apache\.commons\.codec\.language
+org\.apache\.commons\.codec\.net
+org\.apache\.commons\.logging
+org\.apache\.commons\.logging\.impl
+org\.apache\.http
+org\.apache\.http\.auth
+org\.apache\.http\.auth\.params
+org\.apache\.http\.client
+org\.apache\.http\.client\.entity
+org\.apache\.http\.client\.methods
+org\.apache\.http\.client\.params
+org\.apache\.http\.client\.protocol
+org\.apache\.http\.client\.utils
+org\.apache\.http\.conn
+org\.apache\.http\.conn\.params
+org\.apache\.http\.conn\.routing
+org\.apache\.http\.conn\.scheme
+org\.apache\.http\.conn\.ssl
+org\.apache\.http\.conn\.util
+org\.apache\.http\.cookie
+org\.apache\.http\.cookie\.params
+org\.apache\.http\.entity
+org\.apache\.http\.impl
+org\.apache\.http\.impl\.auth
+org\.apache\.http\.impl\.client
+org\.apache\.http\.impl\.client
+org\.apache\.http\.impl\.conn
+org\.apache\.http\.impl\.conn\.tsccm
+org\.apache\.http\.impl\.cookie
+org\.apache\.http\.impl\.entity
+org\.apache\.http\.impl\.io
+org\.apache\.http\.impl\.io
+org\.apache\.http\.io
+org\.apache\.http\.message
+org\.apache\.http\.params
+org\.apache\.http\.protocol
+org\.apache\.http\.util
+
+# TODO: jarjar gov.nist to com.android
+gov\.nist\.core
+gov\.nist\.core\.net
+gov\.nist\.javax\.sip
+gov\.nist\.javax\.sip\.address
+gov\.nist\.javax\.sip\.clientauthutils
+gov\.nist\.javax\.sip\.header
+gov\.nist\.javax\.sip\.header\.extensions
+gov\.nist\.javax\.sip\.header\.ims
+gov\.nist\.javax\.sip\.message
+gov\.nist\.javax\.sip\.parser
+gov\.nist\.javax\.sip\.parser\.extensions
+gov\.nist\.javax\.sip\.parser\.ims
+gov\.nist\.javax\.sip\.stack
+
+org\.ccil\.cowan\.tagsoup
+org\.ccil\.cowan\.tagsoup\.jaxp
+
+###################################################
+# framework.jar
+javax\.microedition\.khronos\.opengles
+javax\.microedition\.khronos\.egl
+
+android
+
+
+###################################################
+# telephony-common.jar
+com\.google\..*
+
+
+###################################################
+# apache-xml.jar
+org\.apache\.xml\.res
+org\.apache\.xml\.utils
+org\.apache\.xml\.utils\.res
+org\.apache\.xml\.dtm
+org\.apache\.xml\.dtm\.ref
+org\.apache\.xml\.dtm\.ref\.dom2dtm
+org\.apache\.xml\.dtm\.ref\.sax2dtm
+org\.apache\.xml\.serializer
+org\.apache\.xml\.serializer\.utils
+org\.apache\.xml\.serializer\.dom3
+org\.apache\.xpath
+org\.apache\.xpath\.operations
+org\.apache\.xpath\.domapi
+org\.apache\.xpath\.functions
+org\.apache\.xpath\.res
+org\.apache\.xpath\.axes
+org\.apache\.xpath\.objects
+org\.apache\.xpath\.patterns
+org\.apache\.xpath\.jaxp
+org\.apache\.xpath\.compiler
+org\.apache\.xalan
+org\.apache\.xalan\.res
+org\.apache\.xalan\.templates
+org\.apache\.xalan\.serialize
+org\.apache\.xalan\.extensions
+org\.apache\.xalan\.processor
+org\.apache\.xalan\.transformer
+org\.apache\.xalan\.xslt
diff --git a/core/tasks/sdk-addon.mk b/core/tasks/sdk-addon.mk
index 5a24a00..b32536c 100644
--- a/core/tasks/sdk-addon.mk
+++ b/core/tasks/sdk-addon.mk
@@ -18,11 +18,12 @@
addon_name := $(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_SDK_ADDON_NAME))
ifneq ($(addon_name),)
-addon_dir_leaf := $(addon_name)-$(FILE_NAME_TAG)-$(INTERNAL_SDK_HOST_OS_NAME)
-
-intermediates := $(HOST_OUT_INTERMEDIATES)/SDK_ADDON/$(addon_name)_intermediates
-full_target := $(HOST_OUT_SDK_ADDON)/$(addon_dir_leaf).zip
-staging := $(intermediates)/$(addon_dir_leaf)
+addon_dir_leaf := $(addon_name)-$(FILE_NAME_TAG)-$(INTERNAL_SDK_HOST_OS_NAME)
+addon_dir_img := $(addon_dir_leaf)-img
+intermediates := $(HOST_OUT_INTERMEDIATES)/SDK_ADDON/$(addon_name)_intermediates
+full_target := $(HOST_OUT_SDK_ADDON)/$(addon_dir_leaf).zip
+full_target_img := $(HOST_OUT_SDK_ADDON)/$(addon_dir_img).zip
+staging := $(intermediates)
sdk_addon_deps :=
files_to_copy :=
@@ -46,29 +47,54 @@
$(eval _src := $(call stub-addon-jar-file,$(_src))) \
$(if $(_src),,$(eval $(error Unknown or unlinkable module: $(call word-colon,1,$(cf)). Requested by $(INTERNAL_PRODUCT)))) \
$(eval _dest := $(call word-colon,2,$(cf))) \
- $(eval files_to_copy += $(_src):$(_dest)) \
+ $(eval files_to_copy += $(addon_dir_leaf):$(_src):$(_dest)) \
)
endif
# Files that are copied directly into the sdk-addon
-files_to_copy += $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_SDK_ADDON_COPY_FILES)
+ifneq ($(strip $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_SDK_ADDON_COPY_FILES)),)
+$(foreach cf,$(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_SDK_ADDON_COPY_FILES), \
+ $(eval _src := $(call word-colon,1,$(cf))) \
+ $(eval _dest := $(call word-colon,2,$(cf))) \
+ $(if $(findstring images/,$(_dest)), $(eval _root := $(addon_dir_img)), $(eval _root := $(addon_dir_leaf))) \
+ $(eval files_to_copy += $(_root):$(_src):$(_dest)) \
+ )
+endif
-# All SDK add-ons have these files
+# Files copied in the system-image directory
files_to_copy += \
- $(BUILT_SYSTEMIMAGE):images/$(TARGET_CPU_ABI)/system.img \
- $(BUILT_USERDATAIMAGE_TARGET):images/$(TARGET_CPU_ABI)/userdata.img \
- $(BUILT_RAMDISK_TARGET):images/$(TARGET_CPU_ABI)/ramdisk.img \
- $(PRODUCT_OUT)/system/build.prop:images/$(TARGET_CPU_ABI)/build.prop \
- $(target_notice_file_txt):images/$(TARGET_CPU_ABI)/NOTICE.txt
+ $(addon_dir_img):$(BUILT_SYSTEMIMAGE):images/$(TARGET_CPU_ABI)/system.img \
+ $(addon_dir_img):$(BUILT_USERDATAIMAGE_TARGET):images/$(TARGET_CPU_ABI)/userdata.img \
+ $(addon_dir_img):$(BUILT_RAMDISK_TARGET):images/$(TARGET_CPU_ABI)/ramdisk.img \
+ $(addon_dir_img):$(PRODUCT_OUT)/system/build.prop:images/$(TARGET_CPU_ABI)/build.prop \
+ $(addon_dir_img):$(target_notice_file_txt):images/$(TARGET_CPU_ABI)/NOTICE.txt \
+ $(addon_dir_img):$(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_SDK_ADDON_SYS_IMG_SOURCE_PROP):images/source.properties
# Generate rules to copy the requested files
$(foreach cf,$(files_to_copy), \
- $(eval _src := $(call word-colon,1,$(cf))) \
- $(eval _dest := $(call append-path,$(staging),$(call word-colon,2,$(cf)))) \
+ $(eval _root := $(call word-colon,1,$(cf))) \
+ $(eval _src := $(call word-colon,2,$(cf))) \
+ $(eval _dest := $(call append-path,$(call append-path,$(staging),$(_root)),$(call word-colon,3,$(cf)))) \
$(eval $(call copy-one-file,$(_src),$(_dest))) \
$(eval sdk_addon_deps += $(_dest)) \
)
+# The system-image source.properties is a template that we directly expand in-place
+addon_img_source_prop := $(call append-path,$(staging),$(addon_dir_img))/images/source.properties
+sdk_addon_deps += $(addon_img_source_prop)
+
+$(addon_img_source_prop): $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_SDK_ADDON_SYS_IMG_SOURCE_PROP)
+ @echo Generate $@
+ $(hide) mkdir -p $(dir $@)
+ $(hide) sed \
+ -e 's/$${PLATFORM_VERSION}/$(PLATFORM_VERSION)/' \
+ -e 's/$${PLATFORM_SDK_VERSION}/$(PLATFORM_SDK_VERSION)/' \
+ -e 's/$${PLATFORM_VERSION_CODENAME}/$(subst REL,,$(PLATFORM_VERSION_CODENAME))/' \
+ -e 's/$${TARGET_ARCH}/$(TARGET_ARCH)/' \
+ -e 's/$${TARGET_CPU_ABI}/$(TARGET_CPU_ABI)/' \
+ $< > $@ && sed -i -e '/^AndroidVersion.CodeName=\s*$$/d' $@
+
+
# We don't know about all of the docs files, so depend on the timestamps for
# them, and record the directories, and the packaging rule will just copy the
# whole thing.
@@ -76,7 +102,7 @@
sdk_addon_deps += $(foreach dm, $(doc_modules), $(call doc-timestamp-for, $(dm)))
$(full_target): PRIVATE_DOCS_DIRS := $(addprefix $(OUT_DOCS)/, $(doc_modules))
-$(full_target): PRIVATE_STAGING_DIR := $(staging)
+$(full_target): PRIVATE_STAGING_DIR := $(call append-path,$(staging),$(addon_dir_leaf))
$(full_target): $(sdk_addon_deps) | $(ACP)
@echo Packaging SDK Addon: $@
@@ -85,16 +111,24 @@
$(ACP) -r $$d $(PRIVATE_STAGING_DIR)/docs ;\
done
$(hide) mkdir -p $(dir $@)
- $(hide) ( F=$$(pwd)/$@ ; cd $(PRIVATE_STAGING_DIR)/.. && zip -rq $$F * )
+ $(hide) ( F=$$(pwd)/$@ ; cd $(PRIVATE_STAGING_DIR)/.. && zip -rq $$F $(notdir $(PRIVATE_STAGING_DIR)) )
+
+$(full_target_img): PRIVATE_STAGING_DIR := $(call append-path,$(staging),$(addon_dir_img))
+$(full_target_img): $(full_target) $(addon_img_source_prop)
+ @echo Packaging SDK Addon System-Image: $@
+ $(hide) mkdir -p $(dir $@)
+ $(hide) ( F=$$(pwd)/$@ ; cd $(PRIVATE_STAGING_DIR)/.. && zip -rq $$F $(notdir $(PRIVATE_STAGING_DIR)) )
+
.PHONY: sdk_addon
-sdk_addon: $(full_target)
+sdk_addon: $(full_target) $(full_target_img)
ifneq ($(sdk_repo_goal),)
# If we're building the sdk_repo, keep the name of the addon zip
# around so that development/build/tools/sdk_repo.mk can dist it
# at the appropriate location.
-ADDON_SDK_ZIP := $(full_target)
+ADDON_SDK_ZIP := $(full_target)
+ADDON_SDK_IMG_ZIP := $(full_target_img)
else
# When not building an sdk_repo, just dist the addon zip file
# as-is.
diff --git a/envsetup.sh b/envsetup.sh
index 1798635..2dc29ce 100644
--- a/envsetup.sh
+++ b/envsetup.sh
@@ -458,7 +458,6 @@
add_lunch_combo aosp_mips64-eng
add_lunch_combo aosp_x86-eng
add_lunch_combo aosp_x86_64-eng
-add_lunch_combo vbox_x86-eng
function print_lunch_menu()
{
@@ -611,7 +610,8 @@
{
local TOPFILE=build/core/envsetup.mk
if [ -n "$TOP" -a -f "$TOP/$TOPFILE" ] ; then
- echo $TOP
+ # The following circumlocution ensures we remove symlinks from TOP.
+ (cd $TOP; PWD= /bin/pwd)
else
if [ -f $TOPFILE ] ; then
# The following circumlocution (repeated below as well) ensures
diff --git a/target/board/generic_mips64/BoardConfig.mk b/target/board/generic_mips64/BoardConfig.mk
index 5dc943a..f8cf4f0 100644
--- a/target/board/generic_mips64/BoardConfig.mk
+++ b/target/board/generic_mips64/BoardConfig.mk
@@ -24,7 +24,7 @@
TARGET_ARCH := mips64
ifeq (,$(TARGET_ARCH_VARIANT))
-TARGET_ARCH_VARIANT := mips64r2
+TARGET_ARCH_VARIANT := mips64r6
endif
TARGET_CPU_ABI := mips64
diff --git a/target/board/vbox_x86/AndroidBoard.mk b/target/board/vbox_x86/AndroidBoard.mk
deleted file mode 100644
index 8b13789..0000000
--- a/target/board/vbox_x86/AndroidBoard.mk
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/target/board/vbox_x86/BoardConfig.mk b/target/board/vbox_x86/BoardConfig.mk
deleted file mode 100644
index e5a1d3e..0000000
--- a/target/board/vbox_x86/BoardConfig.mk
+++ /dev/null
@@ -1,40 +0,0 @@
-#
-# IA target for VitualBox
-#
-
-TARGET_ARCH=x86
-TARGET_COMPRESS_MODULE_SYMBOLS := false
-TARGET_NO_RECOVERY := true
-TARGET_HARDWARE_3D := false
-BOARD_USES_GENERIC_AUDIO := true
-USE_CAMERA_STUB := true
-TARGET_CPU_ABI := x86
-TARGET_USERIMAGES_USE_EXT4 := true
-TARGET_BOOTIMAGE_USE_EXT2 := true
-BOARD_CACHEIMAGE_PARTITION_SIZE := 268435456
-BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE := ext4
-
-# 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=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
-BOARD_BOOTIMAGE_MAX_SIZE := 8388608
-BOARD_SYSLOADER_MAX_SIZE := 7340032
-BOARD_FLASH_BLOCK_SIZE := 512
-# 50M
-BOARD_USERDATAIMAGE_PARTITION_SIZE := 52428800
-# 500M
-BOARD_INSTALLERIMAGE_PARTITION_SIZE := 524288000
-TARGET_USERIMAGES_SPARSE_EXT_DISABLED := true
-# Reserve 265M for the system partition
-BOARD_SYSTEMIMAGE_PARTITION_SIZE := 268435456
-
-WITH_DEXPREOPT := false
-
-# The eth0 device should be started with dhcp on boot.
-# Useful for emulators that don't provide a wifi connection.
-NET_ETH0_STARTONBOOT := true
-
-ADDITIONAL_BUILD_PROPERTIES += dalvik.vm.heapsize=32m
diff --git a/target/board/vbox_x86/README.txt b/target/board/vbox_x86/README.txt
deleted file mode 100644
index 568dc5f..0000000
--- a/target/board/vbox_x86/README.txt
+++ /dev/null
@@ -1,9 +0,0 @@
-The "vbox_x86" product defines a non-hardware-specific target intended
-to run on the VirtualBox emulator.
-
-Most of the Android devices (networking, phones, sound, etc) do not work.
-
-ADB via ethernet works with this target. You can use 'adb install' to
-test applications that do not require network, phone or sound support.
-This emulation is useful because VirtualBox runs much faster then does the
-QEMU emulators (at least until a KVM enabled QEMU emulator is available).
diff --git a/target/board/vbox_x86/device.mk b/target/board/vbox_x86/device.mk
deleted file mode 100644
index b51f801..0000000
--- a/target/board/vbox_x86/device.mk
+++ /dev/null
@@ -1,39 +0,0 @@
-#
-# Copyright (C) 2009 The Android Open Source Project
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-# This is a build configuration for the product aspects that
-# are specific to the emulator.
-
-LOCAL_PATH := $(call my-dir)
-
-PRODUCT_PROPERTY_OVERRIDES := \
- ro.ril.hsxpa=1 \
- ro.ril.gprsclass=10 \
- ro.adb.qemud=1
-
-LOCAL_KERNEL := prebuilts/qemu-kernel/x86/kernel-vbox
-
-PRODUCT_COPY_FILES := \
- device/generic/goldfish/data/etc/apns-conf.xml:system/etc/apns-conf.xml \
- device/generic/goldfish/camera/media_profiles.xml:system/etc/media_profiles.xml \
- frameworks/av/media/libstagefright/data/media_codecs_google_audio.xml:system/etc/media_codecs_google_audio.xml \
- frameworks/av/media/libstagefright/data/media_codecs_google_telephony.xml:system/etc/media_codecs_google_telephony.xml \
- frameworks/av/media/libstagefright/data/media_codecs_google_video.xml:system/etc/media_codecs_google_video.xml \
- device/generic/goldfish/camera/media_codecs.xml:system/etc/media_codecs.xml \
- 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/disk_layout.conf b/target/board/vbox_x86/disk_layout.conf
deleted file mode 100644
index 12241ab..0000000
--- a/target/board/vbox_x86/disk_layout.conf
+++ /dev/null
@@ -1,76 +0,0 @@
-# Best to align all partion start/ends on a cylinder boundary (fdisk prefers it)
-# 512 bytes/sector
-# 63 sectors/track
-# 32 tracks/cylinder
-
-# LBAs are in 'k', so...
-# 1008 blocks (1k each) (1032192 bytes) / cylinder
-
-device {
-
- path /dev/block/sda
-
- scheme mbr
-
- # bytes in a disk sector (== 1 LBA), must be a power of 2!
- sector_size 512
-
- # Start_lba should be on a cylindar boundary.
- start_lba 63
-
- # Autodetect disk size if == 0
- num_lba 0
-
- partitions {
- # /dev/sdX1
- sysloader {
- active y
- type linux
- # 8 cyls in length... about 8M
- len 8064
- }
-
- # /dev/sdX2
- recovery {
- active y
- type linux
- # 8 cyls in length... about 8M
- len 8064
- }
-
- # /dev/sdX3
- boot {
- active y
- type linux
- # 8 cyls in length... about 8M
- len 8064
- }
-
- # /dev/sdX4
- # (extended partion begins)
-
- # /dev/sdX5
- cache {
- type linux
- len 512M
- }
-
- # /dev/sdX6
- system {
- type linux
- len 512M
- }
-
- # /dev/sdX7
- third_party {
- type linux
- len 512M
- }
-
- # /dev/sdX8
- data {
- type linux
- len -1
- }
- }
-}
diff --git a/target/board/vbox_x86/init.vbox_x86.rc b/target/board/vbox_x86/init.vbox_x86.rc
deleted file mode 100644
index 15ca572..0000000
--- a/target/board/vbox_x86/init.vbox_x86.rc
+++ /dev/null
@@ -1,90 +0,0 @@
-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
- setprop ro.build.product generic
- setprop ro.product.device generic
-
-# fake some battery state
- setprop status.battery.state Slow
- setprop status.battery.level 5
- setprop status.battery.level_raw 50
- setprop status.battery.level_scale 9
-
-# disable some daemons the emulator doesn't want
- 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
-
-# For the emulator, which bypasses Setup Wizard, you can specify
-# account info for the device via these two properties. Google
-# Login Service will insert these accounts into the database when
-# it is created (ie, after a data wipe).
-#
-# setprop ro.config.hosted_account username@hosteddomain.org:password
-# setprop ro.config.google_account username@gmail.com:password
-#
-# You MUST have a Google account on the device, and you MAY
-# additionally have a hosted account. No other configuration is
-# supported, and arbitrary breakage may result if you specify
-# something else.
-
-service goldfish-setup /system/etc/init.goldfish.sh
- 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
- oneshot
-
-# -Q is a special logcat option that forces the
-# 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, 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/board/vbox_x86/system.prop b/target/board/vbox_x86/system.prop
deleted file mode 100644
index 137a0f9..0000000
--- a/target/board/vbox_x86/system.prop
+++ /dev/null
@@ -1,6 +0,0 @@
-#
-# system.prop for generic sdk
-#
-
-rild.libpath=/system/lib/libreference-ril.so
-rild.libargs=-d /dev/ttyS0
diff --git a/target/product/AndroidProducts.mk b/target/product/AndroidProducts.mk
index abb4d8c..ac5902c 100644
--- a/target/product/AndroidProducts.mk
+++ b/target/product/AndroidProducts.mk
@@ -60,7 +60,6 @@
$(LOCAL_DIR)/aosp_mips64.mk \
$(LOCAL_DIR)/aosp_x86_64.mk \
$(LOCAL_DIR)/full_x86_64.mk \
- $(LOCAL_DIR)/vbox_x86.mk \
$(LOCAL_DIR)/sdk_phone_armv7.mk \
$(LOCAL_DIR)/sdk_phone_x86.mk \
$(LOCAL_DIR)/sdk_phone_mips.mk \
diff --git a/target/product/base.mk b/target/product/base.mk
index 6c495e3..4df10c4 100644
--- a/target/product/base.mk
+++ b/target/product/base.mk
@@ -31,6 +31,7 @@
dhcpcd \
dhcpcd-run-hooks \
dnsmasq \
+ dpm \
framework \
fsck_msdos \
ime \
diff --git a/target/product/core.mk b/target/product/core.mk
index c0a24d3..876a536 100644
--- a/target/product/core.mk
+++ b/target/product/core.mk
@@ -49,7 +49,7 @@
QuickSearchBox \
Settings \
SharedStorageBackup \
- Telecomm \
+ Telecom \
TeleService \
VpnDialogs \
MmsService
diff --git a/target/product/core_minimal.mk b/target/product/core_minimal.mk
index e4eb56a..4c08cb0 100644
--- a/target/product/core_minimal.mk
+++ b/target/product/core_minimal.mk
@@ -32,6 +32,7 @@
Shell \
bcc \
bu \
+ com.android.future.usb.accessory \
com.android.location.provider \
com.android.location.provider.xml \
com.android.media.remotedisplay \
diff --git a/target/product/vbox_x86.mk b/target/product/vbox_x86.mk
deleted file mode 100644
index a7d1b65..0000000
--- a/target/product/vbox_x86.mk
+++ /dev/null
@@ -1,36 +0,0 @@
-#
-# Copyright (C) 2009 The Android Open Source Project
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-# This is a build configuration for a full-featured build of the
-# Open-Source part of the tree. It's geared toward a US-centric
-# build quite specifically for the emulator, and might not be
-# entirely appropriate to inherit from for on-device configurations.
-ifdef NET_ETH0_STARTONBOOT
- PRODUCT_PROPERTY_OVERRIDES += net.eth0.startonboot=1
-endif
-
-$(call inherit-product, $(SRC_TARGET_DIR)/product/aosp_base.mk)
-$(call inherit-product, $(SRC_TARGET_DIR)/board/vbox_x86/device.mk)
-
-PRODUCT_PACKAGES += \
- camera.vbox_x86 \
- lights.vbox_x86 \
- gps.vbox_x86 \
- sensors.vbox_x86
-
-PRODUCT_NAME := vbox_x86
-PRODUCT_DEVICE := vbox_x86
-PRODUCT_MODEL := Full Android on x86 VirtualBox
diff --git a/tools/droiddoc/templates-sdk/assets/css/default.css b/tools/droiddoc/templates-sdk/assets/css/default.css
index 3b647c2..75d932f 100644
--- a/tools/droiddoc/templates-sdk/assets/css/default.css
+++ b/tools/droiddoc/templates-sdk/assets/css/default.css
@@ -7330,3 +7330,9 @@
line-height: 54px;
text-align: center;
}
+
+.annotation-message {
+ display: block;
+ font-style: italic;
+ color: #F80;
+}
diff --git a/tools/droiddoc/templates-sdk/class.cs b/tools/droiddoc/templates-sdk/class.cs
index 0461af6..deffa30 100644
--- a/tools/droiddoc/templates-sdk/class.cs
+++ b/tools/droiddoc/templates-sdk/class.cs
@@ -1,5 +1,6 @@
<?cs include:"doctype.cs" ?>
<?cs include:"macros.cs" ?>
+<?cs include:"macros_override.cs" ?>
<html<?cs if:devsite ?> devsite<?cs /if ?>>
<?cs include:"head_tag.cs" ?>
<body class="gc-documentation <?cs if:(reference.gms || reference.gcm) ?>google<?cs /if ?>
@@ -123,6 +124,7 @@
<?cs /if ?>
<?cs set:colspan = colspan-1 ?>
<?cs /each ?>
+<?cs call:show_annotations_list(class, "<span class='annotation-message'>Included in documentation by the annotations: ", "</span>") ?>
</div><!-- end header -->
@@ -193,7 +195,10 @@
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><?cs call:cond_link(method.name, toroot, method.href, included) ?></span>(<?cs call:parameter_list(method.params) ?>)</nobr>
<?cs if:subcount(method.shortDescr) || subcount(method.deprecated) ?>
- <div class="jd-descrdiv"><?cs call:short_descr(method) ?></div>
+ <div class="jd-descrdiv">
+ <?cs call:short_descr(method) ?>
+ <?cs call:show_annotations_list(method, "<span class='annotation-message'>Included in documentation by the annotations: ", "</span>") ?>
+ </div>
<?cs /if ?>
</td></tr>
<?cs set:count = count + #1 ?>
@@ -210,7 +215,10 @@
<?cs var:field.final ?>
<?cs call:type_link(field.type) ?></nobr></td>
<td class="jd-linkcol"><?cs call:cond_link(field.name, toroot, field.href, included) ?></td>
- <td class="jd-descrcol" width="100%"><?cs call:short_descr(field) ?></td>
+ <td class="jd-descrcol" width="100%">
+ <?cs call:short_descr(field) ?>
+ <?cs call:show_annotations_list(field, "<span class='annotation-message'>Included in documentation by the annotations: ", "</span>") ?>
+ </td>
</tr>
<?cs set:count = count + #1 ?>
<?cs /each ?>
@@ -222,7 +230,10 @@
<tr class="<?cs if:count % #2 ?>alt-color<?cs /if ?> api apilevel-<?cs var:field.since ?>" >
<td class="jd-typecol"><?cs call:type_link(field.type) ?></td>
<td class="jd-linkcol"><?cs call:cond_link(field.name, toroot, field.href, included) ?></td>
- <td class="jd-descrcol" width="100%"><?cs call:short_descr(field) ?></td>
+ <td class="jd-descrcol" width="100%">
+ <?cs call:short_descr(field) ?>
+ <?cs call:show_annotations_list(field, "<span class='annotation-message'>Included in documentation by the annotations: ", "</span>") ?>
+ </td>
</tr>
<?cs set:count = count + #1 ?>
<?cs /each ?>
@@ -242,7 +253,10 @@
<?cs call:cond_link(m.name, toroot, m.href, included) ?>
<?cs /each ?>
</td>
- <td class="jd-descrcol" width="100%"><?cs call:short_descr(attr) ?> </td>
+ <td class="jd-descrcol" width="100%">
+ <?cs call:short_descr(attr) ?>
+ <?cs call:show_annotations_list(attr, "<span class='annotation-message'>Included in documentation by the annotations: ", "</span>") ?>
+ </td>
</tr>
<?cs set:count = count + #1 ?>
<?cs /each ?>
@@ -259,7 +273,10 @@
<?cs var:cl.abstract ?>
<?cs var:cl.kind ?></nobr></td>
<td class="jd-linkcol"><?cs call:type_link(cl.type) ?></td>
- <td class="jd-descrcol" width="100%"><?cs call:short_descr(cl) ?> </td>
+ <td class="jd-descrcol" width="100%">
+ <?cs call:short_descr(cl) ?>
+ <?cs call:show_annotations_list(cl, "<span class='annotation-message'>Included in documentation by the annotations: ", "</span>") ?>
+ </td>
</tr>
<?cs set:count = count + #1 ?>
<?cs /each ?>
@@ -335,7 +352,10 @@
<tr class="<?cs if:count % #2 ?>alt-color<?cs /if ?> api apilevel-<?cs var:field.since ?>" >
<td class="jd-descrcol"><?cs call:type_link(field.type) ?> </td>
<td class="jd-linkcol"><?cs call:cond_link(field.name, toroot, field.href, cl.included) ?> </td>
- <td class="jd-descrcol" width="100%"><?cs call:short_descr(field) ?> </td>
+ <td class="jd-descrcol" width="100%">
+ <?cs call:short_descr(field) ?>
+ <?cs call:show_annotations_list(field, "<span class='annotation-message'>Included in documentation by the annotations: ", "</span>") ?>
+ </td>
</tr>
<?cs set:count = count + #1 ?>
<?cs /each ?>
@@ -504,6 +524,7 @@
<?cs call:federated_refs(field) ?>
</div>
<div class="jd-details-descr">
+ <?cs call:show_annotations_list(field, "<span class='annotation-message'>Included in documentation by the annotations: ", "</span>") ?>
<?cs call:description(field) ?>
<?cs if:subcount(field.constantValue) ?>
<div class="jd-tagdata">
@@ -546,6 +567,7 @@
<?cs call:federated_refs(method) ?>
</div>
<div class="jd-details-descr">
+ <?cs call:show_annotations_list(method, "<span class='annotation-message'>Included in documentation by the annotations: ", "</span>") ?>
<?cs call:description(method) ?>
</div>
</div>
@@ -560,6 +582,7 @@
<h4 class="jd-details-title"><?cs var:attr.name ?>
</h4>
<div class="jd-details-descr">
+ <?cs call:show_annotations_list(attr, "<span class='annotation-message'>Included in documentation by the annotations: ", "</span>") ?>
<?cs call:description(attr) ?>
<div class="jd-tagdata">
diff --git a/tools/droiddoc/templates-sdk/classes.cs b/tools/droiddoc/templates-sdk/classes.cs
index 6769f47..84cca81 100644
--- a/tools/droiddoc/templates-sdk/classes.cs
+++ b/tools/droiddoc/templates-sdk/classes.cs
@@ -1,5 +1,6 @@
<?cs include:"doctype.cs" ?>
<?cs include:"macros.cs" ?>
+<?cs include:"macros_override.cs" ?>
<html<?cs if:devsite ?> devsite<?cs /if ?>>
<?cs include:"head_tag.cs" ?>
<body class="gc-documentation <?cs if:(reference.gms || reference.gcm) ?>google<?cs /if ?>
@@ -30,7 +31,10 @@
<?cs each:cl = letter ?>
<tr class="<?cs if:count % #2 ?>alt-color<?cs /if ?> api apilevel-<?cs var:cl.since ?>" >
<td class="jd-linkcol"><?cs call:type_link(cl.type) ?></td>
- <td class="jd-descrcol" width="100%"><?cs call:short_descr(cl) ?> </td>
+ <td class="jd-descrcol" width="100%">
+ <?cs call:short_descr(cl) ?>
+ <?cs call:show_annotations_list(cl, "<span class='annotation-message'>Included in documentation by the annotations: ", "</span>") ?>
+ </td>
</tr>
<?cs set:count = count + #1 ?>
<?cs /each ?>
diff --git a/tools/droiddoc/templates-sdk/macros_override.cs b/tools/droiddoc/templates-sdk/macros_override.cs
new file mode 100644
index 0000000..6ff8f58
--- /dev/null
+++ b/tools/droiddoc/templates-sdk/macros_override.cs
@@ -0,0 +1,35 @@
+<?cs # Create a comma separated list of annotations on obj that were in showAnnotations in Doclava ?>
+<?cs # pre is an HTML string to start the list, post is an HTML string to close the list ?>
+<?cs # for example call:show_annotations_list(cl, "<td>Annotations: ", "</td>") ?>
+<?cs # if obj has nothing on obj.showAnnotations, nothing will be output ?>
+<?cs def:show_annotations_list(obj, pre, post) ?>
+ <?cs each:anno = obj.showAnnotations ?>
+ <?cs if:first(anno) ?>
+ <?cs var:pre ?>
+ <?cs /if ?>
+ @<?cs var:anno.type.label ?>
+ <?cs if:last(anno) == 0 ?>
+ ,
+ <?cs /if ?>
+ <?cs if:last(anno)?>
+ <?cs var:post ?>
+ <?cs /if ?>
+ <?cs /each ?>
+<?cs /def ?>
+
+<?cs # Override default class_link_table to display annotations ?>
+<?cs def:class_link_table(classes) ?>
+ <?cs set:count = #1 ?>
+ <table class="jd-sumtable-expando">
+ <?cs each:cl=classes ?>
+ <tr class="<?cs if:count % #2 ?>alt-color<?cs /if ?> api apilevel-<?cs var:cl.type.since ?>" >
+ <td class="jd-linkcol"><?cs call:type_link(cl.type) ?></td>
+ <td class="jd-descrcol" width="100%">
+ <?cs call:short_descr(cl) ?>
+ <?cs call:show_annotations_list(cl, "<span class='annotation-message'>Included in documentation by the annotations: ", "</span>") ?>
+ </td>
+ </tr>
+ <?cs set:count = count + #1 ?>
+ <?cs /each ?>
+ </table>
+<?cs /def ?>
\ No newline at end of file
diff --git a/tools/droiddoc/templates-sdk/package.cs b/tools/droiddoc/templates-sdk/package.cs
index abd49f1..acb4ee9 100644
--- a/tools/droiddoc/templates-sdk/package.cs
+++ b/tools/droiddoc/templates-sdk/package.cs
@@ -1,5 +1,6 @@
<?cs include:"doctype.cs" ?>
<?cs include:"macros.cs" ?>
+<?cs include:"macros_override.cs" ?>
<html<?cs if:devsite ?> devsite<?cs /if ?>>
<?cs include:"head_tag.cs" ?>
diff --git a/tools/releasetools/common.py b/tools/releasetools/common.py
index 83cda63..815c76c 100644
--- a/tools/releasetools/common.py
+++ b/tools/releasetools/common.py
@@ -30,6 +30,7 @@
import zipfile
import blockimgdiff
+from rangelib import *
try:
from hashlib import sha1 as sha1
@@ -42,10 +43,17 @@
class Options(object): pass
OPTIONS = Options()
-OPTIONS.search_path = "out/host/linux-x86"
+
+DEFAULT_SEARCH_PATH_BY_PLATFORM = {
+ "linux2": "out/host/linux-x86",
+ "darwin": "out/host/darwin-x86",
+ }
+OPTIONS.search_path = DEFAULT_SEARCH_PATH_BY_PLATFORM.get(sys.platform, None)
+
OPTIONS.signapk_path = "framework/signapk.jar" # Relative to search_path
OPTIONS.extra_signapk_args = []
OPTIONS.java_path = "java" # Use the one on the path by default.
+OPTIONS.java_args = "-Xmx2048m" # JVM Args
OPTIONS.public_key_suffix = ".x509.pem"
OPTIONS.private_key_suffix = ".pk8"
OPTIONS.verbose = False
@@ -487,7 +495,7 @@
else:
sign_name = output_name
- cmd = [OPTIONS.java_path, "-Xmx2048m", "-jar",
+ cmd = [OPTIONS.java_path, OPTIONS.java_args, "-jar",
os.path.join(OPTIONS.search_path, OPTIONS.signapk_path)]
cmd.extend(OPTIONS.extra_signapk_args)
if whole_file:
@@ -611,8 +619,8 @@
opts, args = getopt.getopt(
argv, "hvp:s:x:" + extra_opts,
["help", "verbose", "path=", "signapk_path=", "extra_signapk_args=",
- "java_path=", "public_key_suffix=", "private_key_suffix=",
- "device_specific=", "extra="] +
+ "java_path=", "java_args=", "public_key_suffix=",
+ "private_key_suffix=", "device_specific=", "extra="] +
list(extra_long_opts))
except getopt.GetoptError, err:
Usage(docstring)
@@ -635,6 +643,8 @@
OPTIONS.extra_signapk_args = shlex.split(a)
elif o in ("--java_path",):
OPTIONS.java_path = a
+ elif o in ("--java_args",):
+ OPTIONS.java_args = a
elif o in ("--public_key_suffix",):
OPTIONS.public_key_suffix = a
elif o in ("--private_key_suffix",):
@@ -648,8 +658,9 @@
if extra_option_handler is None or not extra_option_handler(o, a):
assert False, "unknown option \"%s\"" % (o,)
- os.environ["PATH"] = (os.path.join(OPTIONS.search_path, "bin") +
- os.pathsep + os.environ["PATH"])
+ if OPTIONS.search_path:
+ os.environ["PATH"] = (os.path.join(OPTIONS.search_path, "bin") +
+ os.pathsep + os.environ["PATH"])
return args
@@ -1013,10 +1024,11 @@
class BlockDifference:
- def __init__(self, partition, tgt, src=None):
+ def __init__(self, partition, tgt, src=None, check_first_block=False):
self.tgt = tgt
self.src = src
self.partition = partition
+ self.check_first_block = check_first_block
b = blockimgdiff.BlockImageDiff(tgt, src, threads=OPTIONS.worker_threads)
tmpdir = tempfile.mkdtemp()
@@ -1033,6 +1045,9 @@
self._WriteUpdate(script, output_zip)
else:
+ if self.check_first_block:
+ self._CheckFirstBlock(script)
+
script.AppendExtra('if range_sha1("%s", "%s") == "%s" then' %
(self.device, self.src.care_map.to_string_raw(),
self.src.TotalSha1()))
@@ -1062,6 +1077,18 @@
(self.device, partition, partition, partition))
script.AppendExtra(script._WordWrap(call))
+ def _CheckFirstBlock(self, script):
+ r = RangeSet((0, 1))
+ h = sha1()
+ for data in self.src.ReadRangeSet(r):
+ h.update(data)
+ h = h.hexdigest()
+
+ script.AppendExtra(('(range_sha1("%s", "%s") == "%s") || '
+ 'abort("%s has been remounted R/W; '
+ 'reflash device to reenable OTA updates");')
+ % (self.device, r.to_string_raw(), h, self.device))
+
DataImage = blockimgdiff.DataImage
diff --git a/tools/releasetools/ota_from_target_files b/tools/releasetools/ota_from_target_files
index 8b7342b..6f34450 100755
--- a/tools/releasetools/ota_from_target_files
+++ b/tools/releasetools/ota_from_target_files
@@ -731,14 +731,16 @@
system_src = GetImage("system", OPTIONS.source_tmp, OPTIONS.source_info_dict)
system_tgt = GetImage("system", OPTIONS.target_tmp, OPTIONS.target_info_dict)
- system_diff = common.BlockDifference("system", system_tgt, system_src)
+ system_diff = common.BlockDifference("system", system_tgt, system_src,
+ check_first_block=True)
if HasVendorPartition(target_zip):
if not HasVendorPartition(source_zip):
raise RuntimeError("can't generate incremental that adds /vendor")
vendor_src = GetImage("vendor", OPTIONS.source_tmp, OPTIONS.source_info_dict)
vendor_tgt = GetImage("vendor", OPTIONS.target_tmp, OPTIONS.target_info_dict)
- vendor_diff = common.BlockDifference("vendor", vendor_tgt, vendor_src)
+ vendor_diff = common.BlockDifference("vendor", vendor_tgt, vendor_src,
+ check_first_block=True)
else:
vendor_diff = None