[Samsung Galaxy Tab A series ROMs, Kernels, Recover] MossyTC:
TWRP v3.3.1-5 won't hang on the splash screen, but TWRP won't be able read the data partition so no data backups from TWRP in that case. You're better off wiping the encrypted data partition in stock recovery before flashing TWRP.

Go here and scroll to the How to use Odin section at the end, which includes instructions for flashing stock firmware, and that will get you back to a point where you can start the process over, following the instructions this time.

---------- Post added at 01:06 PM ---------- Previous post was at 12:53 PM ----------

Workaround for the

Night Mode

bug.

The following applies to the 20190909 version of the ROM, I do not know if the bug exists in more recent versions.

In my experience the screen goes blank momentarily and then locks again if you do the following:

Turn on Night Mode and

Reboot between sunset and sunrise

In my attempts to recreate this problem I tried all the variations in the Night Mode settings (sunset/sunrise, manual timing including the current time etc), rebooting after each setting change, but failing to reproduce the problem every time. I was trying during the day, though. I didn't succeed in reproducing the problem until I rebooted after sunset.

The workaround -

Use adb to disable the lock screen. You will not be able to re-enable the lock screen without getting the problem again regardless of what you do with the Night Mode settings, but you can backup your data (e.g. Titanium Backup) before doing a factory reset in TWRP, or you can carry on without a lock screen.

adb shell
su
# Note the number shown after running the following command, you may need to use it later if you want to restore the lock screen
sqlite3 /data/system/locksettings.db "select value from locksettings WHERE name = 'lockscreen.password_type';"

# The next two commands remove the lock
sqlite3 /data/system/locksettings.db "UPDATE locksettings SET value = '0' WHERE name = 'lockscreen.password_type';"
sqlite3 /data/system/locksettings.db "UPDATE locksettings SET value = '1' WHERE name = 'lockscreen.disabled'"

... then reboot - no more lock screen.

You probably won't want to re-enable the lock screen, but in case you ever do:

adb shell
su

# Replace XXXXX in the following line with the number you noted from disabling the lock previously
sqlite3 /data/system/locksettings.db "UPDATE locksettings SET value = 'XXXXX' WHERE name = 'lockscreen.password_type';"
sqlite3 /data/system/locksettings.db "UPDATE locksettings SET value = '0' WHERE name = 'lockscreen.disabled'"

... and reboot.

The same symptoms and logged exception are described in this Le Eco Le 2 Pie Experience thread. Apparently a clean install of the March 2019 version of that ROM fixed the problem, not sure if that helps. Also someone uploaded unlock_s2.zip to that thread, which is a recovery flashable fix that works by deleting several lock screen related files from /data/system. I haven't tried it myself but the files are

/data/system/gesture.key

/data/system/cm_gesture.key

/data/system/password.key

/data/system/personalbackuppin.key

/data/system/personalpattern.key

/data/system/locksettings.db

/data/system/locksettings.db-shm

/data/system/locksettings.db-wal