add android tv build target
This commit is contained in:
@@ -1,11 +1,13 @@
|
||||
#
|
||||
# Copyright (C) 2021-2022 KonstaKANG
|
||||
# Copyright (C) 2021-2023 KonstaKANG
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
||||
PRODUCT_MAKEFILES := \
|
||||
$(LOCAL_DIR)/aosp_rpi4.mk
|
||||
$(LOCAL_DIR)/aosp_rpi4.mk \
|
||||
$(LOCAL_DIR)/aosp_rpi4_tv.mk
|
||||
|
||||
COMMON_LUNCH_CHOICES := \
|
||||
aosp_rpi4-userdebug
|
||||
aosp_rpi4-userdebug \
|
||||
aosp_rpi4_tv-userdebug
|
||||
|
19
aosp_rpi4.mk
19
aosp_rpi4.mk
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (C) 2021-2022 KonstaKANG
|
||||
# Copyright (C) 2021-2023 KonstaKANG
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
@@ -7,6 +7,23 @@
|
||||
# Inherit device configuration
|
||||
$(call inherit-product, device/brcm/rpi4/device.mk)
|
||||
|
||||
PRODUCT_AAPT_CONFIG := normal mdpi hdpi
|
||||
PRODUCT_AAPT_PREF_CONFIG := hdpi
|
||||
PRODUCT_CHARACTERISTICS := tablet,nosdcard
|
||||
$(call inherit-product, $(SRC_TARGET_DIR)/product/full_base.mk)
|
||||
|
||||
# Overlays
|
||||
PRODUCT_PACKAGES += \
|
||||
AndroidRpiOverlay \
|
||||
SettingsRpiOverlay \
|
||||
SettingsProviderRpiOverlay \
|
||||
SystemUIRpiOverlay \
|
||||
WifiRpiOverlay
|
||||
|
||||
# Permissions
|
||||
PRODUCT_COPY_FILES += \
|
||||
frameworks/native/data/etc/tablet_core_hardware.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/tablet_core_hardware.xml
|
||||
|
||||
# Device identifier. This must come after all inclusions.
|
||||
PRODUCT_DEVICE := rpi4
|
||||
PRODUCT_NAME := aosp_rpi4
|
||||
|
38
aosp_rpi4_tv.mk
Normal file
38
aosp_rpi4_tv.mk
Normal file
@@ -0,0 +1,38 @@
|
||||
#
|
||||
# Copyright (C) 2021-2023 KonstaKANG
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
||||
# Inherit device configuration
|
||||
$(call inherit-product, device/brcm/rpi4/device.mk)
|
||||
|
||||
PRODUCT_AAPT_PREF_CONFIG := tvdpi
|
||||
PRODUCT_CHARACTERISTICS := tv
|
||||
$(call inherit-product, device/google/atv/products/atv_base.mk)
|
||||
|
||||
# Android TV
|
||||
PRODUCT_PACKAGES += \
|
||||
DocumentsUI \
|
||||
LeanbackIME \
|
||||
TvProvision \
|
||||
TvSampleLeanbackLauncher \
|
||||
TvSettingsTwoPanel
|
||||
|
||||
# Bluetooth
|
||||
PRODUCT_VENDOR_PROPERTIES += \
|
||||
bluetooth.device.class_of_device=34,4,36
|
||||
|
||||
# Overlays
|
||||
PRODUCT_PACKAGES += \
|
||||
AndroidTvRpiOverlay \
|
||||
SettingsProviderTvRpiOverlay \
|
||||
WifiRpiOverlay
|
||||
|
||||
# Device identifier. This must come after all inclusions.
|
||||
PRODUCT_DEVICE := rpi4
|
||||
PRODUCT_NAME := aosp_rpi4_tv
|
||||
PRODUCT_BRAND := Raspberry
|
||||
PRODUCT_MODEL := Raspberry Pi 4
|
||||
PRODUCT_MANUFACTURER := Raspberry
|
||||
PRODUCT_RELEASE_NAME := Raspberry Pi 4
|
19
device.mk
19
device.mk
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (C) 2021-2022 KonstaKANG
|
||||
# Copyright (C) 2021-2023 KonstaKANG
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
@@ -8,14 +8,9 @@ DEVICE_PATH := device/brcm/rpi4
|
||||
PRODUCT_SOONG_NAMESPACES += $(DEVICE_PATH)
|
||||
|
||||
$(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit.mk)
|
||||
$(call inherit-product, $(SRC_TARGET_DIR)/product/full_base.mk)
|
||||
$(call inherit-product, frameworks/native/build/tablet-7in-xhdpi-2048-dalvik-heap.mk)
|
||||
$(call inherit-product, vendor/brcm/rpi4/rpi4-vendor.mk)
|
||||
|
||||
PRODUCT_AAPT_CONFIG := normal mdpi hdpi
|
||||
PRODUCT_AAPT_PREF_CONFIG := hdpi
|
||||
PRODUCT_CHARACTERISTICS := tablet,nosdcard
|
||||
|
||||
# API level
|
||||
PRODUCT_SHIPPING_API_LEVEL := 33
|
||||
|
||||
@@ -218,18 +213,6 @@ PRODUCT_COPY_FILES += \
|
||||
frameworks/av/media/libstagefright/data/media_codecs_google_c2_tv.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_google_c2_tv.xml \
|
||||
frameworks/av/media/libstagefright/data/media_codecs_google_c2_video.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_google_c2_video.xml
|
||||
|
||||
# Overlays
|
||||
PRODUCT_PACKAGES += \
|
||||
AndroidRpiOverlay \
|
||||
SettingsRpiOverlay \
|
||||
SettingsProviderRpiOverlay \
|
||||
SystemUIRpiOverlay \
|
||||
WifiRpiOverlay
|
||||
|
||||
# Permissions
|
||||
PRODUCT_COPY_FILES += \
|
||||
frameworks/native/data/etc/tablet_core_hardware.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/tablet_core_hardware.xml
|
||||
|
||||
# Power
|
||||
PRODUCT_PACKAGES += \
|
||||
android.hardware.power-service.example
|
||||
|
10
overlay/AndroidTvRpiOverlay/Android.bp
Normal file
10
overlay/AndroidTvRpiOverlay/Android.bp
Normal file
@@ -0,0 +1,10 @@
|
||||
// Copyright (C) 2021-2022 KonstaKANG
|
||||
//
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
runtime_resource_overlay {
|
||||
name: "AndroidTvRpiOverlay",
|
||||
resource_dirs: ["res"],
|
||||
sdk_version: "current",
|
||||
proprietary: true
|
||||
}
|
19
overlay/AndroidTvRpiOverlay/AndroidManifest.xml
Normal file
19
overlay/AndroidTvRpiOverlay/AndroidManifest.xml
Normal file
@@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
/*
|
||||
** Copyright (C) 2021-2022 KonstaKANG
|
||||
**
|
||||
** SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
-->
|
||||
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="android.rpi.tv"
|
||||
android:versionCode="1"
|
||||
android:versionName="1.0" >
|
||||
<application android:hasCode="false" />
|
||||
<overlay
|
||||
android:targetPackage="android"
|
||||
android:isStatic="true"
|
||||
android:priority="0" />
|
||||
</manifest>
|
62
overlay/AndroidTvRpiOverlay/res/values/config.xml
Normal file
62
overlay/AndroidTvRpiOverlay/res/values/config.xml
Normal file
@@ -0,0 +1,62 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright (C) 2009 The Android Open Source Project
|
||||
Copyright (C) 2021-2022 KonstaKANG
|
||||
|
||||
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.
|
||||
-->
|
||||
|
||||
<resources>
|
||||
<!-- User activity timeout: Minimum screen off timeout in milliseconds.
|
||||
|
||||
Sets a lower bound for the {@link Settings.System#SCREEN_OFF_TIMEOUT} setting
|
||||
which determines how soon the device will go to sleep when there is no
|
||||
user activity.
|
||||
|
||||
This value must be greater than zero, otherwise the device will immediately
|
||||
fall asleep again as soon as it is awoken.
|
||||
-->
|
||||
<integer name="config_minimumScreenOffTimeout">86400000</integer>
|
||||
|
||||
<!-- Default screen brightness setting.
|
||||
Must be in the range specified by minimum and maximum. -->
|
||||
<integer name="config_screenBrightnessSettingDefault">128</integer>
|
||||
|
||||
<!-- Minimum screen brightness setting allowed by the power manager.
|
||||
The user is forbidden from setting the brightness below this level. -->
|
||||
<integer name="config_screenBrightnessSettingMinimum">20</integer>
|
||||
|
||||
<!-- Screen brightness used to dim the screen when the user activity
|
||||
timeout expires. May be less than the minimum allowed brightness setting
|
||||
that can be set by the user. -->
|
||||
<integer name="config_screenBrightnessDim">20</integer>
|
||||
|
||||
<!-- If true, then we do not ask user for permission for apps to connect to USB devices.
|
||||
Do not set this to true for production devices. Doing so will cause you to fail CTS. -->
|
||||
<bool name="config_disableUsbPermissionDialogs">true</bool>
|
||||
|
||||
<!-- Control the behavior when the user long presses the power button.
|
||||
0 - Nothing
|
||||
1 - Global actions menu
|
||||
2 - Power off (with confirmation)
|
||||
3 - Power off (without confirmation)
|
||||
4 - Go to voice assist
|
||||
5 - Go to assistant (Settings.Secure.ASSISTANT)
|
||||
-->
|
||||
<integer name="config_longPressOnPowerBehavior">1</integer>
|
||||
|
||||
<!-- CEC Configuration -->
|
||||
<bool name="config_cecTvSendStandbyOnSleepEnabled_default">false</bool>
|
||||
<bool name="config_cecTvSendStandbyOnSleepDisabled_default">true</bool>
|
||||
|
||||
</resources>
|
10
overlay/SettingsProviderTvRpiOverlay/Android.bp
Normal file
10
overlay/SettingsProviderTvRpiOverlay/Android.bp
Normal file
@@ -0,0 +1,10 @@
|
||||
// Copyright (C) 2021-2022 KonstaKANG
|
||||
//
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
runtime_resource_overlay {
|
||||
name: "SettingsProviderTvRpiOverlay",
|
||||
resource_dirs: ["res"],
|
||||
sdk_version: "current",
|
||||
proprietary: true
|
||||
}
|
19
overlay/SettingsProviderTvRpiOverlay/AndroidManifest.xml
Normal file
19
overlay/SettingsProviderTvRpiOverlay/AndroidManifest.xml
Normal file
@@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
/*
|
||||
** Copyright (C) 2021-2022 KonstaKANG
|
||||
**
|
||||
** SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
-->
|
||||
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.android.providers.settings.rpi.tv"
|
||||
android:versionCode="1"
|
||||
android:versionName="1.0" >
|
||||
<application android:hasCode="false" />
|
||||
<overlay
|
||||
android:targetPackage="com.android.providers.settings"
|
||||
android:isStatic="true"
|
||||
android:priority="0" />
|
||||
</manifest>
|
31
overlay/SettingsProviderTvRpiOverlay/res/values/defaults.xml
Normal file
31
overlay/SettingsProviderTvRpiOverlay/res/values/defaults.xml
Normal file
@@ -0,0 +1,31 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright (C) 2009 The Android Open Source Project
|
||||
Copyright (C) 2021-2022 KonstaKANG
|
||||
|
||||
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.
|
||||
-->
|
||||
|
||||
<resources>
|
||||
|
||||
<!-- Default screen brightness -->
|
||||
<integer name="def_screen_brightness">128</integer>
|
||||
|
||||
<!-- Disable location by default -->
|
||||
<integer name="def_location_mode">0</integer>
|
||||
|
||||
<!-- No setup wizard -->
|
||||
<bool name="def_device_provisioned">true</bool>
|
||||
<bool name="def_user_setup_complete">true</bool>
|
||||
|
||||
</resources>
|
Reference in New Issue
Block a user