From f2ae79aa41ee791d3705b66ea7f993ec490851ab Mon Sep 17 00:00:00 2001 From: hpnightowl Date: Mon, 27 Jul 2020 18:38:17 +0530 Subject: [PATCH] RMX1911: changes for A10 firmware *cleaned bc.mk *added some missing props *backup system and vendor changes *updated blobs for a10 --- .circleci/config.yml | 10 +- Android.mk | 2 +- BoardConfig.mk | 243 +++++++++++++++++++++---------------------- omni_RMX1911.mk | 75 ++++++------- recovery.fstab | 65 ++++++------ system.prop | 2 + 6 files changed, 202 insertions(+), 195 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 6f82d42..fa7e97b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -14,7 +14,11 @@ jobs: BUILD_LUNCH: 'omni_RMX1911-eng' PB_OFFICIAL: 'true' CHANGELOG: | - - initial build + - *cleaned bc.mk + - *added some missing props + - *backup system and vendor changes + - *updated blobs for a10 + - *change brand name working_directory: /home/builder/pitchblack steps: - run: @@ -33,5 +37,5 @@ workflows: - build: filters: branches: - only: 'pbrp' - context: org-global \ No newline at end of file + only: 'android-9.0' + context: org-global diff --git a/Android.mk b/Android.mk index ede1e71..7a262fc 100644 --- a/Android.mk +++ b/Android.mk @@ -27,7 +27,7 @@ LOCAL_PATH := $(call my-dir) ifeq ($(TARGET_DEVICE),RMX1911) -include $(call all-subdir-makefiles,$(LOCAL_PATH)) +include $(call all-makefiles-under,$(LOCAL_PATH)) include $(CLEAR_VARS) diff --git a/BoardConfig.mk b/BoardConfig.mk index 414c8c5..3e28172 100644 --- a/BoardConfig.mk +++ b/BoardConfig.mk @@ -1,124 +1,119 @@ -# -# Copyright (C) 2019 The TwrpBuilder 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. -# - -DEVICE_PATH := device/realme/RMX1911 - -# Architecture -TARGET_ARCH := arm64 -TARGET_ARCH_VARIANT := armv8-a -TARGET_CPU_ABI := arm64-v8a -TARGET_CPU_ABI2 := -TARGET_CPU_VARIANT := kryo300 - -TARGET_2ND_ARCH := arm -TARGET_2ND_ARCH_VARIANT := armv8-a -TARGET_2ND_CPU_ABI := armeabi-v7a -TARGET_2ND_CPU_ABI2 := armeabi -TARGET_2ND_CPU_VARIANT := cortex-a73 -TARGET_USES_64_BIT_BINDER := true - -ENABLE_CPUSETS := true -ENABLE_SCHEDBOOST := true - -# Bootloader -TARGET_BOOTLOADER_BOARD_NAME := trinket -TARGET_NO_BOOTLOADER := true -TARGET_USES_UEFI := true - -# Platform -TARGET_BOARD_PLATFORM := trinket -TARGET_BOARD_PLATFORM_GPU := qcom-adreno610 - -# Init -TARGET_PLATFORM_DEVICE_BASE := /devices/soc.0/ - -# Kernel -BOARD_KERNEL_CMDLINE := console=ttyMSM0,115200n8 androidboot.hardware=qcom androidboot.console=ttyMSM0 androidboot.memcg=1 lpm_levels.sleep_disabled=1 video=vfb:640x400,bpp=32,memsize=3072000 msm_rtb.filter=0x237 service_locator.enable=1 swiotlb=1 androidboot.usbcontroller=a600000.dwc3 firmware_class.path=/vendor/firmware_mnt/image earlycon=msm_geni_serial,0x880000 loop.max_part=7 cgroup.memory=nokmem,nosocket androidboot.selinux=permissive -BOARD_KERNEL_BASE := 0x00000000 -BOARD_KERNEL_PAGESIZE := 4096 -BOARD_KERNEL_TAGS_OFFSET := 0x00000100 -BOARD_RAMDISK_OFFSET := 0x01000000 -BOARD_KERNEL_IMAGE_NAME := Image.gz-dtb -TARGET_KERNEL_ARCH := arm64 -TARGET_KERNEL_HEADER_ARCH := arm64 -TARGET_PREBUILT_KERNEL := $(DEVICE_PATH)/prebuilt/Image.gz-dtb -BOARD_PREBUILT_DTBOIMAGE := $(DEVICE_PATH)/prebuilt/dtbo.img -BOARD_INCLUDE_RECOVERY_DTBO := true - -# Avb -BOARD_AVB_ENABLE := true -BOARD_AVB_ROLLBACK_INDEX := $(PLATFORM_SECURITY_PATCH_TIMESTAMP) - -# Assert -TARGET_OTA_ASSERT_DEVICE := RMX1911 - -# Partitions -BOARD_FLASH_BLOCK_SIZE := 262144 -BOARD_BOOTIMAGE_PARTITION_SIZE := 67108864 -BOARD_RECOVERYIMAGE_PARTITION_SIZE := 67108864 -BOARD_SYSTEMIMAGE_PARTITION_SIZE := 5114429440 -BOARD_SYSTEMIMAGE_PARTITION_TYPE := ext4 -BOARD_USERDATAIMAGE_PARTITION_SIZE := 12884901888 -BOARD_USERDATAIMAGE_FILE_SYSTEM_TYPE := ext4 -BOARD_VENDORIMAGE_PARTITION_SIZE := 1452277760 -BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE := ext4 - -# System as root -BOARD_BUILD_SYSTEM_ROOT_IMAGE := true -BOARD_ROOT_EXTRA_FOLDERS := bluetooth dsp firmware persist -BOARD_SUPPRESS_SECURE_ERASE := true - -# File systems -TARGET_USERIMAGES_USE_EXT4 := true -TARGET_USERIMAGES_USE_F2FS := true - -# Workaround for error copying vendor files to recovery ramdisk -BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE := ext4 -TARGET_COPY_OUT_VENDOR := vendor - -# Recovery -BOARD_HAS_LARGE_FILESYSTEM := true -TARGET_RECOVERY_PIXEL_FORMAT := "RGBX_8888" - -# Crypto -TW_INCLUDE_CRYPTO := true -TW_INCLUDE_FBE := true - -# TWRP specific build flags -TW_THEME := portrait_hdpi -RECOVERY_SDCARD_ON_DATA := true -TARGET_RECOVERY_QCOM_RTC_FIX := true -TW_BRIGHTNESS_PATH := "/sys/class/backlight/panel0-backlight/brightness" -TW_EXCLUDE_DEFAULT_USB_INIT := true -TW_EXTRA_LANGUAGES := true -TW_INCLUDE_NTFS_3G := true -TW_USE_TOOLBOX := true -TW_NO_LEGACY_PROPS := true -TW_INPUT_BLACKLIST := "hbtp_vm" -TW_MAX_BRIGHTNESS := 2047 -TW_DEFAULT_BRIGHTNESS := 1200 -TWRP_INCLUDE_LOGCAT := true -TW_EXCLUDE_TWRPAPP := true -TARGET_USES_LOGD := true -TARGET_USES_MKE2FS := true -TW_OZIP_DECRYPT_KEY := "1C4A11A3A22513AE541B53BB31513121" -TW_SKIP_COMPATIBILITY_CHECK := true - -# Hack: prevent anti rollback -PLATFORM_SECURITY_PATCH := 2099-12-31 -PLATFORM_VERSION := 16.1.0 - -TARGET_SYSTEM_PROP := $(DEVICE_PATH)/system.prop +# +# Copyright (C) 2019 The TwrpBuilder 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. +# + +DEVICE_PATH := device/realme/RMX1911 + +# Architecture +TARGET_ARCH := arm64 +TARGET_ARCH_VARIANT := armv8-a +TARGET_CPU_ABI := arm64-v8a +TARGET_CPU_ABI2 := +TARGET_CPU_VARIANT := kryo + +TARGET_2ND_ARCH := arm +TARGET_2ND_ARCH_VARIANT := armv8-a +TARGET_2ND_CPU_ABI := armeabi-v7a +TARGET_2ND_CPU_ABI2 := armeabi +TARGET_2ND_CPU_VARIANT := cortex-a73 +TARGET_USES_64_BIT_BINDER := true + +ENABLE_CPUSETS := true +ENABLE_SCHEDBOOST := true + +# Bootloader +TARGET_BOOTLOADER_BOARD_NAME := sm6125 +TARGET_NO_BOOTLOADER := true +TARGET_USES_UEFI := true + +# Platform +TARGET_BOARD_PLATFORM := sm6125 +TARGET_BOARD_PLATFORM_GPU := qcom-adreno610 + +# Kernel +BOARD_KERNEL_CMDLINE := console=ttyMSM0,115200n8 androidboot.hardware=qcom androidboot.console=ttyMSM0 androidboot.memcg=1 lpm_levels.sleep_disabled=1 video=vfb:640x400,bpp=32,memsize=3072000 msm_rtb.filter=0x237 service_locator.enable=1 swiotlb=1 androidboot.usbcontroller=a600000.dwc3 firmware_class.path=/vendor/firmware_mnt/image earlycon=msm_geni_serial,0x880000 loop.max_part=7 cgroup.memory=nokmem,nosocket androidboot.selinux=permissive +BOARD_KERNEL_BASE := 0x00000000 +BOARD_KERNEL_PAGESIZE := 4096 +BOARD_KERNEL_TAGS_OFFSET := 0x00000100 +BOARD_RAMDISK_OFFSET := 0x01000000 +BOARD_KERNEL_IMAGE_NAME := Image.gz-dtb +TARGET_KERNEL_ARCH := arm64 +TARGET_KERNEL_HEADER_ARCH := arm64 +TARGET_PREBUILT_KERNEL := $(DEVICE_PATH)/prebuilt/Image.gz-dtb +BOARD_PREBUILT_DTBOIMAGE := $(DEVICE_PATH)/prebuilt/dtbo.img +BOARD_INCLUDE_RECOVERY_DTBO := true + +# Assert +TARGET_OTA_ASSERT_DEVICE := RMX1911 + +# Avb +BOARD_AVB_ENABLE := true +BOARD_AVB_ROLLBACK_INDEX := $(PLATFORM_SECURITY_PATCH_TIMESTAMP) + +# Partitions +BOARD_FLASH_BLOCK_SIZE := 262144 +BOARD_BOOTIMAGE_PARTITION_SIZE := 67108864 +BOARD_RECOVERYIMAGE_PARTITION_SIZE := 67108864 +BOARD_SYSTEMIMAGE_PARTITION_SIZE := 5114429440 +BOARD_SYSTEMIMAGE_PARTITION_TYPE := ext4 +BOARD_USERDATAIMAGE_PARTITION_SIZE := 12884901888 +BOARD_USERDATAIMAGE_FILE_SYSTEM_TYPE := ext4 +BOARD_VENDORIMAGE_PARTITION_SIZE := 1452277760 +BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE := ext4 + +# System as root +BOARD_BUILD_SYSTEM_ROOT_IMAGE := true +BOARD_ROOT_EXTRA_FOLDERS := bluetooth dsp firmware persist +BOARD_SUPPRESS_SECURE_ERASE := true + +# File systems +TARGET_USERIMAGES_USE_EXT4 := true +TARGET_USERIMAGES_USE_F2FS := true + +# Workaround for error copying vendor files to recovery ramdisk +BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE := ext4 +TARGET_COPY_OUT_VENDOR := vendor + +# Recovery +BOARD_HAS_LARGE_FILESYSTEM := true +TARGET_RECOVERY_PIXEL_FORMAT := "BGRA_8888" + +# Crypto +TW_INCLUDE_CRYPTO := true +TW_INCLUDE_FBE := true + +# TWRP specific build flags +TW_THEME := portrait_hdpi +RECOVERY_SDCARD_ON_DATA := true +TARGET_RECOVERY_QCOM_RTC_FIX := true +TW_EXCLUDE_DEFAULT_USB_INIT := true +TW_EXTRA_LANGUAGES := true +TW_INCLUDE_NTFS_3G := true +TW_USE_TOOLBOX := true +TW_INPUT_BLACKLIST := "hbtp_vm" +TW_BRIGHTNESS_PATH := "/sys/class/backlight/panel0-backlight/brightness" +TW_MAX_BRIGHTNESS := 2047 +TW_DEFAULT_BRIGHTNESS := 1200 +TW_NO_SCREEN_BLANK := true +TWRP_INCLUDE_LOGCAT := true +TARGET_USES_LOGD := true +TARGET_USES_MKE2FS := true +TW_EXCLUDE_TWRPAPP := true +TW_OZIP_DECRYPT_KEY := "1C4A11A3A22513AE541B53BB31513121" +TW_SKIP_COMPATIBILITY_CHECK := true + +# Hack: prevent anti rollback +PLATFORM_SECURITY_PATCH := 2099-12-31 +PLATFORM_VERSION := 16.1.0 diff --git a/omni_RMX1911.mk b/omni_RMX1911.mk index c5d7f89..77cab43 100644 --- a/omni_RMX1911.mk +++ b/omni_RMX1911.mk @@ -1,35 +1,40 @@ -# -# Copyright (C) 2019 The TwrpBuilder 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. -# - -# Release name -PRODUCT_RELEASE_NAME := RMX1911 - -$(call inherit-product, build/target/product/embedded.mk) - -# Inherit from our custom product configuration -$(call inherit-product, vendor/pb/config/common.mk) - -## Device identifier. This must come after all inclusions -PRODUCT_DEVICE := RMX1911 -PRODUCT_NAME := omni_RMX1911 -PRODUCT_BRAND := realme -PRODUCT_MODEL := Realme 5 -PRODUCT_MANUFACTURER := realme - -PRODUCT_BUILD_PROP_OVERRIDES += \ - PRODUCT_NAME=RMX1911 \ - BUILD_PRODUCT=RMX1911 \ - TARGET_DEVICE=RMX1911 +# +# Copyright (C) 2019 The TwrpBuilder 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. +# + +# Release name +PRODUCT_RELEASE_NAME := RMX1911 + +$(call inherit-product, build/target/product/embedded.mk) + +# Inherit from our custom product configuration +$(call inherit-product, vendor/pb/config/common.mk) + +## Device identifier. This must come after all inclusions +PRODUCT_DEVICE := RMX1911 +PRODUCT_NAME := omni_RMX1911 +PRODUCT_BRAND := realme +PRODUCT_MODEL := Realme 5 +PRODUCT_MANUFACTURER := realme + +PRODUCT_BUILD_PROP_OVERRIDES += \ + PRODUCT_NAME=RMX1911 \ + BUILD_PRODUCT=RMX1911 \ + TARGET_DEVICE=RMX1911 + +# HACK: Set vendor patch level +PRODUCT_PROPERTY_OVERRIDES += \ + ro.vendor.build.security_patch=2099-12-31 \ + ro.separate.soft="19631" \ No newline at end of file diff --git a/recovery.fstab b/recovery.fstab index 38169b1..d30da06 100644 --- a/recovery.fstab +++ b/recovery.fstab @@ -1,32 +1,33 @@ -# Android fstab file. -# The filesystem that contains the filesystem checker binary (typically /system) cannot -# specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK - -# mount point fstype device device2 flags -/boot emmc /dev/block/bootdevice/by-name/boot -/dtbo emmc /dev/block/bootdevice/by-name/dtbo flags=backup=1;display="Dtbo";flashimg=1 -/cache ext4 /dev/block/bootdevice/by-name/cache -/recovery emmc /dev/block/bootdevice/by-name/recovery flags=backup=1 -/system_root ext4 /dev/block/bootdevice/by-name/system flags=display="System";backup=1 -/vendor ext4 /dev/block/bootdevice/by-name/vendor flags=display="Vendor";backup=1 - -/system_image emmc /dev/block/bootdevice/by-name/system -/vendor_image emmc /dev/block/bootdevice/by-name/vendor - -/data f2fs /dev/block/bootdevice/by-name/userdata flags=encryptable=footer;length=-16384;fileencryption=ice:aes-256-cts:aes-256-heh;wrappedkey -/firmware vfat /dev/block/bootdevice/by-name/modem flags=display="Firmware";mounttodecrypt -/misc emmc /dev/block/bootdevice/by-name/misc -/modem emmc /dev/block/bootdevice/by-name/modem flags=backup=1;display="Modem" -/bluetooth emmc /dev/block/bootdevice/by-name/bluetooth flags=backup=1;subpartitionof=/modem -/dsp emmc /dev/block/bootdevice/by-name/dsp flags=backup=1;subpartitionof=/modem -/efs1 emmc /dev/block/bootdevice/by-name/modemst1 flags=backup=1;display=EFS -/efs2 emmc /dev/block/bootdevice/by-name/modemst2 flags=backup=1;subpartitionof=/efs1 -/efsc emmc /dev/block/bootdevice/by-name/fsc flags=backup=1;subpartitionof=/efs1 -/efsg emmc /dev/block/bootdevice/by-name/fsg flags=backup=1;subpartitionof=/efs1 -/persist ext4 /dev/block/bootdevice/by-name/persist flags=display="Persist" -/persist_image emmc /dev/block/bootdevice/by-name/persist flags=display="Persist";flashimg=1 -/vbmeta emmc /dev/block/bootdevice/by-name/vbmeta flags=display="Vbmeta";flashimg=1;backup=1 - -# Removable storage -/usb_otg vfat /dev/block/sda1 /dev/block/sda flags=fsflags=utf8;display="USB-OTG";storage;wipeingui;removable -/external_sd auto /dev/block/mmcblk1p1 flags=fsflags=utf8;display="SDcard";storage;wipeingui;removable +# Android fstab file. +# The filesystem that contains the filesystem checker binary (typically /system) cannot +# specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK + +# mount point fstype device device2 flags +/boot emmc /dev/block/bootdevice/by-name/boot +/dtbo emmc /dev/block/bootdevice/by-name/dtbo flags=backup=1;display="Dtbo";flashimg=1 +/cache ext4 /dev/block/bootdevice/by-name/cache +/recovery emmc /dev/block/bootdevice/by-name/recovery flags=backup=1 +/system_root ext4 /dev/block/bootdevice/by-name/system flags=display="System";backup=0 +/vendor ext4 /dev/block/bootdevice/by-name/vendor flags=display="Vendor";backup=0;wipeingui + +/system_image emmc /dev/block/bootdevice/by-name/system +/vendor_image emmc /dev/block/bootdevice/by-name/vendor + +#/metadata ext4 /dev/block/bootdevice/by-name/metadata +/data ext4 /dev/block/bootdevice/by-name/userdata flags=fileencryption=ice:aes-256-cts +/firmware vfat /dev/block/bootdevice/by-name/modem flags=display="Firmware";mounttodecrypt +/misc emmc /dev/block/bootdevice/by-name/misc +/modem emmc /dev/block/bootdevice/by-name/modem flags=backup=1;display="Modem" +/bluetooth emmc /dev/block/bootdevice/by-name/bluetooth flags=backup=1;subpartitionof=/modem +/dsp emmc /dev/block/bootdevice/by-name/dsp flags=backup=1;subpartitionof=/modem +/efs1 emmc /dev/block/bootdevice/by-name/modemst1 flags=backup=1;display=EFS +/efs2 emmc /dev/block/bootdevice/by-name/modemst2 flags=backup=1;subpartitionof=/efs1 +/efsc emmc /dev/block/bootdevice/by-name/fsc flags=backup=1;subpartitionof=/efs1 +/efsg emmc /dev/block/bootdevice/by-name/fsg flags=backup=1;subpartitionof=/efs1 +/persist ext4 /dev/block/bootdevice/by-name/persist flags=display="Persist" +/persist_image emmc /dev/block/bootdevice/by-name/persist flags=display="Persist";flashimg=1 +/vbmeta emmc /dev/block/bootdevice/by-name/vbmeta flags=display="Vbmeta";flashimg=1;backup=1 + +# Removable storage +/usb_otg vfat /dev/block/sda1 /dev/block/sda flags=fsflags=utf8;display="External-Device";storage;wipeingui;removable +/external_sd auto /dev/block/mmcblk1p1 flags=display="SD-Card";storage;wipeingui;removable diff --git a/system.prop b/system.prop index 66340e6..2fb7db4 100644 --- a/system.prop +++ b/system.prop @@ -1,5 +1,7 @@ sys.usb.controller=a600000.dwc3 sys.usb.rndis.func.name=rndis_bam sys.usb.rmnet.func.name=rmnet_bam +persist.sys.isUsbOtgEnabled=true +vendor.gatekeeper.disable_spu=true ro.boot.avb_version=1.0 ro.boot.vbmeta.avb_version=1.0