Samsung Galaxy Tab S5e Wi-Fi (gts4lvwifi)

From postmarketOS Wiki
🚧 This page is a work-in-progress. Some information contained within may be inaccurate or incomplete.
Samsung Galaxy Tab S5e Wi-Fi (SM-T720)
File:Gts4lvwifi.jpg
Samsung Galaxy Tab S5e Wi-Fi
Manufacturer Samsung
Name Galaxy Tab S5e Wi-Fi (SM-T720)
Codename samsung-gts4lvwifi
Released 2019
Type tablet
Hardware
Chipset Qualcomm Snapdragon 670 (SDM670)
CPU Octa-core Kryo 360 (2 x 2.0 GHz & 6 x 1.7 GHz)
GPU Adreno 615
Display 267.2mm (10.5 inch) 1600x2560 (WQXGA) 287 PPI Super AMOLED
Storage 64/128 GB
Memory 4/6 GB
Architecture aarch64
Software
Original software Android
Original version 9
Extended version 11
postmarketOS
Category testing
Pre-built images no
Features
Flashing
USB Networking
Internal storage
SD card
Battery
Screen
Touchscreen
Multimedia
3D Acceleration
Audio
Camera
Camera Flash
Connectivity
WiFi
Bluetooth
GPS
NFC
Miscellaneous
FDE
USB OTG
HDMI/DP
Sensors
Accelerometer
Magnetometer
Ambient Light
Proximity
Hall Effect
Haptics
Barometer


Icon WARNING: Make sure that you are prepared to (probably) lose functionality when installing postmarketOS. Samsung Knox will blow an efuse when the OS is modified that will permanently disable Knox-only features like Samsung Pay, and you will NEVER be able to use those features again (not actually tested for this device yet).
Notice While the (downstream) kernel compiles and flashing is available, this device is in an extremely early state of development.

This is the Device page for the "Samsung Galaxy Tab S5e Wi-Fi" (model SM-T720; codename gts4lvwifi), which should not be confused with the similarly-named "Samsung Galaxy Tab S5e LTE" (models SM-T725, SM-T727; codename gts4lv).

Contributors

Maintainer(s)

Users owning this device

  • Joshaspinall (Notes: Currently running Lineage Android)
  • Usia (Notes: porting to PostmarketOS)
  • Usia (Notes: running LineageOS)


How to enter flash mode

Note Samsung devices do not use the fastboot flashing mechanism. There fore the flash mode is also not called "fastboot mode" but "Download mode".
  1. Power off the device
  2. Hold Volume Up + Volume Down.
  3. Connect USB cable from PC to the device and wait until the screen turns blue.
  4. Follow the instructions on screen (it will probably tell you to press Volume up to continue, i.e.: to flash mode)

Bootloader Unlocking

Notice Be aware, a bootloader unlock will erase all userdata! Make sure to keep a backup of any important data!
Notice The bootloader needs to be unlocked to be able to flash custom partitions.

Unlocking

  1. Boot to android
  2. Connect to wifi
  3. Enable "Developer Options" (tap 7x on Buildnumber)
  4. Go to "Developer Options" and toogle on "OEM unlock"
  5. Turn off tablet
  6. Hold Volume Up + Volume Down while plugging in USB untill you are in "Download mode".
  7. Follow onscreen instructions to unlock bootloader
  8. Reboot to andoir and connect to wifi
  9. ensure "OEM unlock" is still active in "Developer Options"

At this point, you should be ready to install custom ROMs/postmarketOS.

Installation

It is advisable to keep backup of some partitions for easy recovery before installing postmarketOS!

Backup with TWRP

Prerequesites

  1. TWRP. See here how to install TWRP
  2. adb on your PC

Create backups

Plug the tablet with USB to the PC and boot to recovery (TWRP).

Backup the partitions "dtbo", "boot", "recovery", "system" and "userdata".

adb pull /dev/block/by-name/dtbo dtbo.img
adb pull /dev/block/by-name/boot boot.img
adb pull /dev/block/by-name/recovery recovery.img
adb pull /dev/block/by-name/system system.img
adb pull /dev/block/by-name/userdata userdata.img

Manual build

The vendor is "Samsung", the codename is "gts4lvwifi".

Follow the pmbootstrap article, until you have done the install action (note that --fde stands for full-disk-encryption - this is currently not supported on this device).

Flashing

Hint When issuing the following commands with out the --no-reboot option, the device will reboot after each flashing process. You might want to hold Volume Up + Volume Down to automatically boot to "Download mode" again.

First off, to boot custom images we need to disable Android Verified Boot (AVB). This can be done with pmbootstrap flashing a custom vbmeta.img.

pmbootstrap flasher flash_vbmeta

Then flash the rootfs and kernel.

pmbootstrap flasher flash_rootfs
pmbootstrap flasher flash_kernel
Note When flashing with pmbootstrap, a fork of Heimdall is used that is still maintained. This can also be used to manually flash the images, if needed. Other flashing methods might also work (Odin, from recovery, etc.) but are not tested.


Build notes

Notice This section is just kept for lookup but is not necessarry for normal installation as the device ist already available with pmbootstrap now.
Notes from Mparker17

Overall, Mparker17 found this pretty straightforward using the Porting to a new device instructions.

For a host machine, Mparker17 used Ubuntu 20.10.

For pmbootstrap init, Mparker17 used:

Channel [edge]: edge
Vendor [samsung]: samsung
Device codename [gts4lvwifi]: gts4lvwifi
Username [user]: user
User interface [weston]: weston
Additional options: extra free space: 0 MB, boot partition size: 128 MB, parallel jobs: 9, ccache per arch: 5G, sudo timer: False
Change them? (y/n) [n]: n
Extra packages [none]: none
Choose default locale for installation (y/n) [C.UTF-8]: C.UTF-8
Device hostname (short form, e.g. 'foo') [samsung-gts4lvwifi]: samsung-gts4lvwifi
Would you like to copy your SSH public keys to the device? (y/n) [n]: n
Build outdated packages during 'pmbootstrap install'? (y/n) [y]: y

... and the boot.img from LineageOS' build for the device (specifically, lineage-17.1-20210222-nightly-gts4lvwifi-signed.zip)

When editing cache_git/pmaports/device/testing/linux-samsung-gts4lvwifi/APKBUILD, Mparker17 didn't have to add any patches; but did have to remove the following 4 patches:

 gcc7-give-up-on-ilog2-const-optimizations.patch
 gcc8-fix-put-user.patch
 gcc10-extern_YYLOC_global_declaration.patch
 kernel-use-the-gnu89-standard-explicitly.patch

For pmbootstrap kconfig, Mparker17 had to fix the following issues documented on the kconfig page:

WARNING: linux-samsung-gts4lvwifi/config-samsung-gts4lvwifi.aarch64: CONFIG_ANDROID_PARANOID_NETWORK should *not* be set. See <https://wiki.postmarketos.org/wiki/kconfig#CONFIG_ANDROID_PARANOID_NETWORK> for details.
WARNING: linux-samsung-gts4lvwifi/config-samsung-gts4lvwifi.aarch64: CONFIG_DEVTMPFS should be set. See <https://wiki.postmarketos.org/wiki/kconfig#CONFIG_DEVTMPFS> for details.
WARNING: linux-samsung-gts4lvwifi/config-samsung-gts4lvwifi.aarch64: CONFIG_SYSVIPC should be set. See <https://wiki.postmarketos.org/wiki/kconfig#CONFIG_SYSVIPC> for details.
WARNING: linux-samsung-gts4lvwifi/config-samsung-gts4lvwifi.aarch64: CONFIG_VT should be set. See <https://wiki.postmarketos.org/wiki/kconfig#CONFIG_VT> for details.

... after fixing those, the kernel appeared to build successfully.

Mparker17 has not had a chance to try this out on the device yet.

Device notes

Some of the gts4lvwifi devices originally shipped with Android 9. LineageOS worked on those devices until sometime in 2020-Q4; after that LineageOS stopped upgrading. The solution for this was to install Samsung's stock firmware for Android 10, and re-flash LineageOS - after that it continued working. Mparker17 recalls this had something to do with Android 10 device drivers, and speculates it might have something to do with LineageOS's kernel fork or device configuration (which we use, see #Build notes above), and therefore, similar issues might happen with postmarketOS as well. However, Mparker17 doesn't know how to restore the original Android 9 firmware to verify this. So Mparker17's advice is, make sure you've upgraded to the latest official Android 10 firmware before trying to install PostmarketOS.

Partition map

ls -lha /dev/block/by-name/

total 0 drwxr-xr-x 2 root root 1.1K 2018-08-22 01:43 . drwxr-xr-x 4 root root 1.8K 2018-08-22 01:43 .. lrwxrwxrwx 1 root root 21 2018-08-22 01:43 abl -> /dev/block/mmcblk0p10 lrwxrwxrwx 1 root root 20 2018-08-22 01:43 aop -> /dev/block/mmcblk0p5 lrwxrwxrwx 1 root root 21 2018-08-22 01:43 apdp -> /dev/block/mmcblk0p17 lrwxrwxrwx 1 root root 21 2018-08-22 01:43 apnhlos -> /dev/block/mmcblk0p44 lrwxrwxrwx 1 root root 21 2018-08-22 01:43 bksecapp -> /dev/block/mmcblk0p13 lrwxrwxrwx 1 root root 21 2018-08-22 01:43 bluetooth -> /dev/block/mmcblk0p12 lrwxrwxrwx 1 root root 21 2018-08-22 01:43 boot -> /dev/block/mmcblk0p48 lrwxrwxrwx 1 root root 21 2018-08-22 01:43 bota -> /dev/block/mmcblk0p36 lrwxrwxrwx 1 root root 21 2018-08-22 01:43 btd -> /dev/block/mmcblk0p24 lrwxrwxrwx 1 root root 21 2018-08-22 01:43 cache -> /dev/block/mmcblk0p53 lrwxrwxrwx 1 root root 21 2018-08-22 01:43 cmnlib -> /dev/block/mmcblk0p15 lrwxrwxrwx 1 root root 21 2018-08-22 01:43 cmnlib64 -> /dev/block/mmcblk0p16 lrwxrwxrwx 1 root root 20 2018-08-22 01:43 ddr -> /dev/block/mmcblk0p4 lrwxrwxrwx 1 root root 21 2018-08-22 01:43 debug -> /dev/block/mmcblk0p56 lrwxrwxrwx 1 root root 21 2018-08-22 01:43 devcfg -> /dev/block/mmcblk0p21 lrwxrwxrwx 1 root root 21 2018-08-22 01:43 devinfo -> /dev/block/mmcblk0p11 lrwxrwxrwx 1 root root 21 2018-08-22 01:43 dpo -> /dev/block/mmcblk0p19 lrwxrwxrwx 1 root root 21 2018-08-22 01:43 dqmdbg -> /dev/block/mmcblk0p39 lrwxrwxrwx 1 root root 21 2018-08-22 01:43 dsp -> /dev/block/mmcblk0p45 lrwxrwxrwx 1 root root 21 2018-08-22 01:43 dtbo -> /dev/block/mmcblk0p47 lrwxrwxrwx 1 root root 21 2018-08-22 01:43 efs -> /dev/block/mmcblk0p31 lrwxrwxrwx 1 root root 21 2018-08-22 01:43 fota -> /dev/block/mmcblk0p37 lrwxrwxrwx 1 root root 21 2018-08-22 01:43 fsc -> /dev/block/mmcblk0p28 lrwxrwxrwx 1 root root 20 2018-08-22 01:43 fsg -> /dev/block/mmcblk0p8 lrwxrwxrwx 1 root root 21 2018-08-22 01:43 hidden -> /dev/block/mmcblk0p54 lrwxrwxrwx 1 root root 20 2018-08-22 01:43 hyp -> /dev/block/mmcblk0p7 lrwxrwxrwx 1 root root 21 2018-08-22 01:43 keymaster -> /dev/block/mmcblk0p14 lrwxrwxrwx 1 root root 21 2018-08-22 01:43 keystore -> /dev/block/mmcblk0p35 lrwxrwxrwx 1 root root 21 2018-08-22 01:43 limits -> /dev/block/mmcblk0p20 lrwxrwxrwx 1 root root 21 2018-08-22 01:43 logfs -> /dev/block/mmcblk0p40 lrwxrwxrwx 1 root root 21 2018-08-22 01:43 misc -> /dev/block/mmcblk0p34 lrwxrwxrwx 1 root root 21 2018-08-22 01:43 modem -> /dev/block/mmcblk0p46 lrwxrwxrwx 1 root root 21 2018-08-22 01:43 modemst1 -> /dev/block/mmcblk0p26 lrwxrwxrwx 1 root root 21 2018-08-22 01:43 modemst2 -> /dev/block/mmcblk0p27 lrwxrwxrwx 1 root root 21 2018-08-22 01:43 msadp -> /dev/block/mmcblk0p18 lrwxrwxrwx 1 root root 21 2018-08-22 01:43 omr -> /dev/block/mmcblk0p55 lrwxrwxrwx 1 root root 21 2018-08-22 01:43 pad -> /dev/block/mmcblk0p25 lrwxrwxrwx 1 root root 21 2018-08-22 01:43 param -> /dev/block/mmcblk0p32 lrwxrwxrwx 1 root root 21 2018-08-22 01:43 persist -> /dev/block/mmcblk0p30 lrwxrwxrwx 1 root root 21 2018-08-22 01:43 persistent -> /dev/block/mmcblk0p42 lrwxrwxrwx 1 root root 21 2018-08-22 01:43 product -> /dev/block/mmcblk0p52 lrwxrwxrwx 1 root root 21 2018-08-22 01:43 qupfw -> /dev/block/mmcblk0p38 lrwxrwxrwx 1 root root 21 2018-08-22 01:43 recovery -> /dev/block/mmcblk0p49 lrwxrwxrwx 1 root root 20 2018-08-22 01:43 sec -> /dev/block/mmcblk0p9 lrwxrwxrwx 1 root root 21 2018-08-22 01:43 sec_efs -> /dev/block/mmcblk0p33 lrwxrwxrwx 1 root root 21 2018-08-22 01:43 ssd -> /dev/block/mmcblk0p29 lrwxrwxrwx 1 root root 21 2018-08-22 01:43 steady -> /dev/block/mmcblk0p43 lrwxrwxrwx 1 root root 21 2018-08-22 01:43 storsec -> /dev/block/mmcblk0p22 lrwxrwxrwx 1 root root 21 2018-08-22 01:43 system -> /dev/block/mmcblk0p50 lrwxrwxrwx 1 root root 20 2018-08-22 01:43 tz -> /dev/block/mmcblk0p6 lrwxrwxrwx 1 root root 21 2018-08-22 01:43 userdata -> /dev/block/mmcblk0p57 lrwxrwxrwx 1 root root 21 2018-08-22 01:43 vbmeta -> /dev/block/mmcblk0p23 lrwxrwxrwx 1 root root 21 2018-08-22 01:43 vendor -> /dev/block/mmcblk0p51 lrwxrwxrwx 1 root root 21 2018-08-22 01:43 vk -> /dev/block/mmcblk0p41 lrwxrwxrwx 1 root root 20 2018-08-22 01:43 xbl -> /dev/block/mmcblk0p1 lrwxrwxrwx 1 root root 20 2018-08-22 01:43 xbl_config -> /dev/block/mmcblk0p3 lrwxrwxrwx 1 root root 20 2018-08-22 01:43 xblbak -> /dev/block/mmcblk0p2

fdisk -l

Found valid GPT with protective MBR; using GPT

Disk /dev/mmcblk0: 122142720 sectors, 2296M Logical sector size: 512 Disk identifier (GUID): 98101b32-bbe2-4bf2-a06e-2bb33d000c20 Partition table holds up to 128 entries First usable sector is 34, last usable sector is 122142686

Number Start (sector) End (sector) Size Name

    1            8192           16383 4096K xbl
    2           16384           24575 4096K xblbak
    3           24576           25599  512K xbl_config
    4           25600           27647 1024K ddr
    5           27648           29695 1024K aop
    6           29696           37887 4096K tz
    7           37888           39935 1024K hyp
    8           39936           44031 2048K fsg
    9           44032           45055  512K sec
   10           45056           53247 4096K abl
   11           53248           53759  256K devinfo
   12           53760           55807 1024K bluetooth
   13           55808           56831  512K bksecapp
   14           56832           57855  512K keymaster
   15           57856           59903 1024K cmnlib
   16           59904           61951 1024K cmnlib64
   17           61952           62975  512K apdp
   18           62976           63999  512K msadp
   19           64000           64511  256K dpo
   20           64512           65023  256K limits
   21           65024           66047  512K devcfg
   22           66048           67071  512K storsec
   23           67072           67327  128K vbmeta
   24           67328           71423 2048K btd
   25           71424           98303 13.1M pad
   26           98304          102399 2048K modemst1
   27          102400          106495 2048K modemst2
   28          106496          110591 2048K fsc
   29          110592          114687 2048K ssd
   30          114688          180223 32.0M persist
   31          180224          221183 20.0M efs
   32          221184          245759 12.0M param
   33          245760          286719 20.0M sec_efs
   34          286720          290815 2048K misc
   35          290816          294911 2048K keystore
   36          294912          360447 32.0M bota
   37          360448          409599 24.0M fota
   38          409600          409855  128K qupfw
   39          409856          442623 16.0M dqmdbg
   40          442624          459007 8192K logfs
   41          459008          463103 2048K vk
   42          463104          464127  512K persistent
   43          464128          472319 4096K steady
   44          472320          668927 96.0M apnhlos
   45          668928          742655 36.0M dsp
   46          742656          922879 88.0M modem
   47          922880          939263 8192K dtbo
   48          939264         1070335 64.0M boot
   49         1070336         1212415 69.3M recovery
   50         1212416        10846207 4704M system
   51        10846208        12681215  896M vendor
   52        12681216        13910015  600M product
   53        13910016        14729215  400M cache
   54        14729216        14749695 10.0M hidden
   55        14749696        14790655 20.0M omr
   56        14790656        14815231 12.0M debug
   57        14815232       122142686 51.1G userdata

See also