Add twrp_soong as a required module to ensure twres
folder is included in dirty builds where device out folder
is removed
Change-Id: I5b3f57664cd2aa97ff74ff594c72e6f29c6c927f
Use the TW_OVERRIDE_PROPS_ADDITIONAL_PARTITIONS flag to
specify a space-separated list of additional partitions
that should be parsed when trying to locate props
for overriding.
Example:
TW_OVERRIDE_PROPS_ADDITIONAL_PARTITIONS := vendor odm
Requires TW_OVERRIDE_SYSTEM_PROPS to be defined.
Change-Id: I7baf4c15628789fe525976d9de0251bba6882395
Should be handled via device tree's BoardConfig
Sample will be TARGET_OTA_ASSERT_DEVICE := le_zl1,zl1,lepro3,lex720,lex727,LEX720,LEX727 in BoardConfig
Only applicable for AB or VAB devices
Change-Id: I1fbe6155d3f79eee089a31dbe62ee9d04c33d65c
Needed if no ats_ files are present on qcom device
Offset is the difference between the current time
and the time since_epoch
To calculate the offset in Android, the following expression
(from a root shell) can be used:
echo "$(( ($(date +%s) - $(cat /sys/class/rtc/rtc0/since_epoch)) ))"
Add 3 zeros to the output and use that in the TW_QCOM_ATS_OFFSET
flag in your BoardConfig.mk
For example, if the result of the calculation is 1642433544,
use 1642433544000 as the offset
Change-Id: I5d58125dffc3fdbfb76a5ffde4e27659376185f1
* we can use this as a trigger in init rc, for any task
that depend on kernel modules being loaded
Change-Id: I7623edc0b6dc799e911a087881f76e9642e005ee
pcansi TERM has always had some display and/or scrolling (up, down, left or right) issues in nano on TWRP's embedded Terminal.
Most frequently seen is misaligned/displaced text on long lines and files, either initially or once scrolled through.
bg1.25 seems to be the most compatible TERM for all devices currently.
Change-Id: If00a8352ca3576085f69c12dffb5b21637c7b21c
Some OEMs include prop files in custom locations. Add these to
a list and parse when setting properties.
Use the flag TW_SYSTEM_BUILD_PROP_ADDITIONAL_PATHS followed
by a semi-colon-separated list of paths (relative to /system)
where the additional prop files can be found.
The standard build.prop file does not need to be specified and
will always be parsed.
Example:
TW_SYSTEM_BUILD_PROP_ADDITIONAL_PATHS := etc/buildinfo/oem_build.prop;etc/prop.default
Change-Id: Ie0e25c7d2575d928310ff1b4fc1aef44a83784ca
Crosshatch uses a legacy ioctl for setting and getting fscrypt
policies. If the device is legacy, we will use the legacy ioctl.
Change-Id: I5c2e068f166b89fe9f7839a6d6a9533e49fc5b07
The functions use the Property_Override function from libresetprop,
so don't include if libresetprop isn't included in build
Change-Id: I5eb210f17fea908ec35cb223e4a55066419f55dc
In the new version of libziparchive, the default values of the optional_prefix and optional_suffix parameters of the StartIteration function are changed to empty strings, and nullptr is no longer detected.
Change-Id: I66ee58a9515586700b10a3d5aa5b780a6207b33c
1. That read data will be blocked when adb sideload OTA package
2. An error(Out of bound read) occurs when installing OTA package by fuse
Test: as follows
- adb sideload OTA package
- install OTA package by install_with_fuse parameter
Change-Id: Ie53510d157f6ea4c92606b289fcb745d441918c8
Signed-off-by: luoqiangwei1 <luoqiangwei1@xiaomi.com>
Signed-off-by: GarfieldHan <2652609017@qq.com>
The libziparchive TWRP using was outdated, not supported a zip
size more than 4 GiB. With the development of technologies,
Obviously it was not enough for ROM packages, like Xiaomi's
MIUI for Vitrual A/B devices (for example Redmi K40 [alioth])
is more than 4 GiB and TWRP couldn't handle it properly.
Since we have updated libziparchive to latest version, we could
switch ZipEntry to ZipEntry64 so that TWRP can support a ROM
package if its size more than 4 GiB.
Co-authored-by: sekaiacg <sekaiacg@gmail.com>
Signed-off-by: GarfieldHan <2652609017@qq.com>
Change-Id: Iee811554bb08e02bf2bd8e9057511f36caefdc9d
Enhanced Read-Only File System (EROFS) has been included in Linux
kernel, many Linux distributions, buildroot and Android AOSP for
a while. Plus, nowadays, it's known that EROFS has been commercially
used by several Android vendors for their system partitions.
This patch adds support for detecting EROFS filesystem to libblkid.
Since util-linux/util-linux@cd129b7 introduced blkid_probe_set_block_size
function to report filesystem block size, TWRP is using blkid 2.25.0, which
means blkid_probe_set_block_size wasn't supported and required, so remove
the blkszbits judgement and blkid_probe_set_block_size for fixing building.
Test: Add erofs mount point to twrp.flags, build and boot
OP4A7A:/ # logcat | grep erofs
I (6)[571:recovery]erofs: (device dm-0): mounted with opts: , root inode @ nid 58.
I (6)[571:recovery]erofs: (device dm-9): mounted with opts: , root inode @ nid 43.
I (6)[571:recovery]erofs: (device dm-1): mounted with opts: , root inode @ nid 52.
I (6)[571:recovery]erofs: (device dm-10): mounted with opts: , root inode @ nid 45.
I (6)[571:recovery]erofs: (device dm-8): mounted with opts: , root inode @ nid 42.
I (0)[571:recovery]erofs: (device dm-12): mounted with opts: , root inode @ nid 38.
I (3)[571:recovery]erofs: (device dm-0): mounted with opts: , root inode @ nid 58.
I (3)[571:recovery]erofs: (device dm-1): mounted with opts: , root inode @ nid 52.
I (3)[571:recovery]erofs: (device dm-0): mounted with opts: , root inode @ nid 58.
I (3)[571:recovery]erofs: (device dm-0): mounted with opts: , root inode @ nid 58.
I (3)[571:recovery]erofs: (device dm-9): mounted with opts: , root inode @ nid 43.
I (2)[571:recovery]erofs: (device dm-1): mounted with opts: , root inode @ nid 52.
I (2)[571:recovery]erofs: (device dm-10): mounted with opts: , root inode @ nid 45.
I (2)[571:recovery]erofs: (device dm-8): mounted with opts: , root inode @ nid 42.
I (2)[571:recovery]erofs: (device dm-12): mounted with opts: , root inode @ nid 38.
I (6)[571:recovery]erofs: (device dm-0): mounted with opts: , root inode @ nid 58.
I (6)[571:recovery]erofs: (device dm-0): mounted with opts: , root inode @ nid 58.
OP4A7A:/ # cat /tmp/recovery.log | grep erofs
Current_File_System: erofs
Fstab_File_System: erofs
Current_File_System: erofs
Fstab_File_System: erofs
Fstab_File_System: erofs
Current_File_System: erofs
Fstab_File_System: erofs
Current_File_System: erofs
Fstab_File_System: erofs
Current_File_System: erofs
Fstab_File_System: erofs
Current_File_System: erofs
Fstab_File_System: erofs
Now TWRP can recognize the EROFS filesystem perfectly after setting fs in twrp.flags
Signed-off-by: Gao Xiang <hsiangkao@redhat.com>
[@pomelohan: Adapt for TWRP's libblkid version and add erofs.c to build]
Co-authored-by: GarfieldHan <2652609017@qq.com>
Signed-off-by: GarfieldHan <2652609017@qq.com>
Change-Id: I00263757b5b6ed881165e65795ef849d86763165