Commit Graph

9 Commits

Author SHA1 Message Date
bigbiff
22851b9476 module load: attempt to load modules from /vendor
Use TW_LOAD_VENDOR_MODULES := "module1.ko module2.ko modulen.ko"
in BoardConfig to have TWRP attempt to load kernel modules during
startup. For fastboot ramdisks, TWRP will attempt to load from
the ramdisk from /vendor/lib/modules. You can have the build
system copy the modules to
$(TARGET_RECOVERY_ROOT_OUT)/vendor/lib/modules/1.1
Otherwise in recovery in boot mode, TWRP will attempt the following:
check /lib/modules (ramdisk vendor_boot)
check /lib/modules/N.N (ramdisk vendor_boot)
check /lib/modules/N.N-gki (ramdisk vendor_boot)
check /vendor/lib/modules (ramdisk)
check /vendor/lib/modules/1.1 (ramdisk prebuilt modules)
check /vendor/lib/modules/N.N (vendor mounted)
check /vendor/lib/modules/N.N-gki (vendor mounted)

Change-Id: I2dccf199e37d47cb7a7e79b0e11026d67b4e3186
2021-09-29 20:46:19 +00:00
epicX
9597b840bc Normalized digest check before installing zip
Change-Id: I5a3e82f103e7a80800be7790f1c8dc33c76413da
(cherry picked from commit 646f4f0c66a918f12e12784b22e7dc9a89837c37)
2021-06-06 13:54:41 +00:00
epicX
9d80efa884 Allow all extension while checking for digest verification
Change-Id: Ie17582f144e0a5b5a68e2c6d88c26cb9f5a29ee6
(cherry picked from commit 57366118181ad8f78251dc034f55835e6947cc0a)
2021-03-12 23:47:05 +00:00
Ian Macdonald
e7c34e5715 Include common names for Magisk app in list of flashable zip files.
We introduce a new XML element prfxfilter for file name prefix
filtering, e.g. Magisk- .

The file is first matched against the list of extensions and, if there's
no match, then matched against the list of prefixes. An extension or
prefix may be equal to the whole filename.

Change-Id: I46a985c7298799793911948bc74296bebb306d9e
2021-02-15 12:29:38 -05:00
Ethan Yonker
1da568fab4 Do not check digest on mapped installs
Change-Id: I2d57eba354e4ec88f418208183f53c12e8548fcb
2019-04-09 15:35:21 -05:00
Ethan Yonker
c53d520d2b Fix zip digest check
Change-Id: I5c05c485574131d3fbc8cb5af5b1281d12b822ce
2019-04-02 15:56:25 -05:00
bigbiff bigbiff
718ab39bc5 Zip install: this will allow TWRP to check md5 and sha256 checksums
for zip installs.

Change-Id: I1fb6af777e08aea29bedaf2e6a9b385ae3b03fac
2019-04-02 05:42:47 +02:00
Ethan Yonker
6e8c27a52b Support v2 fstab format
Auto detect and support both the v1 and v2 fstab formats
Support putting TWRP style flags in a separate /etc/twrp.flags file

twrp.flags format is the same as twrp.fstab (v1 with TWRP flags)

Support using a wildcard in a block device and find all partitions:
/usb-otg vfat /dev/block/sda*

Support using sysfs entries (voldmanaged) and read uevents and scan for
wildcard partitions from uevent data. (twvold?)

May not be complete for some of the newer flags found in fstabs in newer
build trees and there is a slim chance of a crash if the user removes a
removable device while TWRP is performing actions. May need to add some
kind of mutex to prevent the 2 threads from causing this crash. We need
to start somewhere though and this change is pretty innocuous when not
using a v2 fstab.

Change-Id: I617d97c7db332cbe671a9d2b8ad98b3d9c4f03cc
2017-11-28 00:20:51 +01:00
bigbiff bigbiff
56cf564658 twrpDigest refactor
This patch is to refactor twrpDigest using polymorphism
and inheritance to use the same call patterns for creating and
reading a digest. Now a library.
Use SHA2 from libcrypto. SHA2 is default if device has libcrypto.

Change string MD5 everywhere to use digest or Digest instead. Updated
string tags to digest. Translation will be required.

Switch out digest code into a driver class from partitionmanager.

SHA2 is better for digest creation due to decreased collision space
compared to MD5 and SHA1.

See https://en.wikipedia.org/wiki/SHA-2

Change-Id: I74b5546789990b12aa4ce2e389d25f80a3fe213f
2017-06-17 07:05:45 -05:00