diff --git a/BoardConfig.mk b/BoardConfig.mk index 520610d..af7c334 100644 --- a/BoardConfig.mk +++ b/BoardConfig.mk @@ -15,10 +15,11 @@ # # Default device path -DEVICE_PATH := device/$(PRODUCT_BRAND)/$(TARGET_DEVICE) +DEVICE_PATH := device/xiaomi/ginkgo # For building with minimal manifest ALLOW_MISSING_DEPENDENCIES := true +BUILD_BROKEN_ELF_PREBUILT_PRODUCT_COPY_FILES := true # Architecture TARGET_ARCH := arm64 @@ -38,11 +39,11 @@ ENABLE_CPUSETS := true ENABLE_SCHEDBOOST := true # Bootloader -TARGET_BOOTLOADER_BOARD_NAME := $(PRODUCT_PLATFORM) +TARGET_BOOTLOADER_BOARD_NAME := trinket TARGET_NO_BOOTLOADER := true # Platform -TARGET_BOARD_PLATFORM := $(TARGET_BOOTLOADER_BOARD_NAME) +TARGET_BOARD_PLATFORM := trinket TARGET_BOARD_PLATFORM_GPU := qcom-adreno640 # Kernel @@ -55,18 +56,15 @@ BOARD_KERNEL_IMAGE_NAME := Image.gz TARGET_KERNEL_ARCH := arm64 TARGET_KERNEL_HEADER_ARCH := arm64 TARGET_PREBUILT_KERNEL := $(DEVICE_PATH)/prebuilt/Image.gz -TARGET_PREBUILT_DTB := $(DEVICE_PATH)/prebuilt/dtb.img +#TARGET_PREBUILT_DTB := $(DEVICE_PATH)/prebuilt/dtb.img BOARD_PREBUILT_DTBOIMAGE := $(DEVICE_PATH)/prebuilt/dtbo.img BOARD_INCLUDE_RECOVERY_DTBO := true -BOARD_BOOTIMG_HEADER_VERSION := 2 +BOARD_BOOTIMG_HEADER_VERSION := 1 BOARD_MKBOOTIMG_ARGS := --ramdisk_offset $(BOARD_RAMDISK_OFFSET) BOARD_MKBOOTIMG_ARGS += --tags_offset $(BOARD_KERNEL_TAGS_OFFSET) -BOARD_MKBOOTIMG_ARGS += --dtb $(TARGET_PREBUILT_DTB) +#BOARD_MKBOOTIMG_ARGS += --dtb $(TARGET_PREBUILT_DTB) BOARD_MKBOOTIMG_ARGS += --header_version $(BOARD_BOOTIMG_HEADER_VERSION) -# Assert -TARGET_OTA_ASSERT_DEVICE := ginkgo - # Avb BOARD_AVB_ENABLE := true BOARD_AVB_RECOVERY_KEY_PATH := external/avb/test/data/testkey_rsa4096.pem @@ -76,14 +74,16 @@ BOARD_AVB_RECOVERY_ROLLBACK_INDEX_LOCATION := 1 BOARD_AVB_MAKE_VBMETA_IMAGE_ARGS += --flag 2 # Partitions -BOARD_FLASH_BLOCK_SIZE := 262144 +BOARD_FLASH_BLOCK_SIZE := 262144 # (BOARD_KERNEL_PAGESIZE * 64) +BOARD_CACHEIMAGE_PARTITION_SIZE := 402653184 +BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE := ext4 +BOARD_DTBOIMG_PARTITION_SIZE := 25165824 BOARD_BOOTIMAGE_PARTITION_SIZE := 134217728 BOARD_RECOVERYIMAGE_PARTITION_SIZE := 67108864 -BOARD_SYSTEMIMAGE_PARTITION_SIZE := 3758096384 +BOARD_SYSTEMIMAGE_PARTITION_SIZE := 4831838208 BOARD_SYSTEMIMAGE_PARTITION_TYPE := ext4 -BOARD_USERDATAIMAGE_PARTITION_SIZE := 12884901888 +BOARD_USERDATAIMAGE_PARTITION_SIZE := 52554612224 BOARD_USERDATAIMAGE_FILE_SYSTEM_TYPE := ext4 -BOARD_USES_METADATA_PARTITION := true BOARD_VENDORIMAGE_PARTITION_SIZE := 1610612736 BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE := ext4 @@ -100,27 +100,27 @@ TARGET_COPY_OUT_VENDOR := vendor # Encryption BOARD_USES_METADATA_PARTITION := true +TW_INCLUDE_FBE_METADATA_DECRYPT := true BOARD_USES_QCOM_FBE_DECRYPTION := true TW_INCLUDE_CRYPTO := true -TW_INCLUDE_FBE_METADATA_DECRYPT := true TW_USE_FSCRYPT_POLICY := 1 -PLATFORM_SECURITY_PATCH := 2127-12-31 -VENDOR_SECURITY_PATCH := $(PLATFORM_SECURITY_PATCH) +PLATFORM_SECURITY_PATCH := 2099-12-31 +VENDOR_SECURITY_PATCH := 2099-12-31 +PLATFORM_VERSION := 16.1.0 +PLATFORM_VERSION_LAST_STABLE := $(PLATFORM_VERSION) +PRODUCT_ENFORCE_VINTF_MANIFEST := true # Extras BOARD_SUPPRESS_SECURE_ERASE := true -TARGET_SYSTEM_PROP += $(DEVICE_PATH)/system.prop +#TARGET_SYSTEM_PROP += $(DEVICE_PATH)/system.prop # Recovery BOARD_HAS_LARGE_FILESYSTEM := true TARGET_RECOVERY_DEVICE_MODULES += \ - libandroidicu \ - libcap \ libion \ libxml2 TW_RECOVERY_ADDITIONAL_RELINK_LIBRARY_FILES += \ - $(TARGET_OUT_SHARED_LIBRARIES)/libcap.so \ $(TARGET_OUT_SHARED_LIBRARIES)/libion.so \ $(TARGET_OUT_SHARED_LIBRARIES)/libxml2.so @@ -152,5 +152,3 @@ TW_OVERRIDE_SYSTEM_PROPS := \ # TWRP Debug Flags TWRP_INCLUDE_LOGCAT := true TARGET_USES_LOGD := true -TARGET_RECOVERY_DEVICE_MODULES += debuggerd -TW_RECOVERY_ADDITIONAL_RELINK_FILES += $(TARGET_OUT_EXECUTABLES)/debuggerd diff --git a/device.mk b/device.mk index fd19a46..3550265 100644 --- a/device.mk +++ b/device.mk @@ -1,19 +1,6 @@ # Api PRODUCT_SHIPPING_API_LEVEL := 28 -# Dependencies -PRODUCT_COPY_FILES += \ - $(OUT_DIR)/target/product/$(PRODUCT_RELEASE_NAME)/obj/SHARED_LIBRARIES/libandroidicu_intermediates/libandroidicu.so:$(TARGET_COPY_OUT_RECOVERY)/root/system/lib64/libandroidicu.so - -# Health HAL -PRODUCT_PACKAGES += \ - android.hardware.health@2.1-impl.recovery - -# HIDL -PRODUCT_PACKAGES += \ - libhidltransport \ - libhwbinder - # qcom decryption PRODUCT_PACKAGES_ENG += \ qcom_decrypt \ diff --git a/prebuilt/Image.gz b/prebuilt/Image.gz index e239b82..c07e14e 100644 Binary files a/prebuilt/Image.gz and b/prebuilt/Image.gz differ diff --git a/prebuilt/dtb.img b/prebuilt/dtb.img deleted file mode 100644 index d2f082d..0000000 Binary files a/prebuilt/dtb.img and /dev/null differ diff --git a/prebuilt/dtbo.img b/prebuilt/dtbo.img index 65b7586..dc6f585 100644 Binary files a/prebuilt/dtbo.img and b/prebuilt/dtbo.img differ diff --git a/recovery/root/init.recovery.qcom.rc b/recovery/root/init.recovery.qcom.rc index 6d616d3..ec93944 100644 --- a/recovery/root/init.recovery.qcom.rc +++ b/recovery/root/init.recovery.qcom.rc @@ -28,13 +28,19 @@ import /init.recovery.qcom_decrypt.rc on init - setprop prepdecrypt.setpatch true setprop prepdecrypt.loglevel 2 on fs wait /dev/block/platform/soc/${ro.boot.bootdevice} symlink /dev/block/platform/soc/${ro.boot.bootdevice} /dev/block/bootdevice - export ANDROID_ROOT /system_root -on boot - start health-hal-2-1 +service variant-script /system/bin/variant-script.sh + user root + group root + disabled + oneshot + seclabel u:r:recovery:s0 + + on boot + chmod 0777 /system/bin/variant-script.sh + start variant-script diff --git a/recovery/root/init.recovery.usb.rc b/recovery/root/init.recovery.usb.rc index 14fec8d..5628c67 100644 --- a/recovery/root/init.recovery.usb.rc +++ b/recovery/root/init.recovery.usb.rc @@ -1,4 +1,4 @@ -# Copyright (c) 2011-2016, The Linux Foundation. All rights reserved. +# Copyright (c) 2011-2018, 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: @@ -25,6 +25,9 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # +on early-init + setprop sys.usb.configfs 0 + on boot write /sys/class/android_usb/android0/iSerial ${ro.serialno} mount configfs none /config @@ -48,8 +51,10 @@ on boot mkdir /config/usb_gadget/g1/functions/audio_source.gs3 mkdir /config/usb_gadget/g1/functions/midi.gs5 mkdir /config/usb_gadget/g1/functions/ffs.adb + mkdir /config/usb_gadget/g1/functions/ffs.fastboot mkdir /config/usb_gadget/g1/functions/diag.diag mkdir /config/usb_gadget/g1/functions/diag.diag_mdm + mkdir /config/usb_gadget/g1/functions/diag.diag_mdm2 mkdir /config/usb_gadget/g1/functions/cser.dun.0 mkdir /config/usb_gadget/g1/functions/cser.nmea.1 mkdir /config/usb_gadget/g1/functions/cser.dun.2 @@ -78,22 +83,53 @@ on boot mkdir /dev/usb-ffs 0775 shell system mkdir /dev/usb-ffs/adb 0770 shell system mount functionfs adb /dev/usb-ffs/adb uid=2000,gid=1000,rmode=0770,fmode=0660 - write /sys/class/android_usb/android0/f_ffs/aliases adb + mkdir /dev/usb-ffs/fastboot 0770 system system + mount functionfs fastboot /dev/usb-ffs/fastboot uid=2000,gid=1000,rmode=0770,fmode=0660 + write /sys/class/android_usb/android0/f_ffs/aliases adb,fastboot setprop vendor.usb.controller ${sys.usb.controller} + setprop sys.usb.configfs 1 + +on property:ro.boot.usbcontroller=* + setprop sys.usb.controller ${ro.boot.usbcontroller} -on property:sys.usb.config=none +on property:sys.usb.config=none && property:sys.usb.configfs=1 write /config/usb_gadget/g1/UDC "none" stop adbd setprop sys.usb.ffs.ready 0 write /config/usb_gadget/g1/bDeviceClass 0 write /config/usb_gadget/g1/bDeviceSubClass 0 write /config/usb_gadget/g1/bDeviceProtocol 0 + rm /config/usb_gadget/g1/configs/b.1/f1 + rm /config/usb_gadget/g1/configs/b.1/f2 + rm /config/usb_gadget/g1/configs/b.1/f3 setprop sys.usb.state ${sys.usb.config} -on property:sys.usb.config=mtp,adb +on property:init.svc.adbd=stopped + setprop sys.usb.ffs.ready 0 + +on property:sys.usb.config=adb && property:sys.usb.configfs=1 start adbd -on property:sys.usb.ffs.ready=1 && property:sys.usb.config=mtp,adb +on property:sys.usb.config=mtp,adb && property:sys.usb.configfs=1 + start adbd + +on property:sys.usb.ffs.ready=1 && property:sys.usb.config=adb && property:sys.usb.configfs=1 + write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "adb" + write /config/usb_gadget/g1/idVendor 0x18d1 + write /config/usb_gadget/g1/idProduct 0x4ee7 + symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f1 + write /config/usb_gadget/g1/UDC ${sys.usb.controller} + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.ffs.ready=1 && property:sys.usb.config=sideload && property:sys.usb.configfs=1 + write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "adb" + write /config/usb_gadget/g1/idVendor 0x18d1 + write /config/usb_gadget/g1/idProduct 0xD001 + symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f1 + write /config/usb_gadget/g1/UDC ${sys.usb.controller} + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.ffs.ready=1 && property:sys.usb.config=mtp,adb && property:sys.usb.configfs=1 write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "mtp_adb" rm /config/usb_gadget/g1/configs/b.1/f1 rm /config/usb_gadget/g1/configs/b.1/f2 @@ -107,18 +143,15 @@ on property:sys.usb.ffs.ready=1 && property:sys.usb.config=mtp,adb write /config/usb_gadget/g1/UDC ${sys.usb.controller} setprop sys.usb.state ${sys.usb.config} -on property:sys.usb.config=adb - start adbd - -on property:sys.usb.ffs.ready=1 && property:sys.usb.config=adb - write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "adb" +on property:sys.usb.ffs.ready=1 && property:sys.usb.config=fastboot && property:sys.usb.configfs=1 + write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "fastboot" rm /config/usb_gadget/g1/configs/b.1/f1 rm /config/usb_gadget/g1/configs/b.1/f2 rm /config/usb_gadget/g1/configs/b.1/f3 rm /config/usb_gadget/g1/configs/b.1/f4 rm /config/usb_gadget/g1/configs/b.1/f5 write /config/usb_gadget/g1/idVendor 0x18d1 - write /config/usb_gadget/g1/idProduct 0x4ee7 - symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f1 + write /config/usb_gadget/g1/idProduct 0xD00D + symlink /config/usb_gadget/g1/functions/ffs.fastboot /config/usb_gadget/g1/configs/b.1/f1 write /config/usb_gadget/g1/UDC ${sys.usb.controller} - setprop sys.usb.state ${sys.usb.config} \ No newline at end of file + setprop sys.usb.state ${sys.usb.config} diff --git a/recovery/root/system/bin/android.hardware.keymaster@4.0-service-qti b/recovery/root/system/bin/android.hardware.keymaster@4.0-service-qti index 5192234..b3771d3 100644 Binary files a/recovery/root/system/bin/android.hardware.keymaster@4.0-service-qti and b/recovery/root/system/bin/android.hardware.keymaster@4.0-service-qti differ diff --git a/recovery/root/system/bin/resetprop b/recovery/root/system/bin/resetprop deleted file mode 100644 index b2807d9..0000000 Binary files a/recovery/root/system/bin/resetprop and /dev/null differ diff --git a/recovery/root/system/bin/variant-script.sh b/recovery/root/system/bin/variant-script.sh new file mode 100644 index 0000000..c502325 --- /dev/null +++ b/recovery/root/system/bin/variant-script.sh @@ -0,0 +1,42 @@ +#!/system/bin/sh +# This script is needed to automatically set device props. + +load_willow() +{ + resetprop "ro.product.model" "Redmi Note 8T" + resetprop "ro.product.name" "willow" + resetprop "ro.build.product" "willow" + resetprop "ro.product.device" "willow" + resetprop "ro.product.system.device" "willow" + resetprop "ro.product.vendor.device" "willow" + resetprop "ro.vendor.product.device" "willow" +} + +load_ginkgo() +{ + resetprop "ro.product.model" "Redmi Note 8" + resetprop "ro.product.name" "ginkgo" + resetprop "ro.build.product" "ginkgo" + resetprop "ro.product.device" "ginkgo" + resetprop "ro.product.system.device" "ginkgo" + resetprop "ro.product.vendor.device" "ginkgo" + resetprop "ro.vendor.product.device" "ginkgo" +} + +variant=$(getprop ro.boot.hwc) +echo $variant +hwversion=$(getprop ro.boot.hwversion) +echo $hwversion + +case $variant in + "Global_B") + case $hwversion in + "18.31.0"|"18.39.0"|"19.39.0") + load_willow + ;; + *) + load_ginkgo + ;; +esac + +exit 0 diff --git a/recovery/root/system/etc/event-log-tags b/recovery/root/system/etc/event-log-tags index 5363229..dbb9479 100644 --- a/recovery/root/system/etc/event-log-tags +++ b/recovery/root/system/etc/event-log-tags @@ -104,28 +104,28 @@ 27531 notification_visibility (key|3),(visibile|1),(lifespan|1),(freshness|1),(exposure|1),(rank|1) 27532 notification_alert (key|3),(buzz|1),(beep|1),(blink|1) 27533 notification_autogrouped (key|3) -30001 am_finish_activity (User|1|5),(Token|1|5),(Task ID|1|5),(Component Name|3),(Reason|3) -30002 am_task_to_front (User|1|5),(Task|1|5) -30003 am_new_intent (User|1|5),(Token|1|5),(Task ID|1|5),(Component Name|3),(Action|3),(MIME Type|3),(URI|3),(Flags|1|5) -30004 am_create_task (User|1|5),(Task ID|1|5) -30005 am_create_activity (User|1|5),(Token|1|5),(Task ID|1|5),(Component Name|3),(Action|3),(MIME Type|3),(URI|3),(Flags|1|5) -30006 am_restart_activity (User|1|5),(Token|1|5),(Task ID|1|5),(Component Name|3) -30007 am_resume_activity (User|1|5),(Token|1|5),(Task ID|1|5),(Component Name|3) +30001 wm_finish_activity (User|1|5),(Token|1|5),(Task ID|1|5),(Component Name|3),(Reason|3) +30002 wm_task_to_front (User|1|5),(Task|1|5) +30003 wm_new_intent (User|1|5),(Token|1|5),(Task ID|1|5),(Component Name|3),(Action|3),(MIME Type|3),(URI|3),(Flags|1|5) +30004 wm_create_task (User|1|5),(Task ID|1|5) +30005 wm_create_activity (User|1|5),(Token|1|5),(Task ID|1|5),(Component Name|3),(Action|3),(MIME Type|3),(URI|3),(Flags|1|5) +30006 wm_restart_activity (User|1|5),(Token|1|5),(Task ID|1|5),(Component Name|3) +30007 wm_resume_activity (User|1|5),(Token|1|5),(Task ID|1|5),(Component Name|3) 30008 am_anr (User|1|5),(pid|1|5),(Package Name|3),(Flags|1|5),(reason|3) -30009 am_activity_launch_time (User|1|5),(Token|1|5),(Component Name|3),(time|2|3) +30009 wm_activity_launch_time (User|1|5),(Token|1|5),(Component Name|3),(time|2|3) 30010 am_proc_bound (User|1|5),(PID|1|5),(Process Name|3) 30011 am_proc_died (User|1|5),(PID|1|5),(Process Name|3),(OomAdj|1|5),(ProcState|1|5) -30012 am_failed_to_pause (User|1|5),(Token|1|5),(Wanting to pause|3),(Currently pausing|3) -30013 am_pause_activity (User|1|5),(Token|1|5),(Component Name|3),(User Leaving|3) +30012 wm_failed_to_pause (User|1|5),(Token|1|5),(Wanting to pause|3),(Currently pausing|3) +30013 wm_pause_activity (User|1|5),(Token|1|5),(Component Name|3),(User Leaving|3) 30014 am_proc_start (User|1|5),(PID|1|5),(UID|1|5),(Process Name|3),(Type|3),(Component|3) 30015 am_proc_bad (User|1|5),(UID|1|5),(Process Name|3) 30016 am_proc_good (User|1|5),(UID|1|5),(Process Name|3) 30017 am_low_memory (Num Processes|1|1) -30018 am_destroy_activity (User|1|5),(Token|1|5),(Task ID|1|5),(Component Name|3),(Reason|3) -30019 am_relaunch_resume_activity (User|1|5),(Token|1|5),(Task ID|1|5),(Component Name|3) -30020 am_relaunch_activity (User|1|5),(Token|1|5),(Task ID|1|5),(Component Name|3) -30021 am_on_paused_called (User|1|5),(Component Name|3),(Reason|3) -30022 am_on_resume_called (User|1|5),(Component Name|3),(Reason|3) +30018 wm_destroy_activity (User|1|5),(Token|1|5),(Task ID|1|5),(Component Name|3),(Reason|3) +30019 wm_relaunch_resume_activity (User|1|5),(Token|1|5),(Task ID|1|5),(Component Name|3) +30020 wm_relaunch_activity (User|1|5),(Token|1|5),(Task ID|1|5),(Component Name|3) +30021 wm_on_paused_called (Token|1|5),(Component Name|3),(Reason|3) +30022 wm_on_resume_called (Token|1|5),(Component Name|3),(Reason|3) 30023 am_kill (User|1|5),(PID|1|5),(Process Name|3),(OomAdj|1|5),(Reason|3) 30024 am_broadcast_discard_filter (User|1|5),(Broadcast|1|5),(Action|3),(Receiver Number|1|1),(BroadcastFilter|1|5) 30025 am_broadcast_discard_app (User|1|5),(Broadcast|1|5),(Action|3),(Receiver Number|1|1),(App|3) @@ -140,13 +140,13 @@ 30039 am_crash (User|1|5),(PID|1|5),(Process Name|3),(Flags|1|5),(Exception|3),(Message|3),(File|3),(Line|1|5) 30040 am_wtf (User|1|5),(PID|1|5),(Process Name|3),(Flags|1|5),(Tag|3),(Message|3) 30041 am_switch_user (id|1|5) -30043 am_set_resumed_activity (User|1|5),(Component Name|3),(Reason|3) -30044 am_focused_stack (User|1|5),(Display Id|1|5),(Focused Stack Id|1|5),(Last Focused Stack Id|1|5),(Reason|3) +30043 wm_set_resumed_activity (User|1|5),(Component Name|3),(Reason|3) +30044 wm_focused_stack (User|1|5),(Display Id|1|5),(Focused Stack Id|1|5),(Last Focused Stack Id|1|5),(Reason|3) 30045 am_pre_boot (User|1|5),(Package|3) 30046 am_meminfo (Cached|2|2),(Free|2|2),(Zram|2|2),(Kernel|2|2),(Native|2|2) 30047 am_pss (Pid|1|5),(UID|1|5),(Process Name|3),(Pss|2|2),(Uss|2|2),(SwapPss|2|2),(Rss|2|2),(StatType|1|5),(ProcState|1|5),(TimeToCollect|2|2) -30048 am_stop_activity (User|1|5),(Token|1|5),(Component Name|3) -30049 am_on_stop_called (User|1|5),(Component Name|3),(Reason|3) +30048 wm_stop_activity (User|1|5),(Token|1|5),(Component Name|3) +30049 wm_on_stop_called (Token|1|5),(Component Name|3),(Reason|3) 30050 am_mem_factor (Current|1|5),(Previous|1|5) 30051 am_user_state_changed (id|1|5),(state|1|5) 30052 am_uid_running (UID|1|5) @@ -154,17 +154,33 @@ 30054 am_uid_active (UID|1|5) 30055 am_uid_idle (UID|1|5) 30056 am_stop_idle_service (UID|1|5),(Component Name|3) -30057 am_on_create_called (User|1|5),(Component Name|3),(Reason|3) -30058 am_on_restart_called (User|1|5),(Component Name|3),(Reason|3) -30059 am_on_start_called (User|1|5),(Component Name|3),(Reason|3) -30060 am_on_destroy_called (User|1|5),(Component Name|3),(Reason|3) -30061 am_remove_task (Task ID|1|5), (Stack ID|1|5) -30062 am_on_activity_result_called (User|1|5),(Component Name|3),(Reason|3) +30057 wm_on_create_called (Token|1|5),(Component Name|3),(Reason|3) +30058 wm_on_restart_called (Token|1|5),(Component Name|3),(Reason|3) +30059 wm_on_start_called (Token|1|5),(Component Name|3),(Reason|3) +30060 wm_on_destroy_called (Token|1|5),(Component Name|3),(Reason|3) +30061 wm_remove_task (Task ID|1|5), (Stack ID|1|5) +30062 wm_on_activity_result_called (Token|1|5),(Component Name|3),(Reason|3) 30063 am_compact (Pid|1|5),(Process Name|3),(Action|3),(BeforeRssTotal|2|2),(BeforeRssFile|2|2),(BeforeRssAnon|2|2),(BeforeRssSwap|2|2),(DeltaRssTotal|2|2),(DeltaRssFile|2|2),(DeltaRssAnon|2|2),(DeltaRssSwap|2|2),(Time|2|3),(LastAction|1|2),(LastActionTimestamp|2|3),(setAdj|1|2),(procState|1|2),(BeforeZRAMFree|2|2),(DeltaZRAMFree|2|2) -30064 am_on_top_resumed_gained_called (User|1|5),(Component Name|3),(Reason|3) -30065 am_on_top_resumed_lost_called (User|1|5),(Component Name|3),(Reason|3) -30066 am_add_to_stopping (User|1|5),(Token|1|5),(Component Name|3),(Reason|3) -30090 am_starting_window (Window|1|5), (Time|2|3) +30064 wm_on_top_resumed_gained_called (Token|1|5),(Component Name|3),(Reason|3) +30065 wm_on_top_resumed_lost_called (Token|1|5),(Component Name|3),(Reason|3) +30066 wm_add_to_stopping (User|1|5),(Token|1|5),(Component Name|3),(Reason|3) +30067 wm_set_keyguard_shown (keyguardShowing|1),(aodShowing|1),(keyguardGoingAway|1),(Reason|3) +30068 am_freeze (Pid|1|5),(Process Name|3) +30069 am_unfreeze (Pid|1|5),(Process Name|3) +30070 uc_finish_user_unlocking (userId|1|5) +30071 uc_finish_user_unlocked (userId|1|5) +30072 uc_finish_user_unlocked_completed (userId|1|5) +30073 uc_finish_user_stopping (userId|1|5) +30074 uc_finish_user_stopped (userId|1|5) +30075 uc_switch_user (userId|1|5) +30076 uc_start_user_internal (userId|1|5) +30077 uc_unlock_user (userId|1|5) +30078 uc_finish_user_boot (userId|1|5) +30079 uc_dispatch_user_switch (oldUserId|1|5) (newUserId|1|5) +30080 uc_continue_user_switch (oldUserId|1|5) (newUserId|1|5) +30081 uc_send_user_broadcast (userId|1|5),(IntentAction|3) +30088 am_activity_launch_info (User|1|5),(Token|1|5),(Component Name|3),(This Time|2|3),(Total Time|2|3),(PID|1|5) +30089 choreographer_caton (Skip Frames|2|3) 30099 event_statusbar_state (type|1) 30100 am_lifecycle_sample (User|1|5),(Process Name|3),(MessageCode|1|5),(time|1|3) 31000 wm_no_surface_memory (Window|3),(PID|1|5),(Operation|3) @@ -276,6 +292,8 @@ 60100 sf_frame_dur (window|3),(dur0|1),(dur1|1),(dur2|1),(dur3|1),(dur4|1),(dur5|1),(dur6|1) 60110 sf_stop_bootanim (time|2|3) 61000 audioserver_binder_timeout (command|3) +62000 input_interaction (windows|4) +62001 input_focus (window|3) 65537 exp_det_netlink_failure (uid|1) 70000 screen_toggled (screen_state|1|5) 70001 intercept_power (action|3),(mPowerKeyHandled|1),(mPowerKeyPressCounter|1) @@ -320,6 +338,81 @@ 90202 exp_det_device_admin_declined_by_user (app_signature|3) 90203 exp_det_device_admin_uninstalled_by_user (app_signature|3) 90204 settings_latency (action|1|6),(latency|1|3) +150000 car_helper_start (uses_hal|1) +150001 car_helper_boot_phase (phase|1) +150002 car_helper_user_starting (user_id|1) +150003 car_helper_user_switching (from_user_id|1),(to_user_id|1) +150004 car_helper_user_unlocking (user_id|1) +150005 car_helper_user_unlocked (user_id|1) +150006 car_helper_user_stopping (user_id|1) +150007 car_helper_user_stopped (user_id|1) +150008 car_helper_svc_connected (pending_operations|1) +150009 car_helper_hal_request (request_type|1) +150010 car_helper_hal_response (result_code|1) +150011 car_helper_hal_default_behavior (fallback|1),(user_locales|3) +150012 car_helper_hal_start_user (user_id|1),(user_locales|3) +150013 car_helper_hal_create_user (flags|1),(safe_name|3),(user_locales|3) +150014 car_helper_pre_creation_requested (number_users|1),(number_guests|1) +150015 car_helper_pre_creation_status (number_existing_users|1),(number_users_to_add|1),(number_users_to_remove|1),(number_existing_guests|1),(number_guests_to_add|1),(number_guests_to_remove|1),(number_invalid_users_to_remove|1) +150050 car_service_init (number_services|1) +150051 car_service_vhal_reconnected (number_services|1) +150052 car_service_set_car_service_helper (pid|1) +150053 car_service_on_user_lifecycle (type|1),(from_user_id|1),(to_user_id|1) +150054 car_service_set_initial_user (user_id|1) +150055 car_service_create (has_vhal|1) +150056 car_service_connected (interface|3) +150057 car_service_destroy (has_vhal|1) +150058 car_service_vhal_died (cookie|2) +150100 car_user_svc_initial_user_info_req (request_type|1),(timeout|1) +150101 car_user_svc_initial_user_info_resp (status|1),(action|1),(user_id|1),(flags|1),(safe_name|3),(user_locales|3) +150103 car_user_svc_set_initial_user (user_id|1) +150104 car_user_svc_set_lifecycle_listener (uid|1) +150105 car_user_svc_reset_lifecycle_listener (uid|1) +150106 car_user_svc_switch_user_req (user_id|1),(timeout|1) +150107 car_user_svc_switch_user_resp (status|1),(result|1),(error_message|3) +150108 car_user_svc_post_switch_user_req (target_user_id|1),(current_user_id|1) +150109 car_user_svc_get_user_auth_req (uid|1),(user_id|1),(number_types|1) +150110 car_user_svc_get_user_auth_resp (number_values|1) +150111 car_user_svc_switch_user_ui_req (user_id|1) +150112 car_user_svc_switch_user_from_hal_req (request_id|1),(uid|1) +150113 car_user_svc_set_user_auth_req (uid|1),(user_id|1),(number_associations|1) +150114 car_user_svc_set_user_auth_resp (number_values|1),(error_message|3) +150115 car_user_svc_create_user_req (safe_name|3),(user_type|3),(flags|1),(timeout|1) +150116 car_user_svc_create_user_resp (status|1),(result|1),(error_message|3) +150117 car_user_svc_create_user_user_created (user_id|1),(safe_name|3),(user_type|3),(flags|1) +150118 car_user_svc_create_user_user_removed (user_id|1),(reason|3) +150119 car_user_svc_remove_user_req (user_id|1) +150120 car_user_svc_remove_user_resp (user_id|1),(result|1) +150121 car_user_svc_notify_app_lifecycle_listener (uid|1),(event_type|1),(from_user_id|1),(to_user_id|1) +150122 car_user_svc_notify_internal_lifecycle_listener (listener_name|3),(event_type|1),(from_user_id|1),(to_user_id|1) +150140 car_user_hal_initial_user_info_req (request_id|1),(request_type|1),(timeout|1) +150141 car_user_hal_initial_user_info_resp (request_id|1),(status|1),(action|1),(user_id|1),(flags|1),(safe_name|3),(user_locales|3) +150142 car_user_hal_switch_user_req (request_id|1),(user_id|1),(user_flags|1),(timeout|1) +150143 car_user_hal_switch_user_resp (request_id|1),(status|1),(result|1),(error_message|3) +150144 car_user_hal_post_switch_user_req (request_id|1),(target_user_id|1),(current_user_id|1) +150145 car_user_hal_get_user_auth_req (int32values|4) +150146 car_user_hal_get_user_auth_resp (int32values|4),(error_message|3) +150147 car_user_hal_legacy_switch_user_req (request_id|1),(target_user_id|1),(current_user_id|1) +150148 car_user_hal_set_user_auth_req (int32values|4) +150149 car_user_hal_set_user_auth_resp (int32values|4),(error_message|3) +150150 car_user_hal_oem_switch_user_req (request_id|1),(target_user_id|1) +150151 car_user_hal_create_user_req (request_id|1),(safe_name|3),(flags|1),(timeout|1) +150152 car_user_hal_create_user_resp (request_id|1),(status|1),(result|1),(error_message|3) +150153 car_user_hal_remove_user_req (target_user_id|1),(current_user_id|1) +150171 car_user_mgr_add_listener (uid|1) +150172 car_user_mgr_remove_listener (uid|1) +150173 car_user_mgr_disconnected (uid|1) +150174 car_user_mgr_switch_user_req (uid|1),(user_id|1) +150175 car_user_mgr_switch_user_resp (uid|1),(status|1),(error_message|3) +150176 car_user_mgr_get_user_auth_req (types|4) +150177 car_user_mgr_get_user_auth_resp (values|4) +150178 car_user_mgr_set_user_auth_req (types_and_values_pairs|4) +150179 car_user_mgr_set_user_auth_resp (values|4) +150180 car_user_mgr_create_user_req (uid|1),(safe_name|3),(user_type|3),(flags|1) +150181 car_user_mgr_create_user_resp (uid|1),(status|1),(error_message|3) +150182 car_user_mgr_remove_user_req (uid|1),(user_id|1) +150183 car_user_mgr_remove_user_resp (uid|1),(status|1) +150184 car_user_mgr_notify_lifecycle_listener (number_listeners|1),(event_type|1),(from_user_id|1),(to_user_id|1) 201001 system_update (status|1|5),(download_result|1|5),(bytes|2|2),(url|3) 201002 system_update_user (action|3) 202001 vending_reconstruct (changes|1) @@ -373,11 +466,12 @@ 210026 security_key_destroyed (success|1),(key_id|3),(uid|1) 210027 security_user_restriction_added (package|3),(admin_user|1),(restriction|3) 210028 security_user_restriction_removed (package|3),(admin_user|1),(restriction|3) -210029 security_cert_authority_installed (success|1),(subject|3) -210030 security_cert_authority_removed (success|1),(subject|3) +210029 security_cert_authority_installed (success|1),(subject|3),(target_user|1) +210030 security_cert_authority_removed (success|1),(subject|3),(target_user|1) 210031 security_crypto_self_test_completed (success|1) 210032 security_key_integrity_violation (key_id|3),(uid|1) 210033 security_cert_validation_failure (reason|3) +210034 security_camera_policy_set (package|3),(admin_user|1),(target_user|1),(disabled|1) 230000 service_manager_stats (call_count|1),(total_time|1|3),(duration|1|3) 230001 service_manager_slow (time|1|3),(service|3) 275534 notification_unautogrouped (key|3) @@ -397,6 +491,6 @@ 1990101 mmesw_state_lowswap (cur_free_swap|2|2) 1990200 power_mode_change (current_cc_uAh|2|4) 1990300 mcd_start_complete (mcd_pid|1|5) -10195355 meminfo (MemFree|1),(Cached|1),(SwapCached|1),(Buffers|1),(Shmem|1),(Unevictable|1),(SwapTotal|1),(SwapFree|1),(ActiveAnon|1),(InactiveAnon|1),(ActiveFile|1),(InactiveFile|1),(SReclaimable|1),(SUnreclaim|1),(KernelStack|1),(PageTables|1),(ION_heap|1),(ION_heap_pool|1),(CmaFree|1) +10195355 killinfo (Pid|1|5),(Uid|1|5),(OomAdj|1),(MinOomAdj|1),(TaskSize|1),(enum kill_reasons|1|5),(MemFree|1),(Cached|1),(SwapCached|1),(Buffers|1),(Shmem|1),(Unevictable|1),(SwapTotal|1),(SwapFree|1),(ActiveAnon|1),(InactiveAnon|1),(ActiveFile|1),(InactiveFile|1),(SReclaimable|1),(SUnreclaim|1),(KernelStack|1),(PageTables|1),(IonHeap|1),(IonHeapPool|1),(CmaFree|1) 1397638484 snet_event_log (subtag|3) (uid|1) (message|3) 1937006964 stats_log (atom_id|1|5),(data|4) diff --git a/recovery/root/system/etc/init/android.hardware.health@2.1-service.rc b/recovery/root/system/etc/init/android.hardware.health@2.1-service.rc deleted file mode 100644 index b6d9e3b..0000000 --- a/recovery/root/system/etc/init/android.hardware.health@2.1-service.rc +++ /dev/null @@ -1,6 +0,0 @@ -service health-hal-2-1 /vendor/bin/hw/android.hardware.health@2.1-service - class hal charger - user system - group system - capabilities WAKE_ALARM - file /dev/kmsg w diff --git a/recovery/root/system/etc/recovery.fstab b/recovery/root/system/etc/recovery.fstab index eaff5ae..35959ad 100644 --- a/recovery/root/system/etc/recovery.fstab +++ b/recovery/root/system/etc/recovery.fstab @@ -33,17 +33,10 @@ # Currently we dont have e2fsck compiled. So fs check would failed. # -/dev/block/bootdevice/by-name/system / ext4 ro,barrier=1,discard wait,avb -/dev/block/bootdevice/by-name/cache /cache ext4 nosuid,noatime,nodev,barrier=1 wait -/dev/block/bootdevice/by-name/metadata /metadata ext4 noatime,nosuid,nodev,discard wait,formattable,first_stage_mount -/dev/block/bootdevice/by-name/userdata /data f2fs noatime,nosuid,nodev,nodiscard,alloc_mode=reuse,fsync_mode=nobarrier,inlinecrypt latemount,wait,check,fileencryption=ice,reservedsize=128M,quota -/devices/platform/soc/4784000.sdhci/mmc_host* /storage/sdcard1 vfat nosuid,nodev wait,voldmanaged=sdcard1:auto,encryptable=footer -/devices/platform/soc/1da4000.ufshc_card/host* /storage/sdcard1 vfat nosuid,nodev wait,voldmanaged=sdcard1:auto,encryptable=footer -/dev/block/bootdevice/by-name/modem /vendor/firmware_mnt vfat ro,shortname=lower,uid=1000,gid=1000,dmask=227,fmask=337,context=u:object_r:firmware_file:s0 wait -/dev/block/bootdevice/by-name/dsp /vendor/dsp ext4 ro,nosuid,nodev,barrier=1 wait -/dev/block/bootdevice/by-name/persist /mnt/vendor/persist ext4 noatime,nosuid,nodev,barrier=1 wait,check -/dev/block/bootdevice/by-name/bluetooth /vendor/bt_firmware vfat ro,shortname=lower,uid=1002,gid=3002,dmask=227,fmask=337,context=u:object_r:bt_firmware_file:s0 wait -/devices/platform/soc/*.ssusb/*.dwc3/xhci-hcd.0.auto* /storage/usbotg vfat nosuid,nodev wait,voldmanaged=usbotg:auto +/dev/block/bootdevice/by-name/system / ext4 ro,barrier=1,discard wait +/dev/block/bootdevice/by-name/metadata /metadata ext4 noatime,nosuid,nodev,discard wait,formattable,wrappedkey +/dev/block/bootdevice/by-name/userdata /data f2fs noatime,nosuid,nodev,nodiscard,alloc_mode=reuse,fsync_mode=nobarrier,inlinecrypt latemount,wait,check,fileencryption=ice,wrappedkey,keydirectory=/metadata/vold/metadata_encryption,quota + # Need to have this entry in here even though the mount point itself is no longer needed. # The update_engine code looks for this entry in order to determine the boot device address # and fails if it does not find it. diff --git a/recovery/root/system/etc/twrp.fstab b/recovery/root/system/etc/twrp.flags similarity index 85% rename from recovery/root/system/etc/twrp.fstab rename to recovery/root/system/etc/twrp.flags index 1449007..c3e73bd 100644 --- a/recovery/root/system/etc/twrp.fstab +++ b/recovery/root/system/etc/twrp.flags @@ -13,8 +13,7 @@ /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 flags=display="Metadata"; -/data f2fs /dev/block/bootdevice/by-name/userdata flags=fileencryption=ice:aes-256-cts;wrappedkey;keydirectory=/metadata/vold/metadata_encryption +#/system_ext ext4 /dev/block/bootdevice/by-name/system_ext flags=display="System_ext" /firmware vfat /dev/block/bootdevice/by-name/modem flags=display="Firmware";mounttodecrypt /cust ext4 /dev/block/bootdevice/by-name/cust flags=display="Cust" /misc emmc /dev/block/bootdevice/by-name/misc @@ -30,4 +29,4 @@ # Removable storage /usb_otg vfat /dev/block/sda1 /dev/block/sda flags=fsflags=utf8;display="USB-Storage";storage;wipeingui;removable -/external_sd auto /dev/block/mmcblk1p1 flags=display="MicroSD";storage;wipeingui;removable +/external_sd auto /dev/block/mmcblk1p1 flags=display="MicroSD";storage;wipeingui;removable diff --git a/recovery/root/system/etc/vintf/manifest/android.system.keystore2-service.xml b/recovery/root/system/etc/vintf/manifest/android.system.keystore2-service.xml new file mode 100644 index 0000000..3a7a7a3 --- /dev/null +++ b/recovery/root/system/etc/vintf/manifest/android.system.keystore2-service.xml @@ -0,0 +1,7 @@ + + android.system.keystore2 + IKeystoreService + default + + diff --git a/recovery/root/vendor/etc/vintf/manifest/android.hardware.health@2.1.xml b/recovery/root/vendor/etc/vintf/manifest/android.hardware.health@2.1.xml deleted file mode 100644 index 34fdca6..0000000 --- a/recovery/root/vendor/etc/vintf/manifest/android.hardware.health@2.1.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - android.hardware.health - hwbinder - @2.1::IHealth/default - - diff --git a/recovery/root/vendor/lib64/libdrmutils.so b/recovery/root/vendor/lib64/libdrmutils.so deleted file mode 100644 index 4c3aa2e..0000000 Binary files a/recovery/root/vendor/lib64/libdrmutils.so and /dev/null differ diff --git a/recovery/root/vendor/lib64/libdsutils.so b/recovery/root/vendor/lib64/libdsutils.so deleted file mode 100644 index 7b08f34..0000000 Binary files a/recovery/root/vendor/lib64/libdsutils.so and /dev/null differ diff --git a/recovery/root/vendor/lib64/libidl.so b/recovery/root/vendor/lib64/libidl.so deleted file mode 100644 index fe06fab..0000000 Binary files a/recovery/root/vendor/lib64/libidl.so and /dev/null differ diff --git a/recovery/root/vendor/lib64/libmdmdetect.so b/recovery/root/vendor/lib64/libmdmdetect.so deleted file mode 100644 index fb55bec..0000000 Binary files a/recovery/root/vendor/lib64/libmdmdetect.so and /dev/null differ diff --git a/recovery/root/vendor/lib64/libqmi_cci.so b/recovery/root/vendor/lib64/libqmi_cci.so deleted file mode 100644 index cb5de09..0000000 Binary files a/recovery/root/vendor/lib64/libqmi_cci.so and /dev/null differ diff --git a/recovery/root/vendor/lib64/libqmi_client_qmux.so b/recovery/root/vendor/lib64/libqmi_client_qmux.so deleted file mode 100644 index 9351107..0000000 Binary files a/recovery/root/vendor/lib64/libqmi_client_qmux.so and /dev/null differ diff --git a/recovery/root/vendor/lib64/libqmi_common_so.so b/recovery/root/vendor/lib64/libqmi_common_so.so deleted file mode 100644 index 1c6e71b..0000000 Binary files a/recovery/root/vendor/lib64/libqmi_common_so.so and /dev/null differ diff --git a/recovery/root/vendor/lib64/libqmi_encdec.so b/recovery/root/vendor/lib64/libqmi_encdec.so deleted file mode 100644 index c4f17e7..0000000 Binary files a/recovery/root/vendor/lib64/libqmi_encdec.so and /dev/null differ diff --git a/recovery/root/vendor/lib64/libqmiservices.so b/recovery/root/vendor/lib64/libqmiservices.so deleted file mode 100644 index eb2ad9f..0000000 Binary files a/recovery/root/vendor/lib64/libqmiservices.so and /dev/null differ diff --git a/recovery/root/vendor/lib64/librecovery_updater_msm.so b/recovery/root/vendor/lib64/librecovery_updater_msm.so deleted file mode 100644 index 6c6818b..0000000 Binary files a/recovery/root/vendor/lib64/librecovery_updater_msm.so and /dev/null differ diff --git a/recovery/root/vendor/lib64/librmp.so b/recovery/root/vendor/lib64/librmp.so deleted file mode 100644 index ec43816..0000000 Binary files a/recovery/root/vendor/lib64/librmp.so and /dev/null differ diff --git a/recovery/root/vendor/lib64/libsoc_helper.so b/recovery/root/vendor/lib64/libsoc_helper.so deleted file mode 100644 index e405f58..0000000 Binary files a/recovery/root/vendor/lib64/libsoc_helper.so and /dev/null differ diff --git a/system.prop b/system.prop index b961c09..669056f 100644 --- a/system.prop +++ b/system.prop @@ -5,5 +5,6 @@ persist.sys.isUsbOtgEnabled=true vendor.gatekeeper.disable_spu=true ro.boot.avb_version=1.0 ro.boot.vbmeta.avb_version=1.0 -ro.board.platform=trinket -ro.product.board=trinket +ro.crypto.volume.filenames_mode=aes-256-cts +ro.crypto.allow_encrypt_override=true +ro.hardware.keystore_desede=true diff --git a/twrp_ginkgo.mk b/twrp_ginkgo.mk index 74fa69a..0c13e0b 100644 --- a/twrp_ginkgo.mk +++ b/twrp_ginkgo.mk @@ -16,33 +16,24 @@ # Only the below variable(s) need to be changed! # -# Define hardware platform -PRODUCT_PLATFORM := trinket # The below variables will be generated automatically # # Release name (automatically taken from this file's suffix) -PRODUCT_RELEASE_NAME := $(lastword $(subst /, ,$(lastword $(subst _, ,$(firstword $(subst ., ,$(MAKEFILE_LIST))))))) - -# Custom vendor used in build tree (automatically taken from this file's prefix) -CUSTOM_VENDOR := $(lastword $(subst /, ,$(firstword $(subst _, ,$(firstword $(MAKEFILE_LIST)))))) +PRODUCT_RELEASE_NAME := ginkgo # Inherit from common AOSP config $(call inherit-product, $(SRC_TARGET_DIR)/product/base.mk) -$(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit.mk) +$(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit_only.mk) # Inherit from our custom product configuration -$(call inherit-product, vendor/$(CUSTOM_VENDOR)/config/common.mk) - -# OEM Info (automatically taken from device tree path) -BOARD_VENDOR := $(or $(word 2,$(subst /, ,$(firstword $(MAKEFILE_LIST)))),$(value 2)) +$(call inherit-product, vendor/twrp/config/common.mk) -## Device identifier. This must come after all inclusions -PRODUCT_DEVICE := $(PRODUCT_RELEASE_NAME) -PRODUCT_NAME := $(CUSTOM_VENDOR)_$(PRODUCT_DEVICE) -PRODUCT_BRAND := $(BOARD_VENDOR) -PRODUCT_MODEL := $(shell echo $(PRODUCT_BRAND) | tr '[:lower:]' '[:upper:]')_$(PRODUCT_DEVICE) -PRODUCT_MANUFACTURER := $(PRODUCT_BRAND) +PRODUCT_DEVICE := ginkgo +PRODUCT_NAME := twrp_ginkgo +PRODUCT_BRAND := Xiaomi +PRODUCT_MODEL := Xiaomi Redmi Note 8 +PRODUCT_MANUFACTURER := Xiaomi # Inherit from hardware-specific part of the product configuration -$(call inherit-product, device/$(PRODUCT_BRAND)/$(PRODUCT_DEVICE)/device.mk) +$(call inherit-product, device/xiaomi/ginkgo/device.mk)