Commit Graph

10931 Commits

Author SHA1 Message Date
bigbiff
ab76bd7324 vab: correct default properties when vab is enabled
- do not show vab options in advanced
- do not perform merges when vab is disabled

Change-Id: I20997eca515600cb07fe896305b861ee9418c326
2021-10-16 16:29:46 +00:00
Captain Throwback
692a9e14d8 init.rc: add /dev/fscklogs for fs_mgr support
Change-Id: I6d00c45d94b732f60fd13343c2730f2ea924155e
2021-10-14 13:23:42 -04:00
bigbiff
b640d972a6 readonly: fix condition showing readonly checkbox
Non dynamic partition devices need this if accidentally
turned off.

Change-Id: I0a212a8fc6446dfa6d82cf1103f4e4e80e680f89
2021-10-13 17:35:31 +00:00
Captain Throwback
37c3aef4e8 crypto: only set crypto state and type if not already set
Move setting crypto state and type to functions and call those
functions rather than arbitrarily setting those props in every
case. This cleans up all the log spam from trying to set
read-only props, since they will now only get set if
they aren't already.

Change-Id: I392bee060d71c6ee50d0d92bf1b118d9049be41a
2021-10-06 22:27:49 +00:00
Captain Throwback
8a8e56cd60 crypto: only show FBE error if device is encrypted
Change-Id: I60da4ff71a15e5bc4e13135abf268bff1c88b8d1
2021-10-06 22:02:32 +00:00
bigbiff
616276167d digest: fix checking of digest on restore
Change-Id: I40ec9848248b9cc62919535c5493090d80cd732a
2021-10-06 17:04:06 -04:00
micky387
2596960451 recovery: Allow kernel to read and write unlabeled files
10-04 09:32:55.504   626   626 W kworker/6:3: type=1400 audit(0.0:1498): avc: denied { read } for name="bat_health" dev="sde50" ino=13 scontext=u:r:kernel:s0 tcontext=u:object_r:unlabeled:s0 tclass=file permissive=0
10-04 10:34:15.124   397   397 W kworker/6:1: type=1400 audit(0.0:1494): avc: denied { open } for path="/batinfo/bat_health" dev="sde50" ino=13 scontext=u:r:kernel:s0 tcontext=u:object_r:unlabeled:s0 tclass=file permissive=0
10-04 10:36:49.484   399   399 W kworker/6:2: type=1400 audit(0.0:1366): avc: denied { write } for name="Batpercentage" dev="sde50" ino=15 scontext=u:r:kernel:s0 tcontext=u:object_r:unlabeled:s0 tclass=file permissive=0

Change-Id: Ib22560ca9149b729529797b004bcb2ee4879c317
2021-10-05 23:16:32 +00:00
Captain Throwback
63573b550f mtp: don't create storage device after format data
Since we don't re-create data/media on FBE devices,
don't create an MTP storage device for it.

This fixes the bug when, after formatting data on
and FBE device, an empty Internal Storage appears
on the PC.

This also prevents an empty storage device from
being created if recovery is rebooted after formatting
data before booting to Android. A warning will appear
in the console that MTP is disabled in that case.

Currently the path is hardcoded to data/media; this
should probably be adjusted for cases where adoptable
storage is being used.

Change-Id: Iaafc5e3cde54c3ef6ffaf33f76d14c626b6e590d
2021-10-05 22:53:07 +00:00
Captain Throwback
210ebe3d46 repacker: add root overwrite warning
Change-Id: Ica03c62a04872cb0ff4705810a0e85efde0b0b54
2021-10-05 22:33:00 +00:00
bigbiff
d21252f1b5 merges: allow user to perform snapshot merges in advanced menu
Change-Id: I894a0ef5a0ec8e208053358f09a6b8a6d4ee408a
2021-10-05 22:32:19 +00:00
bigbiff
543a928359 default fstab: only read the fstab if it hasn't been read yet
Change-Id: I0d8d5cdda4da5486f51a80772f9d581bf549138c
2021-10-03 16:58:45 +00:00
bigbiff
cefb0de23f fscrypt policy: don't bail restore if we cannot lookup policy
When TWRP is unable to lookup a fscrypt policy, we should not bail
the entire restore. Let's note that we had an issue with the lookup
in the log and continue restoring.

Change-Id: Ida80458356c12f81ff47f583beb05dd392486a0d
2021-10-02 13:52:26 +00:00
bigbiff
d04f8e0078 libmodprobe: move include to global includes
Change-Id: I288ce0dcd22d5a5a5badd2a98460cec027010eac
2021-10-02 13:47:29 +00:00
bigbiff
13017c6e35 version: don't show as error if we cannot write the version string
Change-Id: I0f90337b22f1c3392eb5bc7b846d60df82a4af8b
2021-10-01 22:35:58 +00:00
Captain Throwback
8f71b5a7ec en.xml: fix capitalization
Change-Id: Ib67db5eb0ab7cf2b54622d69299edbb2e216a210
2021-10-01 18:23:41 -04:00
bigbiff
e3aa02ea25 module_load: stop once all modules are loaded
This patch set was inadvertently removed when
the original patch was merged

Change-Id: I109882c9138524b9b912ed2a933e2e30c218d371
2021-10-01 13:53:22 -04:00
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
bigbiff
437d86f6a0 wrappedkey: don't use twrp for processing anymore
Now in android-11 we can now process legacy and newer wrappedkey
support in our libfscrypt library. TWRP doesn't need to set a
property to check for wrapped key. libfscrypt will just process
wrappedkey fs_mgr flag for legacy wrapped key or wrappedkey_v0
for the newer wrapped key supported in android-11.

Change-Id: Ia94c7ebe34a05c9b25bbb7a5b2e899902c93d203
2021-09-28 00:53:32 +00:00
systemad
db475c9015 f2fs format: Remade f2fs command
Main reason for this change was to add proper support for casefolding and project id quota
so I adapted how the command was built, similar how the AOSP recovery crafts it.

Your device tree also need to include this
$(call inherit-product, $(SRC_TARGET_DIR)/product/emulated_storage.mk)

references:
https://android.googlesource.com/platform/bootable/recovery/+/refs/tags/android-11.0.0_r29/recovery_utils/roots.cpp#246
https://source.android.com/devices/storage/sdcardfs-deprecate

Change-Id: Id45b8ed33fe4f2317f0559ef77423f70d892b91c
2021-09-27 20:20:07 +00:00
bigbiff
bcd23d3e0c wrappedkey: import fixes from lineage
vold: Enable legacy support for wrapped key

Legacy wrapped key support was dropped while merging changes
to support multiple versions of dm-default key driver in kernel.
Fix this by calling legacy API to check wrapped key support for
metadata encryption.

CRs-Fixed: 2678344
Change-Id: I7d9efec09ddf7169cf0b1114b4e16b9fe38cad4b
Signed-off-by: Neeraj Soni <neersoni@codeaurora.org>

 system: vold: Use wrapped key for metadata encryption

Wrapped key feature is needed for better security of encryption keys and
to
ensure data integrity when crypto key cache is cleared during reset
operation
of storage/crypto hardware.

Original patch:
https://source.codeaurora.org/quic/la/platform/system/vold/commit/?h=LA.QSSI.11.0.r1-05600-qssi.0&id=c480f913e6abc2757c0d79afba5a3df1c4adc731
[Pig]: Clean up all deprecated codes that were removed during latter
merge.

CRs-Fixed: 2367150
Change-Id: I83d14861bf81e102151fa3417d84008c214a9ac0

 vold: Bring in more wrapped key changes

Change-Id: I44e81afaec78c567a0bf2eed30a79eb737e2a867
2021-09-27 20:18:37 +00:00
bigbiff
aed1bdfe59 get_args: process /data/cache/command
Change-Id: I744cdc5a72f53fd1224de242e30ff261e6104900
2021-09-25 20:52:58 +00:00
bigbiff
b2cce1055e screen blank: maintainer should specify in Board whether to disable
Change-Id: Id7dfea1ed9391d5a5f617b72a25fdb74dc235537
2021-09-25 15:33:19 +00:00
Captain Throwback
bc2cfa36ec Add exclusion criteria for "Fix Recovery Bootloop"
Should only be included on devices that use initramfs,
i.e. legacy SAR, recovery-in-boot

Change-Id: I2408fcd993e1e381f49b3d5ae860694b2fade4d2
2021-09-16 10:42:06 -04:00
Captain Throwback
529789380b copy log: add option to include logcat
Change-Id: I9689df4560d5209f385fbbc3e233859754b3ebbd
2021-09-07 03:03:16 +00:00
bigbiff
2485980a9a cleanup: remove unneeded headers
Change-Id: I0849406c635ebf85f90efd09f5452b6570d25487
2021-09-05 21:59:18 +00:00
Captain Throwback
b326961682 etc: include hwservicemanager for TW_INCLUDE_CRYPTO
A recent change removed the inclusion of hwservicemanager
and vndservicemanager with only this flag

Change-Id: I9b8cb05a6bd053b794599167bcc8bf0591b2e184
2021-09-04 15:06:54 +00:00
nebrassy
afb12eec15 repacker: adjust unpack command to fix compression issues
Change-Id: I027fd3bd86be858234daa82ef012254762949372
2021-09-02 10:18:49 -04:00
bigbiff
9dbd1fdf3c twres: change how build directory is determined
Change-Id: I1af103bc276828e9ec07e20becf9df59c9535478
2021-09-01 19:38:54 -04:00
bigbiff
e57d350820 bootctrl: TWRP shouldn't mark slots unbootable
Change-Id: I776916d42927ca5e12c4e6a416cc02d2c84d5cec
2021-08-29 19:46:08 +00:00
Mohd Faraz
29cab7f160 etc: vndservice and hwservice managers are required by other hals
* Export vendor paths for boot-hal as some libs are present in vendor
 * hwservicemanager and vndservicemanager are also required by health hal amd boot hal

Change-Id: I9017e0692cdb917db86629588726ba11eafd1e81
Signed-off-by: Mohd Faraz <androiabledroid@gmail.com>
2021-08-28 23:54:49 +00:00
soulr344
f831bff1e1 events: fix haptics on newer Samsung devices
Newer Samsung devices have a single file that enables/disables/sets the timeout for vibration in /sys/class/timed_output/vibrator/enable
The content of the file determines the state of the vibrator, 0 being vibrator being off and any other value being the time in ms that the vibrator is going to run before resetting to 0 again.

Change-Id: I1144e139285494e43b8656229ad6df10d5b48f39
Signed-off-by: soulr344 <soul@totsuka.gq>
2021-08-28 22:36:27 +00:00
Captain Throwback
2bf400c47c etc: don't start both health-hal services automatically
should be started in device tree init.recovery.rc

Change-Id: Ie2711a8053d0ad9dacd6d337f7a1902c9320334f
2021-08-28 21:43:18 +00:00
bigbiff
e3742ef616 openaes data encryption: turn off by default
Until the code can be removed, we will turn off openaes encryption
of data files by default. There are many restore issues that are
caused with openaes enabled. For maintainers who want to enable it
set TW_EXCLUDE_ENCRYPTED_BACKUPS := false on BoardConfig.

Change-Id: Ie284b03c7cc4c77a0a9dbcc460817fe3fe08b839
2021-08-28 21:04:16 +00:00
bigbiff
998f839e82 super processing: use logical flag to denote super status
To support all partitions that are on the super partition
we now parse for the logical flag in fstab to denote super
status.

- Remove guards for the first character being '/'.
- Skip commented lines in fstab
- Build Backup_Display_Name from partitions in super.
The first four lines that are in fstab will be
displayed.
Change-Id: I3f8980187bd4a136257dd6eeaeddd7ea71706cd3

Change-Id: I1ee7c02f91aafb646beaf401a43bcb22fa8c8c7a
2021-08-28 17:48:23 +00:00
Captain Throwback
878abc76c2 Run Update_System_Details during fstab processing
Fixes issue where devices where encryption failed wouldn't
have partition information until after an action was run

Change-Id: I1c50ceaa56d67bfbc330bfa77300512a6e3034c0
2021-08-27 19:21:36 -04:00
bigbiff
01dc4585f8 mtp: import fix for cpu utilization
commit f2388b3c23754f33f9bba1f73c0b2ca57f00e546
Author: James Wei <jameswei@google.com>
Date:   Tue Dec 18 17:39:58 2018 +0800

    MTP: CPU usage high while under MTP mode.

    poll timeout not setting well in MTP ffs handler.
    This will cause MTP ffs handler not going into sleep mode.

    Bug: 121171744
    Test: MTP 500 Mbyte file copy throughput from / to Host (no drop)
    Change-Id: I9b8a7257670b8e536bf2ea81118d297211254984

Change-Id: Ic79f6b04334074c73b62325b53112719ba29255d
2021-08-27 18:24:59 -04:00
Ethan Yonker
5f3b8f0103 Fix permissions on last_log.gz
Change-Id: I4c56bd01551d3f7301f471e4d342a0620c7b4971
2021-08-22 22:47:39 +00:00
Ethan Yonker
deeefbdec4 Stop using boot HAL when decrypting fscrypt
Change-Id: Ia7aaf6b86c5ca456fd6651e776f4d6423b09f02e
2021-08-22 22:47:02 +00:00
Mohd Faraz
7fc7050b6d partitionmanager: Symlink dynamic partitions to /dev/block/boot/device/by-name/
Signed-off-by: Mohd Faraz <androiabledroid@gmail.com>
Change-Id: Iebebe9234723bcda863098cdff6ed41e7b410e78
(cherry picked from commit a7c22b56ba9b6e2f3fb90edbde7ec206b7eca8d5)
2021-08-15 23:01:09 +00:00
nebrassy
ac29e691d8 Add an option to one click flash current booted TWRP ramdisk
Change-Id: I12303696698a5feaa43401bcac9e30d5b3b99a0c
2021-08-09 23:05:14 +00:00
bigbiff
cfa875c4d4 vab support: merges and unmapping super devices
- check for merges before formatting data
- add advanced option for unmapping super devices

Change-Id: I38d4d3bbdfa071969016c3e000c86a4d03c71e45
2021-08-09 23:04:33 +00:00
bigbiff
d1e556a9a2 repack: fix bad rebase
Change-Id: Ic266b48e0a94c18dfc942e1214b38e6a0f2e8100
2021-08-07 14:34:06 -04:00
nebrassy
7378254120 repack: correctly recompress ramdisk to the format of boot image
Change-Id: I90df3d2f63eb82a185d9af0d68e61c955cee9403
2021-08-07 17:56:57 +00:00
bigbiff
74a46278c3 repacker: override slot for flashing images instead of using bootctrl
Bootctrl is being unreliable during repacking. This overrides the slot
while repacking recovery in boot.

Change-Id: I0a04357af4e5f24591792bcfb27ccbd10b0a813b
2021-08-07 17:56:19 +00:00
nebrassy
76224bde3d Support AIDL Vibrator
co-authored by: SebaUbuntu <barezzisebastiano@gmail.com>

Change-Id: Ifaa0af4cb0fe0dee7d2a9ad4c58a5ede5ce46d59
2021-07-31 18:52:01 +02:00
bigbiff
a15d02f885 vab: exclude gsi
Change-Id: I00d4b4f19aafcaf87ad951ba4f1cb7e3fe84ced8
2021-07-26 19:20:57 -04:00
nebrassy
45f66b2c58 Repacker: refresh sizes before backing up boot
Change-Id: I001295739cb71fdbfc3c3bfe5cc150dc5215867c
2021-07-26 23:13:51 +00:00
Ctapchuk
5c10257865 Update Russian language, sync with en.xml
Change-Id: I8af2239735a800a7c883931ac3531440cc7f7758
2021-07-17 14:51:32 +00:00
bigbiff
2d54867daa fbe formatting: add warning for fbe devices and remove unused string
Change-Id: Id7af18a4c39932d8685e3265bfa158494ffd10f0
2021-07-17 00:14:21 +00:00
bigbiff
70cf814036 gui makefile: this file is redundant and handled by Android.bp
Change-Id: Ia51a0300709b88636125b7131b769000254a40db
2021-07-07 20:20:14 +00:00