[Xperia Z1 General] o-l-a-v:
TWRP for Z1c amami & Z1 Honami

Thanks to [MENTION=3340721]funiewski[/MENTION] who inspired me/ teached me how to repack Z2 twrp to work with z1 and z1c.

This ain't my work! I've just been cooking with projects made by others. Thank TeamWin, [NUT], creator of Android Image Kitchen, and others :)

Use at your own risk!​

Download:

TWRP_v2.8.6.0_amami-f2fs_from_cm12.1_150423.img 11.6 MB - https://mega.co.nz/#!3gRwGZiK!sXMsMx1GGwUVkTCCsr8ntZekCE-o-hB4DDp6wlhVQqA

TWRP_v2.8.6.0_honami-f2fs_from_cm12.1_150423.img 11.6 MB - https://mega.co.nz/#!qkp0jDRR!cqRQ-8CkfFmR6SJyGMCtWr2Rn89FTRl3dUNxluUWDxs

What is this?

This is a repacked TWRP from Z2 sirius, where I have:

- Replaced "default.prop" and "res"-folder to one from [NUT] dual recovery for Z1/Z1C

- Added f2fs support by adding mkfs.f2fs from CM nightly dated the day I cooked the recovery.

- Shrinked images in twres/images folder. It wouldn't boot otherwise.

More info? See recepy down below

Works for?

ONLY: Unlocked bootloader, AOSP based ROMs with support for booting a recovery from the FOTA partition.

Stock ROM, locked or unlocked bootloader: See [NUT]s project: http://nut.xperia-files.com/

How to install?

There are many ways in doing so. Fastboot: "fastboot flash recovery nameofrecovery.img" is the easiest IMO :)

Bugs?

Me and others have tested it, only bug atm seems to be:

- Can't adjust screen brightness in TWRP

Report if you find anything :)

Can you fix bugs?

Most probably not. If you find bugs regarding layout, images and stuff like that: Maybe.

This is not compiled for Z1, this is just repacked using Android Image Kitchen.

Bugs in this recovery will most probably be bugs that all TWRP builds share.

Recepy

Just repacking the Z2 recovery won't make it boot on Z1/Z1c. I believe this is due to some limitations regarding size or something.

In order to get the file size down I made a new, simple "curtain.jpg". Plain black with the text "TWRP". Kind of clean and simplistic when I think about it ;) And I found out that these PNGs can be compressed without getting grapchical glitches:

- file.png
- folder.png
- keyboard (all)
- medium-button.png
- menu-button.png
- slideout.png
- slider-touch.png
- slider.png
- unlock.png

How I did it:

- DL TWRP for Z2 (sirius), [NUT]s lates flashable build for Z1c, Z1, and Android Image Kitchen

- Unpack TWRP for Z2 with Android Image Kitchen

- Take default.prop and "res"-folder from [NUT]s latest build, for your respective phone (z1/z1c), and copy this to the place you unpacked the Z2 recovery (inside ramdisk folder)

- Change images in "twres/images" with these (they are compressed. Unless you use them the img won't boot: https://mega.co.nz/#!e9g1TRCI!vmGsPqVdqSnpcW6G8PC_saLLyyfqTL-1FhjQmggVvxA)

- Repack with "Android Image Kitchen".

Add F2FS support:

- DL lates CM nightly

- Unpack boot.img from it, using Android Image Kitchen.

- Use 7zip to open sbin\ramdisk-recovery.cpio. Get the "mkfs.f2fs" from sbin folder.

- Add this to your project: Copy mkfs.f2fs to ramdisk\sbin

- Repack your recovery with "Android Image Kitchen".

If you want to manually edit default.prop:

Z1 Info: http://www.gsmarena.com/sony_xperia_z1-5596.php - Honami, C6902, DPI: 480

Z1c Info: http://www.gsmarena.com/sony_xperia_z1_compact-5753.php - Amami, D5503, DPI: 342

Z2 Info: http://www.gsmarena.com/sony_xperia_z2-6144.php - Sirius, D6503, DPI: 424

Guides:

Migrate to f2fs: http://xdaforums.com/showthread.php?t=3004755

How to use f2fs on Sony Devices: http://xdaforums.com/showthread.php?t=3056740

It's said that CM12 supports f2fs now. I haven't tested myself yet, so can't confirm.