Commit graph

37 commits

Message SHA1
add build instructions into readme
j4nn   commited 2025-12-06 21:04:13 +02:00
8fafe78935
initial attempt for 14.1 branch
addapt lunch targets and disable twrp decryption that fails to build

j4nn   commited 2025-10-11 20:09:28 +02:00
f4ed0dd61a
remove vold patch used to support decryption with sodp roms
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

j4nn   commited 2025-10-11 19:23:50 +02:00
a10a01391d
try to support 14.1 branch
an initial attempt that seems to be ok also with 12.1 branch

j4nn   commited 2025-10-11 18:55:44 +02:00
df2f4b3601
add kernel patches included in prebuilt kernels
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'

j4nn   commited 2025-10-11 15:23:26 +02:00
e50c0aedc7
add support for usb mass storage mode for micro SD card
be sure to configure usb mass storage gadget parameters in advance
in order to avoid not working defaults with cdrom limitations

j4nn   commited 2025-10-11 12:43:07 +02:00
bb2e4da9d9
enable possibility to adb reboot to twrp userspace fastboot mode
this is just for experimentation, tama has fastboot in bootloader

j4nn   commited 2025-10-11 08:20:45 +02:00
7b8163bc7f
fix decryption support with tama SODP roms
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

j4nn   commited 2025-10-05 23:58:24 +02:00
7a67f17a75
clone qcom recovery rc to device named recovery rc script
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

j4nn   commited 2025-10-05 23:42:34 +02:00
3e3646cfcb
fix touch setup script to work with stock roms
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

j4nn   commited 2025-10-05 22:01:16 +02:00
3da13412ce
clean up recovery fstab and related twrp flags file
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

j4nn   commited 2025-10-05 16:25:39 +02:00
8ab3578500
enable twrp blkdiscard and support for encrypted backups
also skip additional fstab files to start fstab cleanup

j4nn   commited 2025-10-05 15:15:42 +02:00
95524bd3c0
minor changes of prep touch script
j4nn   commited 2025-10-05 13:07:30 +02:00
33c0e669e2
add touch auto detect setup script
picked from tama devices twrp by MartinX3 as available here
https://github.com/MartinX3-AndroidDevelopment/TWRP_android_device_sony_akari_old
android-9.0

and from twrp builds available at https://www.dhsfileserver.de/ftp/martinx3/

explicit set of permissive mode seems to be needed during restore of twrp backup
for some reason (it might be depending on used rom) so picking that too

j4nn   commited 2025-10-05 12:57:19 +02:00
5bf734cda3
add setup for userdata decryption
and also start boot hal and health hal as they are needed on boot

j4nn   commited 2025-10-05 10:45:49 +02:00
71358d57c3
remove fstab entries that seem to get duplicated
j4nn   commited 2025-10-05 02:13:24 +02:00
4182a9caf1
add twrp.flags for tama devices
j4nn   commited 2025-10-05 01:07:43 +02:00
8c3bc02eb9
add prebuilt kernels and modules for xz2, xz2c, xz2p and xz3 devices
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

j4nn   commited 2025-10-05 00:10:11 +02:00
298abbb3f7
fix ueventd rule that caused errors appear in log
j4nn   commited 2025-10-04 23:48:18 +02:00
ba5d725f55
common board config for sony tama devices
merged twrp settings specific for tama devices from old twrp repository by MartinX3
https://github.com/MartinX3-AndroidDevelopment/TWRP_android_device_sony_akari_old
android-9.0

tried to review the merged setup against current twrp android-12.1 branch code base

enabled reboot to EDL option usable with our prebuilt kernels

j4nn   commited 2025-10-04 23:31:56 +02:00
0239be5285
add recovery fstab picked from tama Lineage OS rom
not sure if needed in twrp if we define twrp.flags file

j4nn   commited 2025-09-28 23:46:49 +02:00
0f12e7ad2c
avoid duplicity of usb configfs stuff in different rc scripts
move few settings from init.recovery.qcom.rc to init.recovery.usb.rc

j4nn   commited 2025-09-28 20:03:15 +02:00
49ab352515
add recovery usb init rc script
from https://github.com/TeamWin/android_device_samsung_pa1q
android-12.1

j4nn   commited 2025-09-28 17:23:03 +02:00
febdfc2c18
add recovery main init script
pick this from tama lineage os

https://github.com/LineageOS/android_device_sony_tama-common.git
lineage-22.1

j4nn   commited 2025-09-28 16:33:55 +02:00
1e73de74c3
add xz2, xz2c, xz2p and xz3 twrp devices product makefiles
from sony oss 52.0.A.11.32-1 release package README_Xperia:

    Xperia XZ2 H8216/H8266/H8296    => akari_diffconfig
    Xperia XZ2 SO-03K               => akari_dcm_diffconfig
    Xperia XZ2 SOV37                => akari_kddi_diffconfig
    Xperia XZ2 702SO                => akari_sbm_diffconfig
    Xperia XZ2 Compact H8314/H8324  => apollo_diffconfig
    Xperia XZ2 Compact SO-05K       => apollo_dcm_diffconfig
    Xperia XZ2 Premium H8116/H8166  => aurora_diffconfig
    Xperia XZ2 Premium SO-04K       => aurora_dcm_diffconfig
    Xperia XZ2 Premium SOV38        => aurora_kddi_diffconfig
    Xperia XZ3 H8416/H9436/H9493    => akatsuki_diffconfig

template picked from twrp tree for asus rog phone 3
https://github.com/TeamWin/android_device_asus_I003D
https://github.com/TeamWin/android_device_asus_sm8250-common
android-12.1

j4nn   commited 2025-09-28 14:45:32 +02:00
a8591b0d07
add device mk for sony tama devices
picked the template from twrp asus sm8250-common

https://github.com/TeamWin/android_device_asus_sm8250-common
android-12.1

also added hooks to copy prebuilt modules and binary blobs

j4nn   commited 2025-09-28 11:58:33 +02:00
1bd75bdeba
add android mk for akari and apollo devices
picked the template from twrp asus sm8250-common
https://github.com/TeamWin/android_device_asus_sm8250-common
android-12.1

j4nn   commited 2025-09-28 08:27:48 +02:00
08346b313b
add missing gpt-utils kernel headers
picked from twrp's common gpt-utils
https://github.com/TeamWin/android_device_qcom_common
android-12.1

j4nn   commited 2025-09-27 23:55:27 +02:00
4a33531efd
pick bootctrl from tama common los 22.1 branch
https://github.com/LineageOS/android_device_sony_tama-common.git
lineage-22.1

j4nn   commited 2025-09-27 23:41:31 +02:00
6547bf0c7a
update decryption related blobs to support SODP roms
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

j4nn   commited 2025-09-27 21:24:12 +02:00
5aa3f7ae64
add akatsuki touch firmware from xz3 H8416-52.1.A.3.137 stock rom
vendor/firmware/touch_module_id_0x01.img

j4nn   commited 2025-09-25 21:22:37 +02:00
7457a9d8fe
add aurora touch firmware from xz2p H8166-52.1.A.3.49 stock rom
vendor/firmware/touch_module_id_0x04.img

j4nn   commited 2025-09-25 21:13:31 +02:00
faa1bbda76
add akari touch firmware from xz2 H8266-52.1.A.3.49 stock rom
vendor/firmware/touch_module_id_0x20.img
vendor/firmware/touch_module_id_0x21.img

j4nn   commited 2025-09-25 21:02:43 +02:00
543c53cb7d
add libops for qseecomd to resolve dlopen error
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

j4nn   commited 2025-09-24 23:59:42 +02:00
7518c8993e
add xz2 H8266-52.1.A.3.49 stock firmware blobs
these are not modified files unpacked from H8266-52.1.A.3.49 stock
firmware, mainly to support android userdata decryption

H8266-52.1.A.3.49/system/lib64/libion.so -> vendor/lib64/libion.so
H8266-52.1.A.3.49/vendor/bin/hw/android.hardware.gatekeeper@1.0-service-qti -> system/bin/android.hardware.gatekeeper@1.0-service-qti
H8266-52.1.A.3.49/vendor/bin/hw/android.hardware.keymaster@3.0-service-qti -> system/bin/android.hardware.keymaster@3.0-service-qti
H8266-52.1.A.3.49/vendor/bin/qseecomd -> system/bin/qseecomd
H8266-52.1.A.3.49/vendor/ueventd.rc -> vendor/etc/ueventd.rc
H8266-52.1.A.3.49/system/etc/event-log-tags
H8266-52.1.A.3.49/system/etc/task_profiles.json
H8266-52.1.A.3.49/system/etc/vintf/manifest.xml
H8266-52.1.A.3.49/vendor/etc/vintf/compatibility_matrix.xml
H8266-52.1.A.3.49/vendor/etc/vintf/manifest.xml
H8266-52.1.A.3.49/vendor/lib64/libGPreqcancel.so
H8266-52.1.A.3.49/vendor/lib64/libGPreqcancel_svc.so
H8266-52.1.A.3.49/vendor/lib64/libQSEEComAPI.so
H8266-52.1.A.3.49/vendor/lib64/libSecureUILib.so
H8266-52.1.A.3.49/vendor/lib64/libStDrvInt.so
H8266-52.1.A.3.49/vendor/lib64/libdiag.so
H8266-52.1.A.3.49/vendor/lib64/libdrm.so
H8266-52.1.A.3.49/vendor/lib64/libdrmfs.so
H8266-52.1.A.3.49/vendor/lib64/libdrmtime.so
H8266-52.1.A.3.49/vendor/lib64/libdrmutils.so
H8266-52.1.A.3.49/vendor/lib64/libdsutils.so
H8266-52.1.A.3.49/vendor/lib64/libidl.so
H8266-52.1.A.3.49/vendor/lib64/libkeymasterdeviceutils.so
H8266-52.1.A.3.49/vendor/lib64/libkeymasterprovision.so
H8266-52.1.A.3.49/vendor/lib64/libkeymasterutils.so
H8266-52.1.A.3.49/vendor/lib64/libkeystore-engine-wifi-hidl.so
H8266-52.1.A.3.49/vendor/lib64/libkeystore-wifi-hidl.so
H8266-52.1.A.3.49/vendor/lib64/libmdmdetect.so
H8266-52.1.A.3.49/vendor/lib64/libqdutils.so
H8266-52.1.A.3.49/vendor/lib64/libqisl.so
H8266-52.1.A.3.49/vendor/lib64/libqmi_cci.so
H8266-52.1.A.3.49/vendor/lib64/libqmi_client_qmux.so
H8266-52.1.A.3.49/vendor/lib64/libqmi_common_so.so
H8266-52.1.A.3.49/vendor/lib64/libqmi_encdec.so
H8266-52.1.A.3.49/vendor/lib64/libqmiservices.so
H8266-52.1.A.3.49/vendor/lib64/libqservice.so
H8266-52.1.A.3.49/vendor/lib64/libqtikeymaster4.so
H8266-52.1.A.3.49/vendor/lib64/librecovery_updater_msm.so
H8266-52.1.A.3.49/vendor/lib64/librpmb.so
H8266-52.1.A.3.49/vendor/lib64/libsecureui.so
H8266-52.1.A.3.49/vendor/lib64/libsecureui_svcsock.so
H8266-52.1.A.3.49/vendor/lib64/libspcom.so
H8266-52.1.A.3.49/vendor/lib64/libspl.so
H8266-52.1.A.3.49/vendor/lib64/libssd.so
H8266-52.1.A.3.49/vendor/lib64/libtime_genoff.so
H8266-52.1.A.3.49/vendor/lib64/vendor.display.config@1.0.so
H8266-52.1.A.3.49/vendor/lib64/vendor.qti.hardware.tui_comm@1.0.so
H8266-52.1.A.3.49/vendor/lib64/hw/android.hardware.gatekeeper@1.0-impl-qti.so
H8266-52.1.A.3.49/vendor/lib64/hw/android.hardware.keymaster@3.0-impl-qti.so

j4nn   commited 2025-09-24 23:50:26 +02:00
446b258884
include BoardConfigCommon from asus sm8250-common as a base
picked not modified BoardConfigCommon.mk from asus sm8250-common
https://github.com/TeamWin/android_device_asus_sm8250-common
android-12.1 e31fdba

j4nn   commited 2025-09-24 23:20:57 +02:00
d60fdab35f
initial commit for sony tama platform devices twrp configuration
just almost empty readme

j4nn   commited 2025-09-23 20:40:36 +02:00
e3f96dd957