Skip to content
This repository has been archived by the owner on May 1, 2023. It is now read-only.

Commit

Permalink
Merge pull request #1 from tesla-android/next
Browse files Browse the repository at this point in the history
2022.25.1
  • Loading branch information
mikegapinski authored Jun 26, 2022
2 parents 854d4ae + a166e4f commit 8bb124d
Show file tree
Hide file tree
Showing 106 changed files with 720 additions and 585 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.DS_Store
15 changes: 15 additions & 0 deletions Android.bp
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// Copyright 2018 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.

soong_namespace {}
12 changes: 12 additions & 0 deletions common/aurora/AuroraServices/Android.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)

LOCAL_MODULE := AuroraServices
LOCAL_SRC_FILES := AuroraServices.apk
LOCAL_MODULE_CLASS := APPS
LOCAL_CERTIFICATE := PRESIGNED
LOCAL_PRIVILEGED_MODULE := true
LOCAL_MODULE_SUFFIX := $(COMMON_ANDROID_PACKAGE_SUFFIX)

include $(BUILD_PREBUILT)
Binary file added common/aurora/AuroraServices/AuroraServices.apk
Binary file not shown.
12 changes: 12 additions & 0 deletions common/aurora/AuroraStore/Android.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)

LOCAL_MODULE := AuroraStore
LOCAL_SRC_FILES := AuroraStore.apk
LOCAL_MODULE_CLASS := APPS
LOCAL_CERTIFICATE := PRESIGNED
LOCAL_PRIVILEGED_MODULE := true
LOCAL_MODULE_SUFFIX := $(COMMON_ANDROID_PACKAGE_SUFFIX)

include $(BUILD_PREBUILT)
Binary file added common/aurora/AuroraStore/AuroraStore.apk
Binary file not shown.
7 changes: 7 additions & 0 deletions common/aurora/permissions_com.aurora.services.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<permissions>
<privapp-permissions package="com.aurora.services">
<permission name="android.permission.DELETE_PACKAGES" />
<permission name="android.permission.INSTALL_PACKAGES" />
</privapp-permissions>
</permissions>
2 changes: 1 addition & 1 deletion common/bluetooth/manifest.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<manifest version="1.0" type="device" target-level="7">
<manifest version="1.0" type="device" target-level="6">
<hal format="hidl">
<name>android.hardware.bluetooth</name>
<transport>hwbinder</transport>
Expand Down
32 changes: 18 additions & 14 deletions common/boardconfig-common.mk
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,15 @@

include build/make/target/board/BoardConfigMainlineCommon.mk

AB_OTA_UPDATER := false

TARGET_NO_KERNEL := false

BOARD_USES_RECOVERY_AS_BOOT := true
TARGET_BOOTLOADER_BOARD_NAME := $(PRODUCT_NAME)

BOARD_USES_GENERIC_KERNEL_IMAGE := true
BOARD_MOVE_RECOVERY_RESOURCES_TO_VENDOR_BOOT := true
BOARD_MOVE_GSI_AVB_KEYS_TO_VENDOR_BOOT := true
BOARD_USES_RECOVERY_AS_BOOT :=
BOARD_EXCLUDE_KERNEL_FROM_RECOVERY_IMAGE :=

# generic wifi
WPA_SUPPLICANT_VERSION := VER_0_8_X
Expand Down Expand Up @@ -57,6 +61,7 @@ BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE := ext4
# Boot image 64 MiB
BOARD_BOOTIMAGE_PARTITION_SIZE := $(shell echo $$(( 64 * 1024 * 1024 )))
BOARD_DTBOIMG_PARTITION_SIZE := $(shell echo $$(( 512 * 1024 )))
BOARD_VENDOR_BOOTIMAGE_PARTITION_SIZE := $(shell echo $$(( 32 * 1024 * 1024 )))

# DKLM partition
BOARD_USES_VENDOR_DLKMIMAGE := true
Expand All @@ -67,9 +72,6 @@ TARGET_COPY_OUT_VENDOR_DLKM := vendor_dlkm
TARGET_COPY_OUT_ROOT := root
BOARD_BUILD_SYSTEM_ROOT_IMAGE := false

# Recovery image
TARGET_COPY_OUT_RECOVERY := recovery

BOARD_EXT4_SHARE_DUP_BLOCKS := true

# Dynamic partition 2500 MiB
Expand All @@ -80,15 +82,15 @@ BOARD_GLODROID_DYNAMIC_PARTITIONS_SIZE := $(shell echo $$(( $(BOARD_SUPER_PARTIT
BOARD_GLODROID_DYNAMIC_PARTITIONS_PARTITION_LIST := system system_ext vendor product vendor_dlkm

AB_OTA_UPDATER := true
AB_OTA_PARTITIONS += boot system system_ext vendor product vendor_dlkm
AB_OTA_PARTITIONS += boot system system_ext vendor product vendor_dlkm vendor_boot

TARGET_RECOVERY_PIXEL_FORMAT := RGBX_8888

# Kernel build rules
BOARD_INCLUDE_RECOVERY_DTBO := true
BOARD_INCLUDE_DTB_IN_BOOTIMG := true
BOARD_PREBUILT_DTBIMAGE_DIR := device/glodroid/platform/kernel
BOARD_BOOT_HEADER_VERSION := 2
BOARD_BOOT_HEADER_VERSION := 4
ifeq ($(PRODUCT_BOARD_PLATFORM),sunxi)
BOARD_KERNEL_BASE := 0x40000000
endif
Expand All @@ -113,7 +115,7 @@ BOARD_USES_TINYHAL_AUDIO := true
TINYCOMPRESS_TSTAMP_IS_LONG := true
TINYALSA_NO_ADD_NEW_CTRLS := true
TINYALSA_NO_CTL_GET_ID := true
#USE_CAMERA_STUB := true
USE_CAMERA_STUB := true
USE_OPENGL_RENDERER := true
BOARD_USE_LEGACY_UI := true

Expand All @@ -126,8 +128,8 @@ BOARD_USES_PRODUCTIMAGE := true
BOARD_PRODUCTIMAGE_FILE_SYSTEM_TYPE := ext4

# Enable dex-preoptimization to speed up first boot sequence
DEX_PREOPT_DEFAULT := nostripping
WITH_DEXPREOPT := true
#DEX_PREOPT_DEFAULT := nostripping
#WITH_DEXPREOPT := true
ART_USE_HSPACE_COMPACT := true

DEVICE_MANIFEST_FILE := device/glodroid/common/manifest.xml
Expand All @@ -138,7 +140,9 @@ BOARD_VENDOR_SEPOLICY_DIRS += device/glodroid/common/sepolicy/vendor

BOARD_USES_GRALLOC_HANDLE := true

BOARD_LIBCAMERA_USES_MESON_BUILD := true
BOARD_LIBCAMERA_IPAS := raspberrypi
BOARD_LIBCAMERA_PIPELINES := simple raspberrypi
# BOARD_LIBCAMERA_USES_MESON_BUILD := true
# BOARD_LIBCAMERA_IPAS := raspberrypi
# BOARD_LIBCAMERA_PIPELINES := simple raspberrypi
BUILD_BROKEN_ELF_PREBUILT_PRODUCT_COPY_FILES := true

BOARD_USES_GLODROID_MAKE_TARGETS := true
8 changes: 8 additions & 0 deletions common/compatibility_matrix.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
<compatibility-matrix version="1.0" type="device">
<hal format="hidl" optional="false">
<name>android.frameworks.displayservice</name>
<version>1.0</version>
<interface>
<name>IDisplayService</name>
<instance>default</instance>
</interface>
</hal>
<hal format="hidl" optional="false">
<name>android.frameworks.sensorservice</name>
<version>1.0</version>
Expand Down
138 changes: 67 additions & 71 deletions common/device-common.mk
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,6 @@ endif

PRODUCT_SHIPPING_API_LEVEL := 31

# Set custom settings
DEVICE_PACKAGE_OVERLAYS := device/linaro/hikey/overlay
ifneq (,$(filter $(DEVICE_TYPE),tv))
# Set TV Custom Settings
DEVICE_PACKAGE_OVERLAYS += device/google/atv/overlay
endif

# Add wifi-related packages
PRODUCT_PACKAGES += libwpa_client wpa_supplicant hostapd wificond
PRODUCT_PROPERTY_OVERRIDES += wifi.interface=wlan0 \
Expand Down Expand Up @@ -97,8 +90,8 @@ PRODUCT_PACKAGES += \

# Boot control
PRODUCT_PACKAGES += \
bootctrl.default \
[email protected] \
[email protected] \
[email protected] \

# Thermal HAL
Expand All @@ -121,20 +114,7 @@ PRODUCT_PACKAGES += \
[email protected] \
[email protected] \

## Composer HAL for minigbm + minigbm gralloc0:
#PRODUCT_PACKAGES += \
# [email protected] \
# [email protected] \
# [email protected] \
# hwcomposer.drm_minigbm \
# gralloc.minigbm \
#
#PRODUCT_PROPERTY_OVERRIDES += \
# ro.hardware.gralloc=minigbm \
# ro.hardware.hwcomposer=drm_minigbm \
##

## Composer HAL for gralloc4 + minigbm gralloc4: (Require changes in manifest)
## Composer HAL for gralloc4 + minigbm gralloc4
PRODUCT_PACKAGES += \
[email protected]_gbm_mesa \
[email protected]_gbm_mesa \
Expand All @@ -144,38 +124,25 @@ PRODUCT_PROPERTY_OVERRIDES += \
ro.hardware.hwcomposer=drm \
##

## Composer HAL for libdrm_gralloc + gbm_gralloc (gralloc0):
#PRODUCT_PACKAGES += \
# [email protected] \
# [email protected] \
# [email protected] \
# hwcomposer.drm \
# gralloc.gbm \
#
#PRODUCT_PROPERTY_OVERRIDES += \
# ro.hardware.gralloc=gbm \
# ro.hardware.hwcomposer=drm \
##

PRODUCT_PROPERTY_OVERRIDES += \
ro.sf.lcd_density=240 \
ro.sf.lcd_density=180 \

# Gatekeeper HAL
PRODUCT_PACKAGES += \
[email protected] \

# Keymaster HAL
# Keymint HAL
PRODUCT_PACKAGES += \
android.hardware.[email protected]-service
android.hardware.security.keymint-service

# PowerHAL
PRODUCT_PACKAGES += \
android.hardware.power-service.example \

# Health HAL
PRODUCT_PACKAGES += \
android.hardware.health-service.example \
android.hardware.health-service.example_recovery \
android.hardware.health@2.1-service \
android.hardware.health@2.1-impl \

ifneq (,$(filter $(DEVICE_TYPE),tv))
# TV Specific Packages
Expand All @@ -196,33 +163,31 @@ else

# Use Launcher3QuickStep
PRODUCT_PACKAGES += Launcher3QuickStep
PRODUCT_PROPERTY_OVERRIDES += ro.sf.lcd_density=240
endif

#External USB Camera HAL
PRODUCT_PACKAGES += \
[email protected] \

PRODUCT_COPY_FILES += \
device/glodroid/common/external_camera_config.xml:$(TARGET_COPY_OUT_VENDOR)/etc/external_camera_config.xml

#Camera HAL
PRODUCT_PACKAGES += \
camera.libcamera \
[email protected]_64 \

PRODUCT_PROPERTY_OVERRIDES += ro.hardware.camera=libcamera

PRODUCT_COPY_FILES += \
frameworks/native/data/etc/android.hardware.camera.concurrent.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.camera.concurrent.xml \
frameworks/native/data/etc/android.hardware.camera.flash-autofocus.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.camera.flash-autofocus.xml \
frameworks/native/data/etc/android.hardware.camera.front.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.camera.front.xml \
frameworks/native/data/etc/android.hardware.camera.full.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.camera.full.xml \
frameworks/native/data/etc/android.hardware.camera.raw.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.camera.raw.xml \
# PRODUCT_PACKAGES += \
# [email protected] \
#
# PRODUCT_COPY_FILES += \
# device/glodroid/common/external_camera_config.xml:$(TARGET_COPY_OUT_VENDOR)/etc/external_camera_config.xml
#
# #Camera HAL
# PRODUCT_PACKAGES += \
# camera.libcamera \
# [email protected]_64 \
#
# PRODUCT_PROPERTY_OVERRIDES += ro.hardware.camera=libcamera

# PRODUCT_COPY_FILES += \
# frameworks/native/data/etc/android.hardware.camera.concurrent.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.camera.concurrent.xml \
# frameworks/native/data/etc/android.hardware.camera.flash-autofocus.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.camera.flash-autofocus.xml \
# frameworks/native/data/etc/android.hardware.camera.front.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.camera.front.xml \
# frameworks/native/data/etc/android.hardware.camera.full.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.camera.full.xml \
# frameworks/native/data/etc/android.hardware.camera.raw.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.camera.raw.xml \
# Copy hardware config file(s)
PRODUCT_COPY_FILES += \
device/linaro/hikey/etc/permissions/android.hardware.screen.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.screen.xml \
device/linaro/hikey/etc/permissions/android.software.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.xml \
frameworks/native/data/etc/android.software.cts.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.cts.xml \
frameworks/native/data/etc/android.software.app_widgets.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.app_widgets.xml \
Expand Down Expand Up @@ -298,10 +263,6 @@ PRODUCT_COPY_FILES += \
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/init.recovery.glodroid.rc:recovery/root/init.recovery.$(TARGET_PRODUCT).rc \

# Tools
PRODUCT_COPY_FILES += \
device/glodroid/platform/tools/flash-all.sh:flash-all.sh \

PRODUCT_OTA_ENFORCE_VINTF_KERNEL_REQUIREMENTS := false

PRODUCT_USE_DYNAMIC_PARTITIONS := true
Expand All @@ -313,25 +274,60 @@ PRODUCT_COPY_FILES += \
################################################################################

# Screen orientation lock
PRODUCT_COPY_FILES += frameworks/native/data/etc/android.hardware.screen.landscape.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.screen.landscape.xml \

PRODUCT_PROPERTY_OVERRIDES += \
config.override_forced_orient=false \
ro.sf.hwrotation=0 \
persist.demo.hdmirotation=landscape \
persist.demo.rotationlock=true \
persist.demo.remoterotation=landscape \

################################################################################

# Google Apps
$(call inherit-product, vendor/opengapps/build/opengapps-packages.mk)

GAPPS_VARIANT := nano
# Aurora Store and microG

GAPPS_FORCE_PACKAGE_OVERRIDES := true
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/aurora/permissions_com.aurora.services.xml:system/etc/permissions/permissions_com.aurora.services.xml \

PRODUCT_BROKEN_VERIFY_USES_LIBRARIES := true
PRODUCT_PACKAGES += \
AuroraServices \
AuroraStore \

$(call inherit-product, vendor/partner_gms/products/gms.mk)

################################################################################

# LineageOS browser

PRODUCT_PACKAGES += \
Jelly \

################################################################################

# usb_modeswitch

PRODUCT_PACKAGES += \
usb_modeswitch \

PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/usb_modeswitch.conf:$(TARGET_COPY_OUT_VENDOR)/etc/usb_modeswitch.conf \

################################################################################

# v4l2

PRODUCT_PACKAGES += \
v4l2-dbg \
v4l2-compliance \
v4l2-ctl \

################################################################################

PRODUCT_PACKAGES += \
glodroid_overlay_frameworks_base_core \
glodroid_overlay_settings_provider \
glodroid_overlay_systemui \
glodroid_overlay_service_wifi_resources \

PRODUCT_SOONG_NAMESPACES += device/glodroid
1 change: 1 addition & 0 deletions common/init.common.rc
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ service virtual_touchscreen_websocket_relay /vendor/bin/virtual_touchscreen_webs
oneshot

on property:sys.boot_completed=1
write /proc/sys/kernel/printk 3
start preinstall
start virtual_touchscreen_websocket_relay

Expand Down
1 change: 1 addition & 0 deletions common/lowram/device-common-1gb.mk
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ PRODUCT_PROPERTY_OVERRIDES += ro.config.low_ram=true

PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/init.lowram.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/init.lowram.rc \
device/glodroid/common/no_animation.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/no_animation.rc \

LOCAL_PATH := device/glodroid/common
include $(LOCAL_PATH)/device-common.mk
Loading

0 comments on commit 8bb124d

Please sign in to comment.