R60 修改分区
diff
device/mediatek/mt6771
project device/mediatek/mt6771/
diff --git a/BoardConfig.mk b/BoardConfig.mk
index 092ddc7..ad2cfc0 100755
--- a/BoardConfig.mk
+++ b/BoardConfig.mk
@@ -163,9 +163,9 @@ TARGET_COPY_OUT_VENDOR := vendor
BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE := ext4
TARGET_RECOVERY_FSTAB := $(MTK_PTGEN_PRODUCT_OUT)/$(TARGET_COPY_OUT_VENDOR)/etc/fstab.$(MTK_PLATFORM_DIR)
-# Enable product partition
-TARGET_COPY_OUT_PRODUCT := product
-BOARD_PRODUCTIMAGE_FILE_SYSTEM_TYPE := ext4
+# # Enable product partition
+# TARGET_COPY_OUT_PRODUCT := product
+# BOARD_PRODUCTIMAGE_FILE_SYSTEM_TYPE := ext4
# add product to vbmeta_system partitions
ifeq ($(PRODUCT_USE_DYNAMIC_PARTITIONS), true)
device/mediateksample/R60
project device/mediateksample/R60/
diff --git a/BoardConfig.mk b/BoardConfig.mk
index 9d917c2..5650dc7 100755
--- a/BoardConfig.mk
+++ b/BoardConfig.mk
@@ -24,7 +24,7 @@ endif
# UDC (Mandatory since Android Q)
BOARD_ROOT_EXTRA_FOLDERS += metadata
-BOARD_USES_METADATA_PARTITION := true
+BOARD_USES_METADATA_PARTITION := no
##tangjinxing add begin
#4.5G
diff --git a/ProjectConfig.mk b/ProjectConfig.mk
index 551aea3..7932dbe 100755
--- a/ProjectConfig.mk
+++ b/ProjectConfig.mk
@@ -225,7 +225,7 @@ MTK_EMMC_SUPPORT_OTP_FOR_CUSTOMER = no
MTK_ENABLE_DIVX_DECODER = yes
MTK_ENABLE_NATIVE_ASAN = no
MTK_ENCRYPTION_DEFAULT_OFF = no
-MTK_ENCRYPTION_FDE_TO_FBE = no
+MTK_ENCRYPTION_FDE_TO_FBE = yes
MTK_ENCRYPTION_TYPE_FILE = yes
MTK_ENGINEERMODE_APP =yes
MTK_ETWS_SUPPORT = yes
@@ -333,7 +333,7 @@ MTK_OGM_PLAYBACK_SUPPORT = no
MTK_OMACP_SUPPORT = yes
MTK_PARTITION_TABLE_PLAIN_TEXT = no
MTK_PERMISSION_CONTROL = yes
-MTK_PERSIST_PARTITION_SUPPORT = no
+MTK_PERSIST_PARTITION_SUPPORT = yes
MTK_PLATFORM = MT6771
MTK_PLATFORM_OPTIMIZE = yes
MTK_POST_PROCESS_FRAMEWORK_SUPPORT = no
@@ -503,7 +503,7 @@ MTK_TELEPHONY_ADD_ON_POLICY = 0
MTK_DMC_SUPPORT = no
MTK_RESERVE_ENG_PARTITIONS = no
KEYMASTER_VERSION = 4.0
-MTK_DYNAMIC_PARTITION_SUPPORT = yes
+MTK_DYNAMIC_PARTITION_SUPPORT = no
MTK_BACKLIGHT_SMOOTH_SUPPORT = yes
MTK_CAM_LAZY_HAL = no
MTK_PERF_PLUS = no
diff --git a/device.mk b/device.mk
index 99a9b30..8c81fdc 100755
--- a/device.mk
+++ b/device.mk
@@ -1,6 +1,8 @@
# PRODUCT_COPY_FILES += $(LOCAL_PATH)/egl.cfg:$(TARGET_COPY_OUT_VENDOR)/lib/egl/egl.cfg:mtk
# PRODUCT_COPY_FILES += $(LOCAL_PATH)/ueventd.mt6771.rc:root/ueventd.mt6771.rc
+MAIN_VBMETA_IN_BOOT := yes
+
PRODUCT_COPY_FILES += $(LOCAL_PATH)/factory_init.project.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/factory_init.project.rc
PRODUCT_COPY_FILES += $(LOCAL_PATH)/init.project.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.project.rc
PRODUCT_COPY_FILES += $(LOCAL_PATH)/meta_init.project.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/meta_init.project.rc
vendor/mediatek
project vendor/mediatek/
diff --git a/proprietary/hardware/fstab/mt6771/fstab.in b/proprietary/hardware/fstab/mt6771/fstab.in
index b62d904dd..13205c4ec 100644
--- a/proprietary/hardware/fstab/mt6771/fstab.in
+++ b/proprietary/hardware/fstab/mt6771/fstab.in
@@ -81,8 +81,8 @@
#endif
#ifdef __BOARD_AVB_ENABLE
- #define FSMGR_FLAG_SYSTEM wait,FLAG_SLOT_SELECT,avb=VBMETA_DEV,FLAG_LOGICAL,first_stage_mount,avb_keys=/avb/q-gsi.avbpubkey:/avb/r-gsi.avbpubkey:/avb/s-gsi.avbpubkey
- #define FSMGR_FLAG_VENDOR wait,FLAG_SLOT_SELECT,avb,FLAG_LOGICAL,first_stage_mount
+ #define FSMGR_FLAG_SYSTEM wait,FLAG_SLOT_SELECT,avb=VBMETA_DEV,FLAG_LOGICAL,first_stage_mount,avb_keys=/avb/q-gsi.avbpubkey:/avb/r-gsi.avbpubkey:/avb/s-gsi.avbpubkey,discard
+ #define FSMGR_FLAG_VENDOR wait,FLAG_SLOT_SELECT,avb,FLAG_LOGICAL,first_stage_mount,discard
#else
#define FSMGR_FLAG_SYSTEM wait,FLAG_SLOT_SELECT,first_stage_mount
#define FSMGR_FLAG_VENDOR FSMGR_FLAG_SYSTEM
@@ -100,14 +100,14 @@
#define FS_FLAG_DISCARD noatime,nosuid,nodev,noauto_da_alloc,discard
#define FS_FLAG_NO_DISCARD noatime,nosuid,nodev,noauto_da_alloc
-#define FS_FLAG_COMMIT noatime,nosuid,nodev,noauto_da_alloc,commit=1,nodelalloc
+#define FS_FLAG_COMMIT noatime,nosuid,nodev,noauto_da_alloc,commit=1,nodelalloc,discard
#define FS_FLAG_CP noatime,nosuid,nodev,discard
#define FSMGR_FLAG_FMT wait,check,formattable
#define FSMGR_FLAG_CHK wait,check
#define FSMGR_FLAG_CP wait,formattable,first_stage_mount
#ifndef __USERDATA_USE_F2FS
-#define FS_FLAG_DATA FS_FLAG_NO_DISCARD,errors=panic
+#define FS_FLAG_DATA FS_FLAG_NO_DISCARD,errors=panic,discard
#else
#define FS_FLAG_DATA noatime,nosuid,nodev,discard,noflush_merge,reserve_root=134217,resgid=1065
#endif
@@ -122,6 +122,50 @@
#define FSMGR_FLAG_DATA FSMGR_FLAG_FMT,FLAG_QUOTA,resize,FLAG_RESERVEDSIZE,FLAG_FDE_AUTO=DEVPATH(metadata),FLAG_FDE_TYPE
#endif
+
LP_DEVPATH(system) /system __MTK_SYSIMG_FSTYPE ro FSMGR_FLAG_SYSTEM
#ifdef __VENDOR_PARTITION_SUPPORT
LP_DEVPATH(vendor) /vendor __MTK_VNDIMG_FSTYPE ro FSMGR_FLAG_VENDOR
@@ -135,10 +179,11 @@ LP_DEVPATH(odm) /odm __MTK_ODMIMG_FSTYPE ro FSMGR_FLAG_V
#ifdef __BOARD_USES_METADATA_PARTITION
DEVPATH(md_udc) /metadata __MTK_METADATA_FSTYPE FS_FLAG_CP FSMGR_FLAG_CP
#endif
-DEVPATH(userdata) /data __MTK_DATAIMG_FSTYPE FS_FLAG_DATA FSMGR_FLAG_DATA
#ifndef __MTK_AB_OTA_UPDATER
DEVPATH(cache) /cache ext4 FS_FLAG_DISCARD FSMGR_FLAG_FMT
#endif
+
+DEVPATH(userdata) /data __MTK_DATAIMG_FSTYPE FS_FLAG_DATA FSMGR_FLAG_DATA
DEVPATH(protect1) /mnt/vendor/protect_f ext4 FS_FLAG_COMMIT FSMGR_FLAG_FMT
DEVPATH(protect2) /mnt/vendor/protect_s ext4 FS_FLAG_COMMIT FSMGR_FLAG_FMT
DEVPATH(nvdata) /mnt/vendor/nvdata ext4 FS_FLAG_COMMIT FSMGR_FLAG_FMT
@@ -148,7 +193,19 @@ DEVPATH(nvcfg) /mnt/vendor/nvcfg ext4 FS_FLAG_COMMIT FSMGR_FLAG_F
DEVPATH(persist) /mnt/vendor/persist ext4 FS_FLAG_COMMIT FSMGR_FLAG_FMT
#endif
-/devices/platform/externdevice* auto auto defaults voldmanaged=sdcard1:auto,encryptable=userdata
+
+
+/devices/platform/externdevice* auto auto defaults voldmanaged=sdcard1:auto
+
/devices/platform/11200000.usb3_xhci* auto vfat defaults voldmanaged=usbotg:auto
#ifdef __MTK_FACTORY_RESET_PROTECTION_SUPPORT
FSTAB_RAW2(frp,persistent)