[Xperia Z5 Compact Android Development] downtimeguy:
Hear, hear to @Berni-0815 extending the life of the best small form-factor android phone. If donations are possible,

please let me know how to send support for this ongoing project

.

So, it's been quite awhile since my last flash (lineage-14.1-20191118-UNOFFICIAL-suzuran) and Berni's LOS 14.1 has been solid and stable during all that time.

However, wiping/flashing to Berni's latest (lineage-14.1-20210307-UNOFFICIAL-suzuran) produced some post-install crashes this time around. Can't say whether these effects are specifically related to Berni's LOS or native to LOS 14.1 itself. The stock ROM that's installed on the phone before switching over to Berni's LOS 14.1 seems to have some impact on whether post-install crashes will happen. I just assumed that doing a full wipe of the phone via TWRP recovery eliminated everything and set the stage for a clean ROM install. But I don't know enough about the deeper intricacies of what happens when switching over to custom ROMs.

Afraid I can't spare time to do proper testing, but here's a breakdown of what I encountered this weekend:

purchased lightly used E5823 with intact DRM keys and "Bootloader unlock allowed: Yes"

downgraded to LL 5.1.1 (E5823_32.0.A.6.200_R4B_Australia Generic_1298-7260.ftf) using Flashtool in order to backup DRM keys

...is there still any need to backup DRM keys or is it just out of habit at this point?

for whatever reason, neither TWRP 3.0.2-0 nor Berni's updated TWRP works with this LL 5.1.1 stock ROM

upgraded to NG 7.1.1 (E5823_1298-5497 32.4.A.1.54_R3E_Customized UK.ftf) using Flashtool

Berni's TWRP_3.5.1_9-0 now works as expected

processed Advanced Wipe: System, Data, Cache, Dalvik/ART cache, Internal Storage

mounted USB OTG and copied install .zips and md5 file to /sdcard

installed lineage-14.1-20210307-UNOFFICIAL-suzuran.zip and addonsu-remove-14.1-arm64-signed.zip

rebooted phone, LOS startup begins...

indicator light flashes red 3 times & crash dump screen appears

turn off phone and reboot again

LOS startup screen reached & completed

after some testing, 3 red flashes & crash dump screen sometimes occurs again during phone shutdown

a few more full wipes and reinstalls of Berni's LOS are attempted, but similar crashes occur again at odd moments

install .zips are double checked, but they install successfully every time with signature verfication

a gray screen and error notices about apps closing happens after another attempted reinstall

on a guess, flashed the phone back to a MM 6.0.1 stock ROM (E5823_32.2.A.5.11_R6C_Australia Generic_1298-7260.ftf)

Berni's latest TWRP works as expected alongside this MM 6.0.1

processed Advanced Wipe: System, Data, Cache, Dalvik/ART cache, Internal Storage

installed Berni's latest LOS 14.1 in same manner as above

no crashes during initial startup, LOS startup menus were completed as expected

as I recall, this MM 6.0.1 was the same stock ROM I used in order to get TWRP working the last time installing Berni's LOS

testing now with high hopes of no more crashes...

So that's that strange path I had to take in order to get a crash-free install of Berni's LOS. Doesn't seem to make much sense why a custom ROM install would be affected by the stock ROM the preceded it, but that's seems to be the case. Slightly embarrassed to say I did not preserve any of the crash dump files from the earlier buggy installs.

I am curious to hear any thoughts or theories why things turned out this way. Why does a stock ROM affect installation of a custom ROM? Maybe the stock NG 7.1.1 ROM I used to get TWRP working was somehow faulty?