From TWRP, select 'Wipe' and then 'Advanced Wipe', choosing to format 'Data', 'Cache', and 'System'. Then, navigate to 'Install', select the ROM zip file, and swipe to confirm.
Tap seven times consecutively until a toast message says "You are now a developer." xperia t2 ultra custom rom
Open your dialer and enter *#*#7378423#*#* . Navigate to Service info > Configuration . If it says "Bootloader unlock allowed: Yes" , you can proceed. From TWRP, select 'Wipe' and then 'Advanced Wipe',