Compare commits

..
Message SHA1
readme update
j4nn   commited 2025-12-06 20:08:00 +02:00
03fdcfac12
add twrp check list and build instructions into readme
template picked from twrp device tree for Samsung Galaxy S25
https://github.com/TeamWin/android_device_samsung_pa1q
android-12.1

j4nn   commited 2025-10-11 19:54:13 +02:00
7d7b0263af
5 changed files with 82 additions and 20 deletions

View file

@ -21,11 +21,11 @@ PRODUCT_MAKEFILES := \
$(LOCAL_DIR)/twrp_akatsuki.mk
COMMON_LUNCH_CHOICES := \
twrp_akari-ap2a-eng \
twrp_akari-ap2a-userdebug \
twrp_apollo-ap2a-eng \
twrp_apollo-ap2a-userdebug \
twrp_aurora-ap2a-eng \
twrp_aurora-ap2a-userdebug \
twrp_akatsuki-ap2a-eng \
twrp_akatsuki-ap2a-userdebug
twrp_akari-eng \
twrp_akari-userdebug \
twrp_apollo-eng \
twrp_apollo-userdebug \
twrp_aurora-eng \
twrp_aurora-userdebug \
twrp_akatsuki-eng \
twrp_akatsuki-userdebug

View file

@ -137,7 +137,7 @@ TW_MAX_BRIGHTNESS := 1023
TW_THEME := portrait_hdpi
TW_EXCLUDE_DEFAULT_USB_INIT := true
TW_EXTRA_LANGUAGES := true
#TW_INCLUDE_CRYPTO := true
TW_INCLUDE_CRYPTO := true
TW_INCLUDE_NTFS_3G := true
TW_INCLUDE_PYTHON := true
TW_INCLUDE_RESETPROP := true

View file

@ -7,22 +7,68 @@
- Xperia XZ2 Premium H8116/H8166 => [aurora](https://www.gsmarena.com/sony_xperia_xz2_premium-9166.php)
- Xperia XZ3 H8416/H9436/H9493 => [akatsuki](https://www.gsmarena.com/sony_xperia_xz3-9232.php)
## Clone manifest twrp-14.1
## Checks
Blocking checks
- [x] Correct screen/recovery size
- [x] Working Touch, screen
- [x] Backup to internal/microSD
- [x] Restore from internal/microSD
- [x] reboot to system
- [x] ADB
Medium checks
- [x] update.zip sideload
- [x] UI colors (red/blue inversions)
- [x] Screen goes off and on
- [x] F2FS/EXT4 Support, exFAT/NTFS where supported
- [x] all important partitions listed in mount/backup lists
- [x] backup/restore to/from external (USB-OTG) storage
- [x] decrypt /data
- [x] Correct date
- [x] USB-OTG (flash drive)
Minor checks
- [x] MTP export
- [x] reboot to bootloader
- [x] reboot to recovery
- [x] poweroff
- [x] battery level
- [x] temperature
- [ ] encrypted backups
- [x] input devices via USB (USB-OTG) - keyboard and mouse
- [x] USB mass storage export
- [x] set brightness
- [x] vibrate
- [x] screenshot
- [x] partition SD card
- [x] fastbootd (adb reboot fastboot)
- [ ] decrypt adoptable storage
- [x] reboot to EDL
## Clone manifest twrp-12.1
```bash
repo init -u https://github.com/minimal-manifest-twrp/platform_manifest_twrp_aosp.git -b twrp-14.1
repo init -u https://github.com/minimal-manifest-twrp/platform_manifest_twrp_aosp.git -b twrp-12.1
```
## Sync manifest twrp-14.1
## Sync manifest twrp-12.1
```bash
repo sync -j$(nproc --all)
git clone https://github.com/minimal-manifest-twrp/android_device_common_version-info -b twrp-12.1 device/common/version-info
```
## Clone the device tree
```bash
git clone https://github.com/j4nn/android_device_sony_tama.git -b android-14.1 device/sony/tama
git clone https://github.com/j4nn/android_device_sony_tama.git -b android-12.1 device/sony/tama
```
## Optional patch to support SODP roms too
```bash
patch -p1 < device/sony/tama/patches/vold-decryption-workaround-for-sodp-kernel.patch
```
## Build
@ -35,10 +81,10 @@ export ALLOW_MISSING_DEPENDENCIES=true
. build/envsetup.sh
export USE_CUSTOM_VERSION=true
lunch twrp_akari-ap2a-userdebug; mka bootimage
lunch twrp_apollo-ap2a-userdebug; mka bootimage
lunch twrp_aurora-ap2a-userdebug; mka bootimage
lunch twrp_akatsuki-ap2a-userdebug; mka bootimage
lunch twrp_akari-userdebug; mka bootimage
lunch twrp_apollo-userdebug; mka bootimage
lunch twrp_aurora-userdebug; mka bootimage
lunch twrp_akatsuki-userdebug; mka bootimage
```
## Thanks

View file

@ -58,9 +58,6 @@ PRODUCT_SOONG_NAMESPACES += \
# Copy modules into initramfs /sbin
PRODUCT_COPY_FILES += $(call find-copy-subdir-files,*.ko,$(COMMON_PATH)/prebuilt/modules,$(TARGET_COPY_OUT_RECOVERY)/root/sbin)
# trying to workaround a build failure with 14.1 branch - did not help - copy the file manually there :-(
#PRODUCT_COPY_FILES += $(COMMON_PATH)/recovery/task_profiles.json:$(TARGET_COPY_OUT)/system/etc/task_profiles.json
# Prebuit files for recovery ramdisk
PRODUCT_COPY_FILES += \
$(call find-copy-subdir-files,*,$(COMMON_PATH)/recovery/root,$(TARGET_COPY_OUT_RECOVERY)/root)

View file

@ -0,0 +1,19 @@
Subject: [PATCH] system/vold: disable support for FS_IOC_ADD_ENCRYPTION_KEY
this workaround is needed to make decryption with SODP kernel 4.14 working in twrp
project system/vold/
diff --git a/system/vold/KeyUtil.cpp b/system/vold/KeyUtil.cpp
index 9273564..28628aa 100644
--- a/system/vold/KeyUtil.cpp
+++ b/system/vold/KeyUtil.cpp
@@ -87,7 +87,8 @@ static bool isFsKeyringSupportedImpl() {
if (errno != EFAULT) {
PLOG(WARNING) << "Unexpected error from FS_IOC_ADD_ENCRYPTION_KEY";
}
- LOG(INFO) << "Detected support for FS_IOC_ADD_ENCRYPTION_KEY";
+ LOG(INFO) << "Detected support for FS_IOC_ADD_ENCRYPTION_KEY, but returning false!";
+ return false;
android::base::SetProperty("ro.crypto.uses_fs_ioc_add_encryption_key", "true");
return true;
}