the related code has been removed from vold with commit
"vold: remove session keyring workaround for old kernels"
so we will need to use SODP 4.14 kernel at least in order
to enable twrp data decryption in 14.1 branch
this is just for reference to known what is in the prebuilt kernels:
- patch to enable reboot to EDL with sony sdm845 tama platform kernel
- patch to disable skip_initramfs kernel command line option to support
'fastboot boot' way to boot into twrp from usb
- device tree overlay compatibility fix for sdm845 tama platform in
order to allow 'fastboot boot' into twrp even with recent LOS releases
- cherry pick 'tama: Disable AVB on /vendor' from LOS sony sdm845 kernel
- cherry pick 'somc: sdm845-tama-common: fix invalid thermal trips'
this patch needs to be applied to system/vold manually
the patch disables support for FS_IOC_ADD_ENCRYPTION_KEY ioctl that
twrp probes and uses if available, but if twrp uses this with SODP
kernel 4.14 decryption fails at the end
this workaround makes twrp use the older api => decryption works
this patch is not needed for more common stock kernel based roms,
like the official Lineage OS for Sony Xperia XZ2 / XZ2c / XZ2p / XZ3
this is for compatibility with sodp kernels that have
androidboot.hardware=akari and similar in kernel cmdline instead
of androidboot.hardware=qcom there
adding a common line at the end of device.mk instead of into all
twrp_*.mk files did not work for some reason ending with
build/make/target/product/gsi_keys.mk:19: error: _nic.PRODUCTS.[[device/sony/tama/twrp_akari.mk]]: "build/make/target/product/gsi_keys.mk.rc" does not exist.
09:04:38 dumpvars failed with: exit status 1
different stock fw versions (except the latest one) use kernel
not compatible with our prebuilt kernel modules so try to load
touch modules from vendor partition instead in such case
this is used only when prebuilt modules fail to load
and the running kernel does not have the support compiled
in either (i.e. most/all of custom roms do not need this)
modules are copied out from /vendor/lib/modules to /sbin
in order to allow insmod tool to load them - for some reason
insmod fails to load the modules directly from vendor partition
try to use recovery.fstab as primary fstab setup instead of twrp.flags,
moving most twrp fstab options there
tried to test adopted sdcard storage as available in Lineage OS,
decryption seems to be attempted by twrp but implementation seems
incomplete, so it fails to decrypt adopted storage partition
configured /sd-ext mount point for sdcard ext4 partition that can
be created via twrp partition sd card function
not using wildcard type of sysfs block device detection for usb otg
and sd card as that creates additional empty storage options in gui
most likely because it adds the parent (not partitioned) device too
like /dev/block/mmcblk0 or /dev/block/sdd with zero size
built from sony tama OSS package (not SODP), with following patches:
- added support for reboot into EDL mode
- adapted tama dts to be compatible with both stock fw and LOS builds
- disabled skip_initramfs kernel param to allow 'fastboot boot'
- disabled avb on vendor in device tree fstab as done in LOS
- cherry picked sdm845 tama common fix invalid thermal trips LOS patch
also add dtbo for each device prebuilt kernel
this is just for reference, built twrp can 'fastboot boot' if stock
dtbo is present (including stock based modifications done in Lineage
OS for tama devices - tested with LOS 22.1)
kernel modules are shared for all models
sony tama oss archive for stock fw version 52.1.A.3.49 available here:
https://developer.sony.com/file/download/open-source-archive-for-52-1-a-3-49-2
unfortunately this is not enough to make decryption work
with sony tama 4.14 SODP kernel, but at least it seems
to keep working with stock based 4.9 kernel and roms
the binaries are picked from SW_binaries_for_Xperia_Android_11_4.14_v5b_tama.zip
https://developer.sony.com/file/download/software-binaries-for-aosp-android-11-0-kernel-4-14-tama-v5
bin/qseecomd
lib64/hw/android.hardware.gatekeeper@1.0-impl-qti.so
lib64/hw/android.hardware.keymaster@3.0-impl-qti.so
lib64/libdiag.so
lib64/libdrmfs.so
lib64/libdrmtime.so
lib64/libdsutils.so
lib64/libGPreqcancel.so
lib64/libGPreqcancel_svc.so
lib64/libidl.so
lib64/libkeymasterdeviceutils.so
lib64/libkeymasterprovision.so
lib64/libkeymasterutils.so
lib64/libmdmdetect.so
lib64/libops.so
lib64/libqisl.so
lib64/libqmi_cci.so
lib64/libqmi_client_qmux.so
lib64/libqmi_common_so.so
lib64/libqmi_encdec.so
lib64/libqmiservices.so
lib64/libQSEEComAPI.so
lib64/libqtikeymaster4.so
lib64/librpmb.so
lib64/libspcom.so
lib64/libspl.so
lib64/libssd.so
lib64/libtime_genoff.so
it might be optional as it has not been present in tama stock
firmware, still there is following error logged without it:
QSEECOMD: : Init dlopen(libops.so, RLTD_NOW) is failed.... dlopen failed: library "libops.so" not found
so pick libops.so from twrp asus_sm8250-common
https://github.com/TeamWin/android_device_asus_sm8250-common
android-12.1