TWRP recovery image minimization
TWRP recovery image minimization
(24-10-2024, 08:52 AM)hipot ..
The original revovery.img from the ROM is 9.9MB
I have verified I can flash hovatek's slightly reducer 13.6MB twrp. Though I do not know how is that possible since the partition size appears to be smaller.
18MB is too much though and the the flashing fails.
Are there any other techniques that I can use to compress the recovery without loosing so many features?
Thank you and have a nice day.
(24-10-2024, 07:34 PM)hipot I have tested it and the image does not want to boot.
Can I somehow check that lzma is supported by the device or use a different compression method?
It does boot if I use just:
TW_USE_TOOLBOX := true
TW_EXTRA_LANGUAGES := false
TW_OEM_BUILD := true
TW_USE_TOOLBOX := true
TW_EXTRA_LANGUAGES := false
TW_OEM_BUILD := true
LZMA_RAMDISK_TARGETS := boot,recovery
(31-10-2024, 12:40 PM)hovatek Try
Code:TW_USE_TOOLBOX := true
TW_EXTRA_LANGUAGES := false
TW_OEM_BUILD := true
LZMA_RAMDISK_TARGETS := boot,recovery
Some flags cause problems when combined and those like BOARD_RAMDISK_USE_LZ4 := true tend to require additional flags
(03-11-2024, 02:03 AM)kelvinchinedu This flags will help you
# Debug
TWRP_INCLUDE_LOGCAT := true
TARGET_USES_LOGD := true
# Tools / Resetprop and magiskboot
TW_EXCLUDE_BASH := true
TW_EXCLUDE_TZDATA := true
TW_INCLUDE_REPACKTOOLS := false
TW_NO_FASTBOOT_BOOT := true
TW_EXCLUDE_PYTHON := true
TW_EXCLUDE_NANO := true
TW_EXCLUDE_LPTOOLS := true
TW_EXCLUDE_LPDUMP := true
TW_NO_SCREEN_BLANK := true
TARGET_USES_MKE2FS := true
TW_INCLUDE_NTFS_3G := true
TW_INCLUDE_RESETPROP := true
TW_INCLUDE_LIBRESETPROP :=true
TW_INCLUDE_REPACK_TOOL := true
# TWRP-Specific configuration
TW_EXCLUDE_TWRPAPP := true
TW_EXCLUDE_APEX := true
# Density / StatusBar
TW_BRIGHTNESS_PATH := /sys/class/leds/lcd-backlight/brightness
TARGET_RECOVERY_PIXEL_FORMAT := "RGBX_8888"
TW_INPUT_BLACKLIST := "hbtp_vm"
TW_MAX_BRIGHTNESS := 2047
TW_DEFAULT_BRIGHTNESS := 1200
TW_THEME := portrait_hdpi
TARGET_SCREEN_DENSITY := 320
# StatusBar
TW_STATUS_ICONS_ALIGN := center
TW_CUSTOM_CPU_POS := "300"
TW_CUSTOM_CLOCK_POS := "70"
TW_CUSTOM_BATTERY_POS := "790"