BOARD_PERSISTIMAGE_PARTITION_SIZE := 33554432
BOARD_PERSISTIMAGE_FILE_SYSTEM_TYPE := ext4
BOARD_FLASH_BLOCK_SIZE := 131072 # (BOARD_KERNEL_PAGESIZE * 64)
-
-# Kernel Compiling
-#TARGET_KERNEL_ARCH := arm64
-#TARGET_KERNEL_HEADER_ARCH := arm64
-#TARGET_KERNEL_CROSS_COMPILE_PREFIX := aarch64-linux-android-
-#TARGET_USES_UNCOMPRESSED_KERNEL := false
+BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE := ext4
+TARGET_COPY_OUT_VENDOR := vendor
# Recovery
BOARD_HAS_LARGE_FILESYSTEM := true
TARGET_USERIMAGES_USE_F2FS := true
# TWRP specific build flags
-BOARD_HAS_NO_REAL_SDCARD := true
+TW_THEME := portrait_hdpi
RECOVERY_SDCARD_ON_DATA := true
+BOARD_HAS_NO_REAL_SDCARD := true
TARGET_RECOVERY_QCOM_RTC_FIX := true
TW_BRIGHTNESS_PATH := "/sys/class/leds/lcd-backlight/brightness"
-TW_EXCLUDE_DEFAULT_USB_INIT := true
-TW_EXCLUDE_SUPERSU := true
+TW_MAX_BRIGHTNESS := 255
+TW_DEFAULT_BRIGHTNESS := 150
TW_EXTRA_LANGUAGES := true
-#TW_INCLUDE_CRYPTO := true
TW_INCLUDE_NTFS_3G := true
TW_INPUT_BLACKLIST := "hbtp_vm"
-TW_MAX_BRIGHTNESS := 255
-TW_NO_USB_STORAGE := true
+TW_EXCLUDE_SUPERSU := true
TW_SCREEN_BLANK_ON_BOOT := true
-TW_THEME := portrait_hdpi
-# Workaround for error copying vendor files to recovery ramdisk
-BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE := ext4
-TARGET_COPY_OUT_VENDOR := vendor
+
+# Encryption support
+TW_INCLUDE_CRYPTO := true
+TARGET_HW_DISK_ENCRYPTION := true
+TARGET_KEYMASTER_WAIT_FOR_QSEE := true
symlink /dev/block/platform/soc/1da4000.ufshc /dev/block/bootdevice
install_keyring
-on property:ro.crypto.state=encrypted
- start qseecomd
+on boot
+ # save battery by switching to interactive once booted
+ write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor interactive
+ write /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor interactive
+ write /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor interactive
+ write /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor interactive
-# use decryption libraries from /system if available
-service setup-decrypt /sbin/setup_decrypt
+service qseecomd /sbin/qseecomd
oneshot
disabled
user root
group root
seclabel u:r:recovery:s0
+on property:ro.crypto.state=encrypted
+ start qseecomd
+