I have a Samsung Galaxy Note 4 which was started to be buggy and I decided to install a new ROM (Lineage 14.1). I first checked the version of TWRP and saw that there was a new version (I had 3.0, 3.2 is available). I flashed it through the TWRP app but I could not boot to TWRP.
I had a backup of my previous TWRP (and also of "boot") so I wanted to restore it.
I realized that the "touch" area is a different size that the physical screen and that I need to offset my touch by 1-2 cm up in order to hit the right button.
After the recovery, I had TWRP 3.0 again and managed (after much mis-clicking) to install Lineage 14.1 and Gapps.
My problem is that the touch area is still offset vs. the screen.
While the device booted into Lineage, I cannot realistically use it because of this shift.
I believe that flashing the wrong TWRP set some information about the physical size of the screen and its relationship to the touch functionality. Reflashing 3.0 did not fix it.
I am quite desperate since the phone is formally working but not usable. How can I reset its perception of the screen size? It now looks like Android thinks I have a screen smaller than in reality (and adapts the touch, see the video I added below)
EDIT: I made a video with the help of the Multitouch app to show how the scaling is off: https://mega.nz/#!84pDnIZI!XZPnP-9YDKON93aPzDZZRPjXR-u7iGn_mnvN3ei8qN4 (sorry for the blur in the middle, I was juggling with two phones)
EDIT 2: The pen of the Note 4 works correctly - the place I touch on the screen is correctly recognized by Android. In the Multitouch application and video above, the tip of the pen is in the center of the green dot everywhere on the screen.