diff --git a/android/products/AndroidProducts.mk b/android/products/AndroidProducts.mk new file mode 100644 index 0000000000000000000000000000000000000000..329775055de63cb59aecdfa057f78cf1ad08052a --- /dev/null +++ b/android/products/AndroidProducts.mk @@ -0,0 +1,4 @@ +PRODUCT_MAKEFILES := \ + $(LOCAL_DIR)/anbox_x86_64.mk \ + $(LOCAL_DIR)/anbox_armv7a_neon.mk \ + $(LOCAL_DIR)/anbox_arm64.mk diff --git a/android/products/anbox.mk b/android/products/anbox.mk new file mode 100644 index 0000000000000000000000000000000000000000..f414342f8fde2d6d82f4797b4be5fc477cbbd441 --- /dev/null +++ b/android/products/anbox.mk @@ -0,0 +1,96 @@ +# +# Copyright (C) 2013 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. +# + +PRODUCT_PACKAGES += \ + egl.cfg \ + gralloc.goldfish \ + libGLESv1_CM_emulation \ + lib_renderControl_enc \ + libEGL_emulation \ + libGLES_android \ + libGLESv2_enc \ + libOpenglSystemCommon \ + libGLESv2_emulation \ + libGLESv1_enc \ + qemu-props \ + qemud \ + camera.goldfish \ + camera.goldfish.jpeg \ + lights.goldfish \ + gps.goldfish \ + fingerprint.goldfish \ + sensors.goldfish \ + audio.primary.goldfish \ + vibrator.goldfish \ + power.goldfish \ + fingerprintd + +PRODUCT_COPY_FILES += \ + anbox/android/fstab.goldfish:root/fstab.goldfish \ + anbox/android/init.goldfish.rc:root/init.goldfish.rc \ + anbox/android/init.goldfish.sh:system/etc/init.goldfish.sh \ + anbox/android/ueventd.goldfish.rc:root/ueventd.goldfish.rc \ + anbox/android/camera/media_profiles.xml:system/etc/media_profiles.xml \ + anbox/android/camera/media_codecs.xml:system/etc/media_codecs.xml \ + hardware/libhardware_legacy/audio/audio_policy.conf:system/etc/audio_policy.conf + +PRODUCT_CHARACTERISTICS := emulator + +# Include drawables for all densities +PRODUCT_AAPT_CONFIG := normal + +PRODUCT_COPY_FILES += \ + anbox/scripts/anbox-init.sh:root/anbox-init.sh \ + device/anbox/anbox.xml:system/etc/permissions/anbox.xml + +PRODUCT_PACKAGES += \ + anboxd \ + hwcomposer.anbox \ + AnboxAppMgr + +PRODUCT_PROPERTY_OVERRIDES += \ + ro.hardware=goldfish \ + ro.hardware.hwcomposer=anbox \ + ro.kernel.qemu.gles=1 \ + ro.kernel.qemu=1 + ro.adb.qemud=1 + +# Disable any software key elements in the UI +PRODUCT_PROPERTY_OVERRIDES += \ + qemu.hw.mainkeys=1 + +# Let everything know we're running inside a container +PRODUCT_PROPERTY_OVERRIDES += \ + ro.anbox=1 \ + ro.boot.container=1 + +# We don't want telephony support for now +PRODUCT_PROPERTY_OVERRIDES += \ + ro.radio.noril=yes + +# Disable boot-animation permanently +PRODUCT_PROPERTY_OVERRIDES += \ + debug.sf.nobootanimation=1 + +DEVICE_PACKAGE_OVERLAYS += \ + device/anbox/overlay + +$(call inherit-product, $(SRC_TARGET_DIR)/product/aosp_base.mk) +# Extend heap size we use for dalvik/art runtime +$(call inherit-product, frameworks/native/build/tablet-10in-xhdpi-2048-dalvik-heap.mk) + +PRODUCT_COPY_FILES += \ + device/anbox/anbox.xml:system/etc/permissions/anbox.xml \ No newline at end of file diff --git a/android/products/anbox.xml b/android/products/anbox.xml new file mode 100644 index 0000000000000000000000000000000000000000..c3ad9bbb719382bcc1b0b2f9395dd5d12cb4d08f --- /dev/null +++ b/android/products/anbox.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/android/products/anbox_arm64.mk b/android/products/anbox_arm64.mk new file mode 100644 index 0000000000000000000000000000000000000000..e53527104969f3c2c178e21dfc60ca1effb32185 --- /dev/null +++ b/android/products/anbox_arm64.mk @@ -0,0 +1,24 @@ +# +# Copyright (C) 2013 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. +# + +$(call inherit-product, $(LOCAL_PATH)/arm64/device.mk) +$(call inherit-product, $(LOCAL_PATH)/anbox.mk) + +PRODUCT_NAME := anbox_arm64 +# We're using device/generic/arm64/BoardConfig.mk here +PRODUCT_DEVICE := arm64 +PRODUCT_BRAND := Android +PRODUCT_MODEL := Anbox diff --git a/android/products/anbox_armv7a_neon.mk b/android/products/anbox_armv7a_neon.mk new file mode 100644 index 0000000000000000000000000000000000000000..7f83a5ed66ae2f875adfbe56dd54035644bfb3b4 --- /dev/null +++ b/android/products/anbox_armv7a_neon.mk @@ -0,0 +1,27 @@ +# +# Copyright (C) 2013 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. +# + +$(call inherit-product, $(LOCAL_PATH)/armv7-a-neon/device.mk) +$(call inherit-product, $(LOCAL_PATH)/anbox.mk) + +# Enable low-mem related options (see https://source.android.com/devices/tech/config/low-ram) +PRODUCT_PROPERTY_OVERRIDES += ro.config.low_ram=true +PRODUCT_PROPERTY_OVERRIDES += dalvik.vm.jit.codecachesize=0 + +PRODUCT_NAME := anbox_armv7a_neon +PRODUCT_DEVICE := armv7-a-neon +PRODUCT_BRAND := Android +PRODUCT_MODEL := Anbox diff --git a/android/products/anbox_x86_64.mk b/android/products/anbox_x86_64.mk new file mode 100644 index 0000000000000000000000000000000000000000..b0f0789d5d229b2481049dd33a65bc1abd0ce215 --- /dev/null +++ b/android/products/anbox_x86_64.mk @@ -0,0 +1,25 @@ +# +# Copyright (C) 2013 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. +# + +$(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit.mk) +$(call inherit-product, $(LOCAL_PATH)/x86_64/device.mk) + +$(call inherit-product, $(LOCAL_PATH)/anbox.mk) + +PRODUCT_NAME := anbox_x86_64 +PRODUCT_DEVICE := x86_64 +PRODUCT_BRAND := Android +PRODUCT_MODEL := Anbox diff --git a/android/products/arm64/BoardConfig.mk b/android/products/arm64/BoardConfig.mk new file mode 100644 index 0000000000000000000000000000000000000000..df9f8b4b24fa72fe303669d11c47870cbc125fa0 --- /dev/null +++ b/android/products/arm64/BoardConfig.mk @@ -0,0 +1,53 @@ +# config.mk +# +# Product-specific compile-time definitions. +# + +# The generic product target doesn't have any hardware-specific pieces. +TARGET_NO_BOOTLOADER := true +TARGET_NO_KERNEL := true + +TARGET_ARCH := arm64 +TARGET_ARCH_VARIANT := armv8-a +TARGET_CPU_VARIANT := generic +TARGET_CPU_ABI := arm64-v8a + +# TARGET_2ND_ARCH := arm +# TARGET_2ND_ARCH_VARIANT := armv7-a-neon +# TARGET_2ND_CPU_VARIANT := cortex-a15 +# TARGET_2ND_CPU_ABI := armeabi-v7a +# TARGET_2ND_CPU_ABI2 := armeabi + +AUDIOSERVER_MULTILIB := 64 + +TARGET_USES_64_BIT_BINDER := true + +SMALLER_FONT_FOOTPRINT := true +MINIMAL_FONT_FOOTPRINT := true +# Some framework code requires this to enable BT +BOARD_HAVE_BLUETOOTH := true +BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR := device/generic/common/bluetooth + +BOARD_USES_GENERIC_AUDIO := true + +USE_CAMERA_STUB := true + +BUILD_EMULATOR_OPENGL := true +USE_OPENGL_RENDERER := true + +BOARD_USE_LEGACY_UI := true + +# Enable dex-preoptimization to speed up the first boot sequence +# of an SDK AVD. Note that this operation only works on Linux for now +ifeq ($(HOST_OS),linux) +WITH_DEXPREOPT ?= true +endif + +# PDK does not use ext4 image, but it is added here to prevent build break. +TARGET_USERIMAGES_USE_EXT4 := true +BOARD_SYSTEMIMAGE_PARTITION_SIZE := 2147483648 # 2 GB +BOARD_USERDATAIMAGE_PARTITION_SIZE := 576716800 +BOARD_CACHEIMAGE_PARTITION_SIZE := 69206016 +BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE := ext4 +BOARD_FLASH_BLOCK_SIZE := 512 +TARGET_USERIMAGES_SPARSE_EXT_DISABLED := true diff --git a/android/products/arm64/device.mk b/android/products/arm64/device.mk new file mode 100644 index 0000000000000000000000000000000000000000..69f26ac6bba6e24d00998ed2012a4171f67d8812 --- /dev/null +++ b/android/products/arm64/device.mk @@ -0,0 +1,25 @@ +# +# Copyright (C) 2013 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. +# + +# Copy the 64-bit primary, 32-bit secondary zygote startup script +PRODUCT_COPY_FILES += system/core/rootdir/init.zygote64.rc:root/init.zygote64.rc + +# Set the zygote property to select the 64-bit primary, 32-bit secondary script +# This line must be parsed before the one in core_minimal.mk +PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.zygote=zygote64 + +TARGET_SUPPORTS_32_BIT_APPS := false +TARGET_SUPPORTS_64_BIT_APPS := true diff --git a/android/products/armv7-a-neon/BoardConfig.mk b/android/products/armv7-a-neon/BoardConfig.mk new file mode 100644 index 0000000000000000000000000000000000000000..8d65c0a17c83bc552c93838ab45270cec286550d --- /dev/null +++ b/android/products/armv7-a-neon/BoardConfig.mk @@ -0,0 +1,39 @@ +# config.mk +# +# Product-specific compile-time definitions. +# + +# The generic product target doesn't have any hardware-specific pieces. +TARGET_NO_BOOTLOADER := true +TARGET_NO_KERNEL := true +TARGET_ARCH := arm + +TARGET_ARCH_VARIANT := armv7-a-neon +TARGET_CPU_VARIANT := generic +TARGET_CPU_ABI := armeabi-v7a +TARGET_CPU_ABI2 := armeabi + +SMALLER_FONT_FOOTPRINT := true +MINIMAL_FONT_FOOTPRINT := true +# Some framework code requires this to enable BT +BOARD_HAVE_BLUETOOTH := true +BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR := device/generic/common/bluetooth + +BOARD_USES_GENERIC_AUDIO := true + +USE_CAMERA_STUB := true + +BUILD_EMULATOR_OPENGL := true +USE_OPENGL_RENDERER := true + +BOARD_USE_LEGACY_UI := true + +TARGET_USERIMAGES_USE_EXT4 := true +BOARD_SYSTEMIMAGE_PARTITION_SIZE := 2147483648 # 2 GB +BOARD_USERDATAIMAGE_PARTITION_SIZE := 576716800 +BOARD_CACHEIMAGE_PARTITION_SIZE := 69206016 +BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE := ext4 +BOARD_FLASH_BLOCK_SIZE := 512 +TARGET_USERIMAGES_SPARSE_EXT_DISABLED := true + +BOARD_SEPOLICY_DIRS += build/target/board/generic/sepolicy diff --git a/android/products/armv7-a-neon/device.mk b/android/products/armv7-a-neon/device.mk new file mode 100644 index 0000000000000000000000000000000000000000..101f43279d34d5a46204299a596431621a4f1c82 --- /dev/null +++ b/android/products/armv7-a-neon/device.mk @@ -0,0 +1 @@ +# Nothing yet diff --git a/android/products/overlay/frameworks/base/packages/SettingsProvider/res/values/defaults.xml b/android/products/overlay/frameworks/base/packages/SettingsProvider/res/values/defaults.xml new file mode 100644 index 0000000000000000000000000000000000000000..ada952c1ed3675f89e229767a24672ade554ad80 --- /dev/null +++ b/android/products/overlay/frameworks/base/packages/SettingsProvider/res/values/defaults.xml @@ -0,0 +1,24 @@ + + + + + false + + true + + true + true + diff --git a/android/products/overlay/frameworks/base/packages/SystemUI/res/values/config.xml b/android/products/overlay/frameworks/base/packages/SystemUI/res/values/config.xml new file mode 100644 index 0000000000000000000000000000000000000000..219701577c8ac876a71f466aca3b14b41655a1ae --- /dev/null +++ b/android/products/overlay/frameworks/base/packages/SystemUI/res/values/config.xml @@ -0,0 +1,22 @@ + + + + + + com.android.systemui.statusbar.tv.TvStatusBar + + false + diff --git a/android/products/vendorsetup.sh b/android/products/vendorsetup.sh new file mode 100644 index 0000000000000000000000000000000000000000..516fd04b79dc9b8f604661aaa5a002cba8f04182 --- /dev/null +++ b/android/products/vendorsetup.sh @@ -0,0 +1,3 @@ +add_lunch_combo anbox_x86_64-userdebug +add_lunch_combo anbox_armv7a_neon-userdebug +add_lunch_combo anbox_arm64-userdebug diff --git a/android/products/x86_64/BoardConfig.mk b/android/products/x86_64/BoardConfig.mk new file mode 100644 index 0000000000000000000000000000000000000000..824a8bc1fac5d2fc02404af3a4c21159ac1a1b95 --- /dev/null +++ b/android/products/x86_64/BoardConfig.mk @@ -0,0 +1,36 @@ +TARGET_NO_BOOTLOADER := true +TARGET_NO_KERNEL := true +TARGET_CPU_ABI := x86_64 +TARGET_ARCH := x86_64 +TARGET_ARCH_VARIANT := x86_64 +TARGET_PRELINK_MODULE := false + +TARGET_2ND_CPU_ABI := x86 +TARGET_2ND_ARCH := x86 +TARGET_2ND_ARCH_VARIANT := x86 + +TARGET_USES_64_BIT_BINDER := true + +# no hardware camera +USE_CAMERA_STUB := true + +# Enable dex-preoptimization to speed up the first boot sequence +# of an SDK AVD. Note that this operation only works on Linux for now +ifeq ($(HOST_OS),linux) +WITH_DEXPREOPT ?= true +endif + +# Build OpenGLES emulation host and guest libraries +BUILD_EMULATOR_OPENGL := true + +# Build and enable the OpenGL ES View renderer. When running on the emulator, +# the GLES renderer disables itself if host GL acceleration isn't available. +USE_OPENGL_RENDERER := true + +TARGET_USERIMAGES_USE_EXT4 := true +BOARD_SYSTEMIMAGE_PARTITION_SIZE := 2147483648 # 2 GB +BOARD_USERDATAIMAGE_PARTITION_SIZE := 576716800 +BOARD_CACHEIMAGE_PARTITION_SIZE := 69206016 +BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE := ext4 +BOARD_FLASH_BLOCK_SIZE := 512 +TARGET_USERIMAGES_SPARSE_EXT_DISABLED := true diff --git a/android/products/x86_64/device.mk b/android/products/x86_64/device.mk new file mode 100644 index 0000000000000000000000000000000000000000..101f43279d34d5a46204299a596431621a4f1c82 --- /dev/null +++ b/android/products/x86_64/device.mk @@ -0,0 +1 @@ +# Nothing yet