various updates
* fix decryption * fix touch * fix ueventd * use twrp tree
This commit is contained in:
parent
2e7e454d3c
commit
a586911fad
14 changed files with 79 additions and 21 deletions
|
@ -15,4 +15,4 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
PRODUCT_MAKEFILES := \
|
PRODUCT_MAKEFILES := \
|
||||||
$(LOCAL_DIR)/lineage_renoir.mk
|
$(LOCAL_DIR)/twrp_renoir.mk
|
||||||
|
|
|
@ -85,8 +85,9 @@ BOARD_KERNEL_CMDLINE += video=vfb:640x400,bpp=32,memsize=3072000
|
||||||
KERNEL_LD := LD=ld.lld
|
KERNEL_LD := LD=ld.lld
|
||||||
TARGET_KERNEL_ADDITIONAL_FLAGS := DTC_EXT=$(shell pwd)/prebuilts/misc/linux-x86/dtc/dtc
|
TARGET_KERNEL_ADDITIONAL_FLAGS := DTC_EXT=$(shell pwd)/prebuilts/misc/linux-x86/dtc/dtc
|
||||||
TARGET_KERNEL_CLANG_COMPILE := true
|
TARGET_KERNEL_CLANG_COMPILE := true
|
||||||
TARGET_KERNEL_CONFIG := vendor/renoir-qgki_defconfig
|
TARGET_KERNEL_CONFIG := renoir_defconfig
|
||||||
TARGET_KERNEL_SOURCE := kernel/xiaomi/renoir
|
TARGET_KERNEL_SOURCE := kernel/xiaomi/renoir
|
||||||
|
NEED_KERNEL_MODULE_RECOVERY := true
|
||||||
|
|
||||||
# Metadata
|
# Metadata
|
||||||
BOARD_USES_METADATA_PARTITION := true
|
BOARD_USES_METADATA_PARTITION := true
|
||||||
|
|
13
device.mk
13
device.mk
|
@ -64,7 +64,8 @@ TARGET_SCREEN_WIDTH := 1080
|
||||||
# Soong namespaces
|
# Soong namespaces
|
||||||
PRODUCT_SOONG_NAMESPACES += \
|
PRODUCT_SOONG_NAMESPACES += \
|
||||||
$(LOCAL_PATH) \
|
$(LOCAL_PATH) \
|
||||||
hardware/qcom-caf/bootctrl
|
hardware/qcom-caf/bootctrl \
|
||||||
|
vendor/qcom/opensource/commonsys-intf/display
|
||||||
|
|
||||||
# Update engine
|
# Update engine
|
||||||
PRODUCT_PACKAGES += \
|
PRODUCT_PACKAGES += \
|
||||||
|
@ -95,14 +96,22 @@ TARGET_USES_MKE2FS := true
|
||||||
TW_NO_SCREEN_BLANK := true
|
TW_NO_SCREEN_BLANK := true
|
||||||
TW_EXCLUDE_APEX := true
|
TW_EXCLUDE_APEX := true
|
||||||
|
|
||||||
|
# Crypto
|
||||||
|
TW_INCLUDE_CRYPTO := true
|
||||||
|
TW_INCLUDE_CRYPTO_FBE := true
|
||||||
|
TW_INCLUDE_FBE_METADATA_DECRYPT := true
|
||||||
|
PLATFORM_SECURITY_PATCH := 2099-12-31
|
||||||
VENDOR_SECURITY_PATCH := 2099-12-31
|
VENDOR_SECURITY_PATCH := 2099-12-31
|
||||||
|
PLATFORM_VERSION := 16.1.0
|
||||||
|
BOARD_USES_QCOM_FBE_DECRYPTION := true
|
||||||
|
|
||||||
TARGET_RECOVERY_DEVICE_MODULES += \
|
TARGET_RECOVERY_DEVICE_MODULES += \
|
||||||
libandroidicu \
|
libandroidicu \
|
||||||
libdisplayconfig.qti \
|
libdisplayconfig.qti \
|
||||||
libion \
|
libion \
|
||||||
vendor.display.config@1.0 \
|
vendor.display.config@1.0 \
|
||||||
vendor.display.config@2.0
|
vendor.display.config@2.0 \
|
||||||
|
libdisplayconfig.qti
|
||||||
|
|
||||||
RECOVERY_LIBRARY_SOURCE_FILES += \
|
RECOVERY_LIBRARY_SOURCE_FILES += \
|
||||||
$(TARGET_OUT_SHARED_LIBRARIES)/libion.so \
|
$(TARGET_OUT_SHARED_LIBRARIES)/libion.so \
|
||||||
|
|
|
@ -1,13 +1,5 @@
|
||||||
import /init.recovery.qcom_decrypt.rc
|
import /init.recovery.qcom_decrypt.rc
|
||||||
|
|
||||||
service touchfeature /system/bin/vendor.xiaomi.hw.touchfeature@1.0-service
|
|
||||||
user root
|
|
||||||
group root
|
|
||||||
setenv LD_LIBRARY_PATH /vendor/lib64:/vendor/lib:/system/lib64:/system/lib:/sbin
|
|
||||||
disabled
|
|
||||||
oneshot
|
|
||||||
seclabel u:r:recovery:s0
|
|
||||||
|
|
||||||
on init
|
on init
|
||||||
write /sys/class/backlight/panel0-backlight/brightness 200
|
write /sys/class/backlight/panel0-backlight/brightness 200
|
||||||
# Create location for fs_mgr to store abbreviated output from filesystem
|
# Create location for fs_mgr to store abbreviated output from filesystem
|
||||||
|
@ -25,9 +17,3 @@ on fs
|
||||||
on boot
|
on boot
|
||||||
start health-hal-2-1
|
start health-hal-2-1
|
||||||
setprop sys.usb.config adb
|
setprop sys.usb.config adb
|
||||||
|
|
||||||
# Xiaomi touch
|
|
||||||
mknod /dev/xiaomi_touch c 10 120
|
|
||||||
chown system system /dev/xiaomi-touch
|
|
||||||
chmod 0664 /dev/xiaomi-touch
|
|
||||||
start touchfeature
|
|
||||||
|
|
61
recovery/root/system/bin/postrecoveryboot.sh
Executable file
61
recovery/root/system/bin/postrecoveryboot.sh
Executable file
|
@ -0,0 +1,61 @@
|
||||||
|
#!/system/bin/sh
|
||||||
|
|
||||||
|
|
||||||
|
# find necessary modules for touchscreen, etc. to ensure no mismatch with kernel
|
||||||
|
copy-modules()
|
||||||
|
{
|
||||||
|
if grep -Fq twrpfastboot /proc/cmdline
|
||||||
|
then
|
||||||
|
echo "using ramdisk modules (fastboot boot)"
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -f /lib/modules/modules.load.recovery -a -f /lib/modules/xiaomi_touch.ko ] && lsmod | grep -Fq xiaomi_touch
|
||||||
|
then
|
||||||
|
echo "using vendor_boot modules"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
suffix=$(getprop ro.boot.slot_suffix)
|
||||||
|
if [ -z "$suffix" ]
|
||||||
|
then
|
||||||
|
suffix="_$(getprop ro.boot.slot)"
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "using vendor$suffix modules"
|
||||||
|
mkdir /v
|
||||||
|
mount -t ext4 -o ro /dev/block/mapper/vendor$suffix /v
|
||||||
|
rm -f /vendor/lib/modules/*
|
||||||
|
cp -afR /v/lib/modules/* /vendor/lib/modules/
|
||||||
|
umount /v
|
||||||
|
rmdir /v
|
||||||
|
}
|
||||||
|
|
||||||
|
install-touch()
|
||||||
|
{
|
||||||
|
if [ -f /lib/modules/modules.load.recovery -a -f /lib/modules/xiaomi_touch.ko ] && lsmod | grep -Fq xiaomi_touch
|
||||||
|
then
|
||||||
|
echo "vendor_boot touchscreen modules already loaded"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -f /vendor/lib/modules/xiaomi_touch.ko ]
|
||||||
|
then
|
||||||
|
echo "! vendor touchscreen modules not found"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "loading vendor touchscreen modules"
|
||||||
|
for module in $(modprobe -D -d /vendor/lib/modules goodix_core focaltech_touch | grep modules)
|
||||||
|
do
|
||||||
|
insmod /vendor/lib/modules/$(basename $module)
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
copy-modules
|
||||||
|
install-touch
|
||||||
|
|
||||||
|
exit 0
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -40,5 +40,6 @@ system_ext /system_ext e
|
||||||
product /product ext4 ro,barrier=1,discard wait,slotselect
|
product /product ext4 ro,barrier=1,discard wait,slotselect
|
||||||
vendor /vendor ext4 ro,barrier=1,discard wait,slotselect
|
vendor /vendor ext4 ro,barrier=1,discard wait,slotselect
|
||||||
odm /odm ext4 ro,barrier=1,discard wait,slotselect
|
odm /odm ext4 ro,barrier=1,discard wait,slotselect
|
||||||
/dev/block/bootdevice/by-name/userdata /data f2fs noatime,nosuid,nodev,discard,inlinecrypt,reserve_root=32768,resgid=1065,fsync_mode=nobarrier wait,check,formattable,fileencryption=aes-256-xts:aes-256-cts:v2+inlinecrypt_optimized+wrappedkey_v0,keydirectory=/metadata/vold/metadata_encryption
|
/dev/block/by-name/metadata /metadata ext4 noatime,nosuid,nodev,discard wait,check,formattable,first_stage_mount
|
||||||
|
/dev/block/bootdevice/by-name/userdata /data f2fs noatime,nosuid,nodev,nodiscard,inlinecrypt,reserve_root=32768,resgid=1065,fsync_mode=nobarrier latemount,wait,check,formattable,fileencryption=aes-256-xts:aes-256-cts:v2+inlinecrypt_optimized+wrappedkey_v0,keydirectory=/metadata/vold/metadata_encryption,metadata_encryption=aes-256-xts:wrappedkey_v0,quota,reservedsize=128M,sysfs_path=/sys/devices/platform/soc/1d84000.ufshc,checkpoint=fs
|
||||||
/dev/block/bootdevice/by-name/misc /misc emmc defaults defaults
|
/dev/block/bootdevice/by-name/misc /misc emmc defaults defaults
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -22,11 +22,11 @@ $(call inherit-product, $(SRC_TARGET_DIR)/product/aosp_base.mk)
|
||||||
$(call inherit-product, device/xiaomi/renoir/device.mk)
|
$(call inherit-product, device/xiaomi/renoir/device.mk)
|
||||||
|
|
||||||
# Inherit some common TWRP stuff.
|
# Inherit some common TWRP stuff.
|
||||||
$(call inherit-product, vendor/lineage/config/common_full_phone.mk)
|
$(call inherit-product, vendor/twrp/config/common.mk)
|
||||||
|
|
||||||
# Device identifier. This must come after all inclusions
|
# Device identifier. This must come after all inclusions
|
||||||
PRODUCT_DEVICE := renoir
|
PRODUCT_DEVICE := renoir
|
||||||
PRODUCT_NAME := lineage_renoir
|
PRODUCT_NAME := twrp_renoir
|
||||||
PRODUCT_BRAND := Xiaomi
|
PRODUCT_BRAND := Xiaomi
|
||||||
PRODUCT_MODEL := Mi 11 Lite 5G
|
PRODUCT_MODEL := Mi 11 Lite 5G
|
||||||
PRODUCT_MANUFACTURER := Xiaomi
|
PRODUCT_MANUFACTURER := Xiaomi
|
Loading…
Reference in a new issue