From a443131d82d5e189d01a2d4d36fa40fb3faae0d6 Mon Sep 17 00:00:00 2001 From: LuK1337 Date: Tue, 23 Jun 2020 12:47:13 +0200 Subject: [PATCH] instantnoodlep: Initial commit --- Android.mk | 32 ++ AndroidProducts.mk | 23 ++ BoardConfig.mk | 37 ++ bluetooth/include/bdroid_buildcfg.h | 34 ++ device.mk | 44 ++ extract-files.sh | 33 ++ lineage.dependencies | 6 + lineage_instantnoodlep.mk | 40 ++ .../SystemUI/res/values-port/dimens.xml | 20 + .../packages/SystemUI/res/values/config.xml | 30 ++ .../base/core/res/res/values/config.xml | 386 ++++++++++++++++++ .../base/core/res/res/xml/power_profile.xml | 151 +++++++ .../packages/SystemUI/res/values/dimens.xml | 29 ++ product.prop | 2 + setup-makefiles.sh | 27 ++ 15 files changed, 894 insertions(+) create mode 100644 Android.mk create mode 100644 AndroidProducts.mk create mode 100644 BoardConfig.mk create mode 100644 bluetooth/include/bdroid_buildcfg.h create mode 100644 device.mk create mode 100755 extract-files.sh create mode 100644 lineage.dependencies create mode 100644 lineage_instantnoodlep.mk create mode 100644 overlay-lineage/frameworks/base/packages/SystemUI/res/values-port/dimens.xml create mode 100644 overlay-lineage/frameworks/base/packages/SystemUI/res/values/config.xml create mode 100644 overlay/frameworks/base/core/res/res/values/config.xml create mode 100644 overlay/frameworks/base/core/res/res/xml/power_profile.xml create mode 100644 overlay/frameworks/base/packages/SystemUI/res/values/dimens.xml create mode 100644 product.prop create mode 100755 setup-makefiles.sh diff --git a/Android.mk b/Android.mk new file mode 100644 index 0000000..934b70f --- /dev/null +++ b/Android.mk @@ -0,0 +1,32 @@ +# +# Copyright (C) 2018 The LineageOS 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 contains the module build definitions for the hardware-specific +# components for this device. +# +# As much as possible, those components should be built unconditionally, +# with device-specific names to avoid collisions, to avoid device-specific +# bitrot and build breakages. Building a component unconditionally does +# *not* include it on all devices, so it is safe even with hardware-specific +# components. +# + +LOCAL_PATH := $(call my-dir) + +ifeq ($(TARGET_DEVICE),instantnoodlep) +include $(call all-makefiles-under,$(LOCAL_PATH)) +endif diff --git a/AndroidProducts.mk b/AndroidProducts.mk new file mode 100644 index 0000000..fb89105 --- /dev/null +++ b/AndroidProducts.mk @@ -0,0 +1,23 @@ +# +# Copyright (C) 2018-2019 The LineageOS 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_MAKEFILES := \ + $(LOCAL_DIR)/lineage_instantnoodlep.mk + +COMMON_LUNCH_CHOICES := \ + lineage_instantnoodlep-user \ + lineage_instantnoodlep-userdebug \ + lineage_instantnoodlep-eng diff --git a/BoardConfig.mk b/BoardConfig.mk new file mode 100644 index 0000000..cb2c3f2 --- /dev/null +++ b/BoardConfig.mk @@ -0,0 +1,37 @@ +# +# Copyright (C) 2018 The LineageOS 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. +# + +# Inherit from oneplus sm8250-common +-include device/oneplus/sm8250-common/BoardConfigCommon.mk + +DEVICE_PATH := device/oneplus/instantnoodlep + +# Bluetooth +BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR := $(DEVICE_PATH)/bluetooth/include + +# Display +TARGET_SCREEN_DENSITY := 560 + +# Fingerprint +SOONG_CONFIG_ONEPLUS_KONA_FOD_POS_X = 604 +SOONG_CONFIG_ONEPLUS_KONA_FOD_POS_Y = 2434 +SOONG_CONFIG_ONEPLUS_KONA_FOD_SIZE = 232 + +# Properties +TARGET_PRODUCT_PROP += $(DEVICE_PATH)/product.prop + +# inherit from the proprietary version +-include vendor/oneplus/instantnoodlep/BoardConfigVendor.mk diff --git a/bluetooth/include/bdroid_buildcfg.h b/bluetooth/include/bdroid_buildcfg.h new file mode 100644 index 0000000..9472cb1 --- /dev/null +++ b/bluetooth/include/bdroid_buildcfg.h @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2013, The Linux Foundation. All rights reserved. + * Not a Contribution, Apache license notifications and license are retained + * for attribution purposes only. + * + * Copyright (C) 2012 The Android Open Source Project + * Copyright (C) 2018 The LineageOS 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. + */ + +#ifndef _BDROID_BUILDCFG_H +#define _BDROID_BUILDCFG_H + +#define BTM_DEF_LOCAL_NAME "OnePlus 8 Pro" +// Disables read remote device feature +#define MAX_ACL_CONNECTIONS 16 +#define MAX_L2CAP_CHANNELS 16 +#define BLE_VND_INCLUDED TRUE +// skips conn update at conn completion +#define BT_CLEAN_TURN_ON_DISABLED 1 +/* Increasing SEPs to 12 from 6 to support SHO/MCast i.e. two streams per codec */ +#define AVDT_NUM_SEPS 12 +#endif diff --git a/device.mk b/device.mk new file mode 100644 index 0000000..0e148f2 --- /dev/null +++ b/device.mk @@ -0,0 +1,44 @@ +# +# Copyright (C) 2018 The LineageOS 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 file sets variables that control the way modules are built +# thorughout the system. It should not be used to conditionally +# disable makefiles (the proper mechanism to control what gets +# included in a build is to use PRODUCT_PACKAGES in a product +# definition file). +# + +# Overlays +DEVICE_PACKAGE_OVERLAYS += \ + $(LOCAL_PATH)/overlay \ + $(LOCAL_PATH)/overlay-lineage + +# Device uses high-density artwork where available +PRODUCT_AAPT_CONFIG := normal +PRODUCT_AAPT_PREF_CONFIG := xxxhdpi + +# Boot animation +TARGET_SCREEN_HEIGHT := 3168 +TARGET_SCREEN_WIDTH := 1440 + +PRODUCT_SHIPPING_API_LEVEL := 29 + +# Inherit from oneplus sm8250-common +$(call inherit-product, device/oneplus/sm8250-common/common.mk) + +# Inherit from vendor blobs +#$(call inherit-product, vendor/oneplus/instantnoodlep/instantnoodlep-vendor.mk) diff --git a/extract-files.sh b/extract-files.sh new file mode 100755 index 0000000..b89077e --- /dev/null +++ b/extract-files.sh @@ -0,0 +1,33 @@ +#!/bin/bash +# +# Copyright (C) 2018-2019 The LineageOS 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. +# + +# If we're being sourced by the common script that we called, +# stop right here. No need to go down the rabbit hole. +if [ "${BASH_SOURCE[0]}" != "${0}" ]; then + return +fi + +set -e + +# Required! +export DEVICE=instantnoodlep +export DEVICE_COMMON=sm8250-common +export VENDOR=oneplus + +export DEVICE_BRINGUP_YEAR=2020 + +"./../../${VENDOR}/${DEVICE_COMMON}/extract-files.sh" "$@" diff --git a/lineage.dependencies b/lineage.dependencies new file mode 100644 index 0000000..8175381 --- /dev/null +++ b/lineage.dependencies @@ -0,0 +1,6 @@ +[ + { + "repository": "android_device_oneplus_sm8250-common", + "target_path": "device/oneplus/sm8250-common" + } +] diff --git a/lineage_instantnoodlep.mk b/lineage_instantnoodlep.mk new file mode 100644 index 0000000..ad42b56 --- /dev/null +++ b/lineage_instantnoodlep.mk @@ -0,0 +1,40 @@ +# +# Copyright (C) 2018 The LineageOS 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. +# + +# Inherit from those products. Most specific first. +$(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit.mk) +$(call inherit-product, $(SRC_TARGET_DIR)/product/full_base_telephony.mk) + +# Inherit from instantnoodlep device +$(call inherit-product, device/oneplus/instantnoodlep/device.mk) + +# Inherit some common Lineage stuff. +$(call inherit-product, vendor/lineage/config/common_full_phone.mk) + +PRODUCT_NAME := lineage_instantnoodlep +PRODUCT_DEVICE := instantnoodlep +PRODUCT_MANUFACTURER := OnePlus +PRODUCT_BRAND := OnePlus +PRODUCT_MODEL := ONEPLUS IN2023 + +PRODUCT_GMS_CLIENTID_BASE := android-oneplus + +PRODUCT_BUILD_PROP_OVERRIDES += \ + PRODUCT_DEVICE=OnePlus8Pro \ + PRODUCT_NAME=OnePlus8Pro \ + PRIVATE_BUILD_DESC="OnePlus8Pro-user 10 QKQ1.191222.002 2005301332 release-keys" + +BUILD_FINGERPRINT := OnePlus/OnePlus8Pro/OnePlus8Pro:10/QKQ1.191222.002/2005301332:user/release-keys diff --git a/overlay-lineage/frameworks/base/packages/SystemUI/res/values-port/dimens.xml b/overlay-lineage/frameworks/base/packages/SystemUI/res/values-port/dimens.xml new file mode 100644 index 0000000..23e38c5 --- /dev/null +++ b/overlay-lineage/frameworks/base/packages/SystemUI/res/values-port/dimens.xml @@ -0,0 +1,20 @@ + + + + + 725px + diff --git a/overlay-lineage/frameworks/base/packages/SystemUI/res/values/config.xml b/overlay-lineage/frameworks/base/packages/SystemUI/res/values/config.xml new file mode 100644 index 0000000..719a02e --- /dev/null +++ b/overlay-lineage/frameworks/base/packages/SystemUI/res/values/config.xml @@ -0,0 +1,30 @@ + + + + + + + #ccccac + + + 6 + 7 + + diff --git a/overlay/frameworks/base/core/res/res/values/config.xml b/overlay/frameworks/base/core/res/res/values/config.xml new file mode 100644 index 0000000..e409cef --- /dev/null +++ b/overlay/frameworks/base/core/res/res/values/config.xml @@ -0,0 +1,386 @@ + + + + + + + true + + + + 1 + 4 + 12 + 20 + 40 + 65 + 95 + 140 + 200 + 350 + 650 + 1300 + 2000 + 3300 + 6000 + 10000 + + + + + 3.5077 + 6.8394 + 15.2619 + 30.2619 + 40.671 + 52.3019 + 65.2512 + 77.37 + 90.152 + 100.297 + 110.385 + 135.064 + 160.5179 + 195.0267 + 380.2814 + 409.2867 + 427.6287 + + + + + 2.0482 + 2.7841 + 3.79505 + 4.4748 + 5.08 + 6.4233 + 8.0848 + 11.6607 + 13.2347 + 15.0676 + 16.8302 + 18.4261 + 20.3103 + 21.9042 + 23.5456 + 25.2137 + 27.1769 + 28.9571 + 30.5244 + 32.3535 + 34.0867 + 42.366 + 51.1309 + 59.52 + 67.744 + 75.9738 + 84.6332 + 94.1525 + 102.2207 + 110.4878 + 117.0405 + 124.3733 + 130.9928 + 140.4247 + 149.3156 + 157.1995 + 165.3651 + 173.2726 + 181.4272 + 189.1402 + 197.5334 + 205.6301 + 213.9381 + 222.2769 + 230.0891 + 238.6084 + 246.5399 + 255.6544 + 263.6221 + 271.9324 + 279.1449 + 288.5736 + 297.6628 + 306.1899 + 314.4511 + 322.1404 + 330.969 + 338.2251 + 346.2251 + 354.567 + 370.799 + 413.1738 + 415.6397 + 417.264 + 419.264 + 421.264 + 424.646 + 427.6287 + + + + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + 15 + 16 + 17 + 18 + 19 + 20 + 25 + 30 + 35 + 40 + 45 + 50 + 55 + 60 + 65 + 70 + 75 + 80 + 85 + 90 + 95 + 100 + 105 + 110 + 115 + 120 + 125 + 130 + 135 + 140 + 145 + 150 + 155 + 160 + 165 + 170 + 174 + 179 + 184 + 189 + 194 + 199 + 204 + 209 + 214 + 219 + 224 + 229 + 234 + 239 + 244 + 249 + 255 + + + + + 200 + 200 + 200 + 200 + 200 + 200 + 200 + 200 + 250 + 300 + 300 + 300 + 300 + 300 + 300 + 400 + 500 + + + + + 200 + 200 + 200 + 200 + 200 + 200 + 200 + 200 + 300 + 400 + 400 + 400 + 400 + 400 + 400 + 500 + 500 + + + + + 1 + 4 + 12 + 20 + 40 + 65 + 95 + 140 + 200 + 350 + 650 + 1300 + 2000 + 3300 + 6000 + 10000 + + + + 6 + + + 184 + + + 2 + + + 2000 + 4000 + + + 300% + + + 200 + + + + M 0, 0 + H 44 + V 44 + H 0 + L 0, 0 + @dp + @left + + + + 153px + 153px + diff --git a/overlay/frameworks/base/core/res/res/xml/power_profile.xml b/overlay/frameworks/base/core/res/res/xml/power_profile.xml new file mode 100644 index 0000000..d5742da --- /dev/null +++ b/overlay/frameworks/base/core/res/res/xml/power_profile.xml @@ -0,0 +1,151 @@ + + + 0 + 159 + 334 + 132 + 1 + 8 + 157 + 127 + 43 + 62 + 118 + 547 + 103 + 1 + 10 + + 3 + 2 + + + 4 + 3 + 1 + + + 691200 + 787200 + 883200 + 979200 + 1075200 + 1171200 + 1248000 + 1344000 + 1420800 + 1516800 + 1612800 + 1708800 + 1804800 + + + 710400 + 825600 + 940800 + 1056000 + 1171200 + 1286400 + 1382400 + 1478400 + 1574400 + 1670400 + 1766400 + 1862400 + 1958400 + 2054400 + 2150400 + 2246400 + 2342400 + 2419200 + + + 844800 + 960000 + 1075200 + 1190400 + 1305600 + 1401600 + 1516800 + 1632000 + 1747200 + 1862400 + 1977600 + 2073600 + 2169600 + 2265600 + 2361600 + 2457600 + 2553600 + 2649600 + 2745600 + 2841600 + + + 10.70 + 12.43 + 12.95 + 14.29 + 15.31 + 17.12 + 18.29 + 20.06 + 21.82 + 24.55 + 26.61 + 29.12 + 30.90 + + + 50.95 + 60.84 + 70.19 + 79.80 + 89.95 + 102.26 + 110.31 + 121.19 + 133.52 + 146.63 + 162.23 + 184.57 + 203.82 + 224.39 + 246.47 + 271.22 + 296.33 + 320.30 + + + 63.69 + 78.19 + 87.25 + 96.54 + 107.03 + 115.65 + 131.76 + 147.01 + 166.07 + 180.54 + 205.71 + 222.18 + 260.81 + 272.85 + 289.49 + 316.00 + 343.74 + 377.29 + 418.30 + 459.55 + + 6 + 8 + 4510 + + .0002 + .002 + .02 + .2 + 2 + + diff --git a/overlay/frameworks/base/packages/SystemUI/res/values/dimens.xml b/overlay/frameworks/base/packages/SystemUI/res/values/dimens.xml new file mode 100644 index 0000000..ca85f48 --- /dev/null +++ b/overlay/frameworks/base/packages/SystemUI/res/values/dimens.xml @@ -0,0 +1,29 @@ + + + + + @*android:dimen/status_bar_height + + + 32dp + + + 26dp + + 74px + diff --git a/product.prop b/product.prop new file mode 100644 index 0000000..afbf772 --- /dev/null +++ b/product.prop @@ -0,0 +1,2 @@ +# Display +ro.sf.lcd_density=560 diff --git a/setup-makefiles.sh b/setup-makefiles.sh new file mode 100755 index 0000000..704ec24 --- /dev/null +++ b/setup-makefiles.sh @@ -0,0 +1,27 @@ +#!/bin/bash +# +# Copyright (C) 2018-2019 The LineageOS 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 -e + +# Required! +export DEVICE=instantnoodlep +export DEVICE_COMMON=sm8250-common +export VENDOR=oneplus + +export DEVICE_BRINGUP_YEAR=2020 + +"./../../${VENDOR}/${DEVICE_COMMON}/setup-makefiles.sh" "$@"