Samsung Galaxy Tab S2 9.7 Wifi (samsung-gts210vewifi)

Contributors

 * K-laus

What works

 * compiling kernel
 * booting
 * ssh connection
 * screen output
 * touch screen (if warm-booted from TWRP)

What does not work

 * everything else not tested

How to enter flash mode
Sometimes, to enter Recovery it is needed to first enter Download mode, then again hold Home + Volume Down + Power and while screen goes blank, switch to hold Home + Volume Up + Power.
 * Recovery: With the device powered off, hold Home + Volume Up + Power.
 * Download: With the device powered off, hold Home + Volume Down + Power.

Unlocking
In Android go to settings -> System -> About phone and tap the build number 7 times. Then go to settings -> system -> developer options and enable OEM unlocking

Partition Infos
from an adb shell of LineageOS 15.1 installation, after installing some additional apps:

Installation
installed system on sdcard:
 * put (empty/overwritable) SD-card into host cardreader
 * pmbootstrap install --sdcard=/dev/...
 * put SD-Card, now containing pmOS into tablet
 * pmbootstrap flasher flash_kernel    # after this command finishes, device reboots and pmOS starts :-)
 * had to follow USB_Network as IP to host computer was not automatically assigned:
 * sudo ip link set TheNetDevName address 12:12:12:12:12:12
 * sudo ip address add dev TheNetDevName 172.16.42.2/24
 * sudo dhclient -v TheNetDevName
 * ssh -p 22 user@172.16.42.1

Developer Notes
Without proper kernel setting that allows RNDIS via USB connection (CONFIG_USB_ETH with CONFIG_USB_ETH_RNDIS, or CONFIG_USB_G_ANDROID), device did seem to hang at the initial boot screen while displaying " KERNEL IS NOT SEANDROID ENFORCING Set Warranty Bit : kernel

SAMSUNG Galaxy Tab S2

POWEREd BY android " but this was only due to not having an RNDIS connection via USB!

Not mentioned in the porting docu yet: Had to use uppercase partition labels in deviceinfo_flash_heimdall_partition_(kernel|system) variables in deviceinfo file, even if their symlinks are lowercase (e.g. "system -> /dev/block/mmcblk0p36"), otherwise get 'ERROR: Partition "system" does not exist in the specified PIT.'

libinput 1.10.5 measure touchpad-pressure
Touchpad pressure does not seem return pressure but is related to the number of fingers touched at the same time, see below ("# x finger down" comments added by me). Unfortunately, tweaking the pressure like https://wayland.freedesktop.org/libinput/doc/latest/touchpad_pressure.html tells does not work.

gts210vewifi:~# libinput measure touchpad-pressure Using sec_touchscreen: /dev/input/event2

Ready for recording data. Pressure range used: 30:25 Palm pressure range used: 130 Place a single finger on the touchpad to measure pressure values. Ctrl+C to exit

Sequence 496 pressure: min:  0 max: 255 avg: 127 median: 255 tags: down palm Sequence 508 pressure: min:  0 max: 255 avg: 127 median: 255 tags: down palm Sequence 508 pressure: min:  0 max: 255 avg:  85 median:   0 tags: down palm Sequence 511 pressure: min:  0 max: 255 avg: 127 median: 255 tags: down palm Sequence 511 pressure: min:  0 max: 255 avg:  85 median:   0 tags: down palm Sequence 511 pressure: min:  0 max: 255 avg:  63 median:   0 tags: down palm
 * 1) 1 finger down
 * 1) 2 finger down
 * 1) 3 finger down

Sequence 522 pressure: min:  0 max: 255 avg: 127 median: 255 tags: down palm Sequence 522 pressure: min:  0 max: 255 avg:  85 median:   0 tags: down palm Sequence 522 pressure: min:  0 max: 255 avg:  63 median:   0 tags: down palm Sequence 522 pressure: min:  0 max: 255 avg:  51 median:   0 tags: down palm
 * 1) 4 fingers down

Sequence 527 pressure: min:  0 max: 255 avg: 127 median: 255 tags: down palm Sequence 527 pressure: min:  0 max: 255 avg:  85 median:   0 tags: down palm Sequence 527 pressure: min:  0 max: 255 avg:  63 median:   0 tags: down palm Sequence 527 pressure: min:  0 max: 255 avg:  51 median:   0 tags: down palm Sequence 527 pressure: min:  0 max: 255 avg:  42 median:   0 tags: down palm
 * 1) 5 fingers down

Sequence 533 pressure: min:  0 max: 255 avg: 127 median: 255 tags: down palm Sequence 533 pressure: min:  0 max: 255 avg:  85 median:   0 tags: down palm Sequence 533 pressure: min:  0 max: 255 avg:  63 median:   0 tags: down palm Sequence 533 pressure: min:  0 max: 255 avg:  51 median:   0 tags: down palm Sequence 533 pressure: min:  0 max: 255 avg:  42 median:   0 tags: down palm Sequence 533 pressure: min:  0 max: 255 avg:  36 median:   0 tags: down palm
 * 1) 6 fingers down

Sequence 540 pressure: min:  0 max: 255 avg: 127 median: 255 tags: down palm Sequence 540 pressure: min:  0 max: 255 avg:  85 median:   0 tags: down palm Sequence 540 pressure: min:  0 max: 255 avg:  63 median:   0 tags: down palm Sequence 540 pressure: min:  0 max: 255 avg:  51 median:   0 tags: down palm Sequence 540 pressure: min:  0 max: 255 avg:  42 median:   0 tags: down palm Sequence 540 pressure: min:  0 max: 255 avg:  36 median:   0 tags: down palm Sequence 540 pressure: min:  0 max: 255 avg:  31 median:   0 tags: down palm
 * 1) 7 fingers down

Sequence 548 pressure: min:  0 max: 255 avg: 127 median: 255 tags: down palm Sequence 548 pressure: min:  0 max: 255 avg:  85 median:   0 tags: down palm Sequence 548 pressure: min:  0 max: 255 avg:  63 median:   0 tags: down palm Sequence 548 pressure: min:  0 max: 255 avg:  51 median:   0 tags: down palm Sequence 548 pressure: min:  0 max: 255 avg:  42 median:   0 tags: down palm Sequence 548 pressure: min:  0 max: 255 avg:  36 median:   0 tags: down palm Sequence 548 pressure: min:  0 max: 255 avg:  31 median:   0 tags: down palm Sequence 548 pressure: min:  0 max: 255 avg:  28 median:   0 tags: down palm
 * 1) 8 fingers down

Sequence 557 pressure: min:  0 max: 255 avg: 127 median: 255 tags: down palm Sequence 557 pressure: min:  0 max: 255 avg:  85 median:   0 tags: down palm Sequence 557 pressure: min:  0 max: 255 avg:  63 median:   0 tags: down palm Sequence 557 pressure: min:  0 max: 255 avg:  51 median:   0 tags: down palm Sequence 557 pressure: min:  0 max: 255 avg:  42 median:   0 tags: down palm Sequence 557 pressure: min:  0 max: 255 avg:  36 median:   0 tags: down palm Sequence 557 pressure: min:  0 max: 255 avg:  31 median:   0 tags: down palm Sequence 557 pressure: min:  0 max: 255 avg:  28 median:   0 tags: down palm Sequence 557 pressure: min:  0 max: 255 avg:  25 median:   0 tags: down palm
 * 1) 9 fingers down

Sequence 567 pressure: min:  0 max: 255 avg: 127 median: 255 tags: down palm Sequence 567 pressure: min:  0 max: 255 avg:  85 median:   0 tags: down palm Sequence 567 pressure: min:  0 max: 255 avg:  63 median:   0 tags: down palm Sequence 567 pressure: min:  0 max: 255 avg:  51 median:   0 tags: down palm Sequence 567 pressure: min:  0 max: 255 avg:  42 median:   0 tags: down palm Sequence 567 pressure: min:  0 max: 255 avg:  36 median:   0 tags: down palm Sequence 567 pressure: min:  0 max: 255 avg:  31 median:   0 tags: down palm Sequence 567 pressure: min:  0 max: 255 avg:  28 median:   0 tags: down palm Sequence 567 pressure: min:  0 max: 255 avg:  25 median:   0 tags: down palm Sequence 567 pressure: min:  0 max: 255 avg:  23 median:   0 tags: down palm
 * 1) 10 fingers down

libinput from git master - touchscreen works partially
compiled libinput from git master, using commit 2167c3af058aebf5ce732ed0a3a1c5488b2a9d73, from https://github.com/wayland-project/libinput - touchscreen behaviour is better now, the _false_ palm detection is no longer all the time active, as the configured ENV{LIBINPUT_ATTR_PALM_PRESSURE_THRESHOLD}=256 is now applied. commit 59eb10e593213403c301a5ce3fbd0a22b6e52efd 'util: allow for palm pressure > 255' or newer is needed for that to work. With this new libinput version, the mouse pointer from plasma-mobile can be moved and clicking also does work as expected. Not yet working: 90-degree left rotation is not applied.

touchscreen works
PR#1516: if using ATTRS{name}=="sec_touchscreen" in udev rule instead of ENV{DEVNAME}=="/dev/input/event2" then touchscreen works as expected as touchscreen, not touchpad, and is always detected. Some touchscreen initialization is still missing - as touchscreen input event nodes are only present if booting pmOS from within TWRP via Reboot>System, they are missing after cold boot.