Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update BoardConfig.mk #4

Open
wants to merge 8 commits into
base: fox_11.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
82 changes: 46 additions & 36 deletions BoardConfig.mk
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@

DEVICE_PATH := device/oneplus/Nord

# For building with minimal manifest
ALLOW_MISSING_DEPENDENCIES := true

# Architecture
TARGET_ARCH := arm64
TARGET_ARCH_VARIANT := armv8-2a
Expand All @@ -38,23 +35,21 @@ TARGET_2ND_CPU_VARIANT := cortex-a75

ENABLE_CPUSETS := true
ENABLE_SCHEDBOOST := true
TARGET_BOARD_SUFFIX := _64
TARGET_USES_64_BIT_BINDER := true

# Platform
TARGET_BOARD_PLATFORM := lito
TARGET_BOARD_PLATFORM_GPU := qcom-adreno620
TARGET_USES_HARDWARE_QCOM_BOOTCTRL := true
QCOM_BOARD_PLATFORMS += lito

# Assert
TARGET_OTA_ASSERT_DEVICE := Nord,avicii

# Build
BUILD_BROKEN_DUP_RULES := true
# fstab
TARGET_RECOVERY_FSTAB := $(DEVICE_PATH)/recovery.fstab

# File systems
BOARD_HAS_LARGE_FILESYSTEM := true
TARGET_USERIMAGES_USE_EXT4 := true
TARGET_USERIMAGES_USE_F2FS := true
BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE := ext4
TARGET_COPY_OUT_VENDOR := vendor

# Partitions
Expand All @@ -76,17 +71,21 @@ BOARD_SUPER_PARTITION_GROUPS := qti_dynamic_partitions
BOARD_QTI_DYNAMIC_PARTITIONS_SIZE := 7511998464
BOARD_QTI_DYNAMIC_PARTITIONS_PARTITION_LIST := \
system \
system_ext \
product \
vendor \
odm

# Partitions (listed in the file) to be wiped under recovery.
TARGET_RECOVERY_WIPE := $(DEVICE_PATH)/recovery.wipe

# A/B
AB_OTA_UPDATER := true
TW_INCLUDE_REPACKTOOLS := true

# A/B updater updatable partitions list. Keep in sync with the partition list
# with "_a" and "_b" variants in the device. Note that the vendor can add more
# more partitions to this list for the bootloader and radio.
# more partitions to this list for the and radio.
AB_OTA_PARTITIONS += \
boot \
system \
Expand Down Expand Up @@ -128,44 +127,55 @@ BOARD_MKBOOTIMG_ARGS += \
BOARD_KERNEL_IMAGE_NAME := Image.gz

# Encryption
PLATFORM_VERSION := 20.1.0
PLATFORM_SECURITY_PATCH := 2099-12-31
VENDOR_SECURITY_PATCH := 2099-12-31
TW_INCLUDE_CRYPTO := true
TW_INCLUDE_CRYPTO_FBE := true
TW_INCLUDE_FBE_METADATA_DECRYPT := true
BOARD_USES_METADATA_PARTITION := true

# QCOM Decryption
BOARD_USES_QCOM_FBE_DECRYPTION := true
PRODUCT_ENFORCE_VINTF_MANIFEST := true

# Recovery
TARGET_RECOVERY_PIXEL_FORMAT := RGBX_8888

# Properties
TARGET_SYSTEM_PROP += \
$(DEVICE_PATH)/system.prop
TARGET_SYSTEM_PROP += $(DEVICE_PATH)/system.prop
TW_INCLUDE_RESETPROP := true

# System as Root
BOARD_SUPPRESS_SECURE_ERASE := true

# Hack: prevent anti rollback
PLATFORM_SECURITY_PATCH := 2099-12-31
VENDOR_SECURITY_PATCH := 2099-12-31
PLATFORM_VERSION := 16.1.0

# Use mke2fs to create ext4 images
TARGET_USES_MKE2FS := true

# TWRP Flags
# Recovery
# TWRP specific build flags
TW_THEME := portrait_hdpi
TW_EXTRA_LANGUAGES := true
TW_SCREEN_BLANK_ON_BOOT := true
TW_INPUT_BLACKLIST := "hbtp_vm"
TW_USE_TOOLBOX := true
TW_USE_LEDS_HAPTICS := true
TW_EXCLUDE_TWRPAPP := true
TW_HAS_EDL_MODE := true
TW_MAX_BRIGHTNESS := 1023
TW_DEFAULT_BRIGHTNESS := 420
TWRP_INCLUDE_LOGCAT := true
TARGET_RECOVERY_QCOM_RTC_FIX := true
TARGET_RECOVERY_PIXEL_FORMAT := RGBX_8888
TW_EXCLUDE_DEFAULT_USB_INIT := true
TW_EXCLUDE_ENCRYPTED_BACKUPS := true
TW_EXCLUDE_TWRPAPP := true
TW_EXTRA_LANGUAGES := true
TW_HAS_EDL_MODE := true
TW_INCLUDE_NTFS_3G := true
TW_INPUT_BLACKLIST := "hbtp_vm"
TW_NO_BIND_SYSTEM := true
TW_NO_EXFAT_FUSE := true
TW_OVERRIDE_SYSTEM_PROPS := \
"ro.build.product;ro.build.fingerprint=ro.system.build.fingerprint;ro.build.version.incremental;ro.product.device=ro.product.system.device;ro.product.model=ro.product.system.model;ro.product.name=ro.product.system.name"
TW_RECOVERY_ADDITIONAL_RELINK_BINARY_FILES += \
$(TARGET_OUT_EXECUTABLES)/ashmemd
TW_RECOVERY_ADDITIONAL_RELINK_LIBRARY_FILES += \
$(TARGET_OUT_SHARED_LIBRARIES)/[email protected] \
$(TARGET_OUT_SHARED_LIBRARIES)/ashmemd_aidl_interface-cpp.so \
$(TARGET_OUT_SHARED_LIBRARIES)/libashmemd_client.so \
$(TARGET_OUT_SHARED_LIBRARIES)/libcap.so \
$(TARGET_OUT_SHARED_LIBRARIES)/libion.so \
$(TARGET_OUT_SHARED_LIBRARIES)/libpcrecpp.so \
$(TARGET_OUT_SHARED_LIBRARIES)/libxml2.so

# TWRP Debug Flags
TARGET_USES_LOGD := true
#TWRP_EVENT_LOGGING := true
TWRP_INCLUDE_LOGCAT := true
TARGET_RECOVERY_DEVICE_MODULES += debuggerd
TW_RECOVERY_ADDITIONAL_RELINK_FILES += $(TARGET_OUT_EXECUTABLES)/debuggerd

2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# device_oneplus_Nord
OrangeFox Recovery for OnePlus Nord (new)
9 changes: 4 additions & 5 deletions bootctrl/Android.bp
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,8 @@
// limitations under the License.
//

cc_library_shared {
name: "[email protected]",
stem: "[email protected]",
defaults: ["[email protected]_defaults"],
static_libs: ["libgptutils.lito"],
cc_library {
name: "bootctrl.msmnile",
defaults: ["bootctrl_hal_defaults"],
static_libs: ["libgptutils"],
}
46 changes: 46 additions & 0 deletions recovery.fstab.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Copyright (c) 2017, The Linux Foundation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following
# disclaimer in the documentation and/or other materials provided
# with the distribution.
# * Neither the name of The Linux Foundation nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

# A/B recovery.fstab variant.

#device mount point fstype [device2] [length=]

# Dynamic Partitions
system /system ext4 ro,barrier=1,discard wait,slotselect,avb=vbmeta_system,logical,first_stage_mount
system_ext /system_ext ext4 ro,barrier=1,discard wait,slotselect,avb=vbmeta_system,logical,first_stage_mount
vendor /vendor ext4 ro,barrier=1,discard wait,slotselect,avb,logical,first_stage_mount
odm /odm ext4 ro,barrier=1,discard wait,slotselect,avb,logical,first_stage_mount
product /product ext4 ro,barrier=1,discard wait,slotselect,avb=vbmeta_system,logical,first_stage_mount

# Physical Partitions
/dev/block/by-name/metadata /metadata ext4 noatime,nosuid,nodev,discard,sync wait,check,formattable,wrappedkey,first_stage_mount
/dev/block/bootdevice/by-name/userdata /data f2fs noatime,nosuid,nodev,discard,reserve_root=32768,resgid=1065,fsync_mode=nobarrier,inlinecrypt latemount,wait,check,formattable,quota,reservedsize=512M,fileencryption=ice,wrappedkey,keydirectory=/metadata/vold/metadata_encryption,sysfs_path=/sys/devices/platform/soc/1d84000.ufshc,checkpoint=fs
/dev/block/mmcblk1p1 /sdcard vfat nosuid,nodev wait
/dev/block/bootdevice/by-name/boot /boot emmc defaults defaults
/dev/block/bootdevice/by-name/op2 /mnt/vendor/op2 ext4 noatime,nosuid,nodev,barrier=1,data=ordered wait,check
/dev/block/bootdevice/by-name/persist /mnt/vendor/persist ext4 noatime,nosuid,nodev,barrier=1 wait
/dev/block/bootdevice/by-name/misc /misc emmc defaults defaults
10 changes: 10 additions & 0 deletions recovery.wipe
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# All the partitions to be wiped (in order) under recovery.
/dev/block/bootdevice/by-name/system_a
/dev/block/bootdevice/by-name/system_b
/dev/block/bootdevice/by-name/vendor_a
/dev/block/bootdevice/by-name/vendor_b
/dev/block/bootdevice/by-name/userdata
# Wipe the boot partitions last so that all partitions will be wiped
# correctly even if the wiping process gets interrupted by a force boot.
/dev/block/bootdevice/by-name/boot_a
/dev/block/bootdevice/by-name/boot_b
23 changes: 23 additions & 0 deletions security/oneplus.x509.pem
Original file line number Diff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zq
JoiHYaDE86lwvVgufWS0J2sgmL2HUo59/r+xOAP3S9tTDAoMvpRV7JloHs0w0LeB
U34X24cpdD9rBqbidJECzG3iJSXr8G65Tugq1yQjZYr2mF8F96nbQkiSrHYKN8FY
aVLpxaowyrVu02VBWraRHDOHdiDyj3yHd5f4HR6ALqG5jpA7jlUd+h8BswmQzI8X
M/Dpgjy8g2ZEljCJKy+rsNEJpKhv783TV9aWBNDdrKqfp54a6j3Z1dgYwXJ75m+l
J9klsKhBTKKsNeRhR7A0w3Pejuv61//MDYiqk1CpEIF+akIquJvyRLc=
-----END CERTIFICATE-----
23 changes: 23 additions & 0 deletions security/pixelexperience.x509.pem
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
-----BEGIN CERTIFICATE-----
MIID5TCCAs2gAwIBAgIJAIq+Thrh2EfxMA0GCSqGSIb3DQEBBQUAMIGIMQswCQYD
VQQGEwJDTjESMBAGA1UECAwJR3Vhbmdkb25nMREwDwYDVQQHDAhTaGVuemhlbjEQ
MA4GA1UECgwHT25lUGx1czELMAkGA1UECwwCU1cxEDAOBgNVBAMMB09uZVBsdXMx
ITAfBgkqhkiG9w0BCQEWEm9uZXBsdXNAb25lcGx1cy5jbjAeFw0xNTA1MDcwNzI1
MTlaFw00MjA5MjIwNzI1MTlaMIGIMQswCQYDVQQGEwJDTjESMBAGA1UECAwJR3Vh
bmdkb25nMREwDwYDVQQHDAhTaGVuemhlbjEQMA4GA1UECgwHT25lUGx1czELMAkG
A1UECwwCU1cxEDAOBgNVBAMMB09uZVBsdXMxITAfBgkqhkiG9w0BCQEWEm9uZXBs
dXNAb25lcGx1cy5jbjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKyN
lW3YKqrva+gVWu998t7Th8ypuw4ATKp/vvhaeNFMPOf0Umy4tSDUKtQEz4BkX5ez
4jRiACwSpk4YmZJSaKdpRjvfABSGvTT+qlNi1T0CmxnXVH6sZP1G2uDQBcIOqP1c
//7U/LREC/+nSwu+RrONJ5DtFkN9PNaMS77gEW9OmiLtqFMPRYRl8LU8YNpVxPV8
eH+89KeQ9kLQTa6khCq4plR2JYU2sOdWMOcUV9epO8wZESNodA2XhD0aXroxazR7
BaucnTUXOvKyBM8+m3N5wSBJ/MnJDoJnCWj0TMNDT9BSmfa9vtsEn3kygyLZwCNY
GjseuIPkwnKPQ5+prsECAwEAAaNQME4wHQYDVR0OBBYEFFRh4rGpFeFNnw+S3UgB
EzGoSa5kMB8GA1UdIwQYMBaAFFRh4rGpFeFNnw+S3UgBEzGoSa5kMAwGA1UdEwQF
MAMBAf8wDQYJKoZIhvcNAQEFBQADggEBACWtSVreqY47Zdo+1LBY2QriRN3iSYzq
JoiHYaDE86lwvVgufWS0J2sgmL2HUo59/r+xOAP3S9tTDAoMvpRV7JloHs0w0LeB
U34X24cpdD9rBqbidJECzG3iJSXr8G65Tugq1yQjZYr2mF8F96nbQkiSrHYKN8FY
aVLpxaowyrVu02VBWraRHDOHdiDyj3yHd5f4HR6ALqG5jpA7jlUd+h8BswmQzI8X
M/Dpgjy8g2ZEljCJKy+rsNEJpKhv783TV9aWBNDdrKqfp54a6j3Z1dgYwXJ75m+l
J9klsKhBTKKsNeRhR7A0w3Pejuv61//MDYiqk1CpEIF+akIquJvyRLc=
-----END CERTIFICATE-----
28 changes: 28 additions & 0 deletions twrp.fstab.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# mount point fstype device device2 flags

# Dynamic Partitions
system /system ext4 slotselect;logical
vendor /vendor ext4 slotselect;display="Vendor";logical
product /product ext4 slotselect;display="Product";logical
odm /odm ext4 slotselect;display="Odm";logical

# Physical Partitions
/boot emmc /dev/block/bootdevice/by-name/boot flags=slotselect
/recovery emmc /dev/block/bootdevice/by-name/recovery flags=slotselect;flags=backup=1
/data f2fs /dev/block/bootdevice/by-name/userdata flags=fileencryption=ice:aes-256-cts;wrappedkey;keydirectory=/metadata/vold/metadata_encryption
/storage f2fs /data/media/0 flags=display="Internal Storage";usermrf;backup=1;fsflags="bind";removable
/metadata ext4 /dev/block/bootdevice/by-name/metadata
/firmware vfat /dev/block/bootdevice/by-name/modem flags=slotselect;display="Firmware";mounttodecrypt;fsflags=ro
/firmware_image emmc /dev/block/bootdevice/by-name/modem flags=display="Firmware";backup=1;flashimg=1
/misc emmc /dev/block/bootdevice/by-name/misc
/modem emmc /dev/block/bootdevice/by-name/modem flags=slotselect;backup=1;display="Modem"
/bluetooth emmc /dev/block/bootdevice/by-name/bluetooth flags=slotselect;backup=1;subpartitionof=/modem
/dsp emmc /dev/block/bootdevice/by-name/dsp flags=slotselect;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
/op2 ext4 /dev/block/bootdevice/by-name/op2

# Removable storage
/usb_otg vfat /dev/block/sdg1 /dev/block/sdg flags=fsflags=utf8;display="USB-Storage";storage;wipeingui;removable
2 changes: 1 addition & 1 deletion vendorsetup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ if [ "$1" = "$FDEVICE" -o "$FOX_BUILD_DEVICE" = "$FDEVICE" ]; then
export OF_DISABLE_MIUI_OTA_BY_DEFAULT=0

# R11.1 Settings
export FOX_VERSION="R11.1_4_001"
export FOX_VERSION="R11.1_4"
export OF_MAINTAINER="Sushrut1101"
export OF_MAINTAINER_AVATAR="misc/Sushrut1101.png"
export FOX_BUILD_TYPE="Testing"
Expand Down