On some devices, having the vendor partition mounted
causes slot switching to fail ("Error getting bootctrl module")
Automatically unmount vendor partition prior to switching
slots to ensure the process completes successfully.
Use lazy unmount if Unmount_by_Path function fails.
TEST: Mount vendor partition, then switch slots.
Vendor partition should be unmounted when
switching completes
Change-Id: If6198d4693141be464749c4d423a9088753d939e
fastbootd is a userspace daemon that runs in the recovery
ramdisk. It allows writing single partitions to the super
partition via fastboot CLI. When TWRP sees the fastboot option
in the misc partition during startup, it will start with
the fastbootd page and fastbootd running. Otherwise it will
run recovery normally.
Change-Id: Id7b12d29ef21dbd5950dc884dd1cd788f25357f0
If the prop persist.twrp.rotation is set to 0, 90, 180, or 270,
that will be used. If the prop is not set, the existing rotation
board config flags will be honored.
Note: This flag will only rotate graphics. If a set of devices
needs differing touch rotation, that support will need added
separately.
Change-Id: I6996c07bc0ae7bb8555b3d480b2917a17a365eb3
hwservicemanager and servicemanager are needed for decryption
and fastbootd in TWRP. Include these services by default since
they are standard Android services and independent of device
tree or SoC.
Change-Id: Id0ec73d9a6ca0289c7b4f67e9dcf541b2157c04e
* Since some devices are unable to decrypt after processing of the fstab,
because of the partition details updation, and after intro of dynamic partitioning
here decryption process was going on after complete processing of the dynamic volumes.
* This patch fix these issue, it process the logical volumes at their time not after all processing fstabs.
This fixes the decryption issue.
Translate more partitions i.e., ODM, Product.
Added more partitions in unmount partitions.
Change-Id: I977c0cf0c40e5311f54a78c98f1fd89f71c6ac57
Signed-off-by: Mohd Faraz <androiabledroid@gmail.com>
for android-10
This will support updating the ramdisk to a different
compression format and co-exist with magisk.
We are also cleaning up and removing non android-10
api makefile actions.
We are also moving twrp repacking to its own class. We
check the new ramdisk format and if it's different
we have magisk compress using the new ramdisk format.
Change-Id: I770030aae7797e75817178b2f0fccd9f39dc23af
* Added all missing strings
* Translated some English strings in the German language file
* Changed ZIP notation to "ZIP" to be consistent in the translation
Change-Id: I27812c7f79c95258363772481f71253b8b505e28
(cherry picked from commit 6c70991a72820b390185b6de923a3694dce3cf44)
partitions.
Too many problems have been reported for TWRP attempting to store
logs in the persist partition. Selinux denials have caused issues
booting Android, and filling up persist has caused IMEI issues.
This patchset will remove persist from the list of available log
directories by default in order to avoid these and other possible
issues.
Change-Id: I29889d69f76270a8fbb764a79be3523821d8579c
When running e2fsdroid on persist, lost+found doesn't have any
entries in file_contexts. We are removing the lost+found directory
after a wipe now, and before the restore of the tar.
Change-Id: If5db0971884e296fae0211ff4806f3e16e394632
Change-Id: I9fa51dc9ef558cd82445df9a8fa377b1feda11aa
* missed in 3754fabbea
Change-Id: I8fc3719e7f98c3d9b5fd96a9820b84773d4f5d7d
Signed-off-by: Mohd Faraz <androiabledroid@gmail.com>
(cherry picked from commit 25371a7e1f7f7d690755e3b12140b39567456a98)
This patchset is now exlcuding /data/cache from backup, and removing it
from the wipe exclusion list to prevent errors on restore and wiping
/data.
This patchset changes the directory from /data/cache to /data/recovery for TWRP
to store logs and other file information. This will help with AB
devices that don't want recovery to mess with /data/cache.
This patchset will make ORS use /data/cache for AB devices.
Remove policy code because we don't need to set a policy for the
recovery directory.
Change-Id: I1d140276314fd34804a72297d6e25a52e58210a0
This setting in the board will help if it takes longer
for the touchscreen driver to initialize.
Use TW_DELAY_TOUCH_INIT_MS := nnnn where nnnn is in MS.
Change-Id: I0a5c602edfe1214d64adadc980921a7bc0aa2bc5
(cherry picked from commit c6e2cfecce019d70ed5de74611761a2546e34828)
fscrypt aosp doc: https://source.android.com/security/encryption/file-based
kernel fscrypt doc: https://www.kernel.org/doc/html/v4.18/filesystems/fscrypt.html
This commit implements the ability for TWRP to use fscrypt to decrypt
files on the fscrypt implementation. It has been implemented mostly
in a new successor library to e4crypt called libtwrpfscrypt. Most of the
code was ported from AOSP vold.
Notable updates include:
- updated policy storage by libtar
- lookup of fbe policies by libtwrpfscrypt
- threaded keystore operations
Big thanks to Dees_Troy for the initial trailblazing
of encryption in TWRP.
Change-Id: I69cd2eba3693a9914e00213d4943229635d0cdae
Some of the partitions will not be unmount automatically. They shouldn't
be mounted by default.
Bugs:
DM_DEV_REMOVE failed for [product]: Device or resource busy
Cannot unmap product before removing group qti_dynamic_partitions.
script aborted: assert failed: update_dynamic_partitions(package_extract_file("dynamic_partitions_op_list"))
assert failed: update_dynamic_partitions(package_extract_file("dynamic_partitions_op_list"))error: 25
Updater process ended with ERROR: 7
Change-Id: I7cbd5c29456ca2731b94a69bbf9ad77058cef09c
This function will automatically decrypt .ozip file in a .zip and it will
save the .zip in the same folder of the .ozip and with the same name.
After the decryption, the flash will start.
To enable this function you have to set a Boardconfig flag with the
decryption key like i did here:
a30625f80a
Original projects:
https://github.com/sabpprook/ozip2ziphttps://github.com/bkerler/oppo_ozip_decrypt
Change-Id: Ic93243a565008c442bcf2992069b2801532ac7c1
(cherry picked from commit 0ff59845f2f8dddedb4cee9a9faf86a6294cce66)
- Should not be determined by whether support exists in TWRP
- Set to 0 by default if FBE is not detected
This also prevents the wrappedkey check from running
on FDE devices
Change-Id: I85d1952facdfafdaa1571fc1b11d4b4b7d9ba48e
(cherry picked from commit cf0dffce3413261f149a3565d8f27cb32490ae54)
For example now in Install menu we are seeing all files with .zip
extension, after this commit we can see also files with .ZIP extension.
Just add the extension between ";" separator.
Change-Id: I6ddd2a812a182570af3d76711b1e3e13740a466b
(cherry picked from commit 27020944c2472c28b12ceccf676d58c2709af890)
Building with TW_OEM_BUILD results in errors during compilation:
error: unused label 'error' [-Werror,-Wunused-label]
error: unused parameter 'allow_commands' [-Werror,-Wunused-parameter]
These changes are required to allow compilation to complete.
Change-Id: Iddc5bf1b90120de19a472c48b21d3531b758cacf
(cherry picked from commit 0cd6be903b3129b30d5abe40d3a0f30545eef27d)
* since commit: a2bd7b7758
after factory reset /data/recovery doesn't recreates in A-only devices.
* so fixes issue flashing newer roms need access to /data/recovery
Signed-off-by: Mohd Faraz <androiabledroid@gmail.com>
Change-Id: I02cb67f7161571b1aa02784049231d42872a3587
Signed-off-by: Mohd Faraz <androiabledroid@gmail.com>
(cherry picked from commit bcbe94e2b5ef83fe65a5c9767287802365b5ee4e)
* Needed for the LG V30, G7, V35, V40
* Use TW_HAPTICS_TSPDRV in your BoardConfig.mk to enable it.
Change-Id: I0970ed5c046e851f7e6f562283523c7214c8d2b5
(cherry picked from commit 314cbd5698d1750a31c9cf4284d3ce8dfadce157)
This patch uses the loop device to mount files under
/sbin/ from /system/apex in order for the device to
use libraries or other files store inside these files.
Each apex file is mounted over a loop device into a
directory correpsonding to the apex filename under
/sbin/.
Once apex mounting is completed, TWRP will set a
property twrp.apex.loaded to true so that init
can use them as a LD_LIBARY_PATH source.
Change-Id: I69f14a969123ac9cf1afc85b6cf76836cb092fb2
Change-Id: Ica6a7d8e479bcaec8bec4483b5e8d2b45ee105fb