Jump to content

Samsung Galaxy Tab 3 Lite (samsung-goyavewifi)

From postmarketOS Wiki
Samsung Galaxy Tab 3 Lite
[[
Samsung-goyavewifi running LxQT with themes and fastfetch in a terminal.
Samsung-goyavewifi running LxQT
|200px|alt=]]
Manufacturer Samsung
Name Galaxy Tab 3 Lite
Codename samsung-goyavewifi
Model SM-T113(NU)
Released 2013
Type tablet
Hardware
Chipset Spreadtrum SC8830
CPU 4x 1.2 GHz Cortex-A7
GPU Mali-400 MP2
Display 600x1024 TFT
Storage 8 GB
Memory 1 GB
Architecture armv7
postmarketOS
Category testing
Pre-built images
Whether pre-built images are available here.
no
Mainline
Instead of a Linux kernel fork, it is possible to run (Close to) Mainline.
no
pmOS kernel
The kernel version that runs on the device's port.
Linux 3.10.17 downstream
Unixbench score
Unixbench Whetstone/Dhrystone score. See Unixbench.
486.0
Features
Flashing
It is possible to flash the device with pmbootstrap flasher.
Works
USB Networking
After connecting the device with USB to your PC, you can connect to it via telnet (initramfs) or SSH (booted system).
Works
Internal storage
eMMC, SD cards, UFS, ...
Works
SD card
Also includes other external storage cards
Works
Battery
Charging and battery level reporting works
Works
Screen
Display works. Ideally with sleep mode and brightness control.
Works
Touchscreen
Works
Multimedia
3D Acceleration
Broken
Audio
Audio playback, microphone, headset and buttons.
Partial
Camera
Broken
Connectivity
WiFi
Works
Bluetooth
Broken
GPS
Untested
Miscellaneous
FDE
Full disk encryption and unlocking with unl0kr.
Untested
USB OTG
USB On-The-Go or USB-C Role switching
Works
Sensors
Accelerometer
Auto screen rotation works in desktops e.g. Phosh or Plasma Mobile
Works


Contributors

Users owning this device


How to enter flash mode

  • Download mode: Volume Down + Home + Power and press Volume Up
  • Recovery mode: Volume Up + Home + Power

Installation

1.Run pmbootstrap init
2.Select device codename as goyavewifi (do not confuse with goyawifi or goya)

  • You can select anything except anything runs wayland

3.Run pmbootstrap install
4.If your images size larger than 1500 mb you cant install to system (pmbootstrap flasher flash_rootfs --partition userdata doesnt work for no reason. but you can install with twrp or use a sdcard)
You need to export image file and flash with heimdall.
5.run pmbootstrap export
6.run heimdall flash --userdata ~/.local/var/pmbootstrap/chroot_native/home/pmos/rootfs/samsung-goyavewifi.img
7.run (crucial for changing rootfs) pmbootstrap flasher flash_kernel
8.Done!
Now you can ssh into your device!
Notes: If your device doesnt show anything(just samsung galaxy tab 3 lite screen and nothing) try to ssh 172.16.42.1 if ssh throws error connection refused wait for 1~2 minutes. If still showing this message you have a problem with kernel(probably)or rootfs. Try flashing again.If this doesnt work either you can try different DE. If you can connect ssh you probably can run sudo startx

Display

  • in landscape
  • No DRM support, cannot run wayland.
  • No splash when booting and power off, happens after applying Spreadtrum swapped colors patch (Without the patch, Xorg crashes, both probably because the display is 16bit).
    • pbsplash fails with tfb_acquire_fb() failed with error code: 7 .
  • for any DE installation that uses lightdm (for example; xfce, mate), you need to install postmarketos-base-downstream
  • blanks after inactivity, likely some power-saving feature
    • echo 0 > /sys/class/graphics/fb0/blank turns it back on
  • fuzzes out after wake from suspend, weird display glitches
    • X fails with
FBDEV(0): FBIOPUT_VSCREENINFO: Invalid argument
FBDEV(0): mode initialization failed
Fatal server error: AddScreen/ScreenInit failed for driver 0
  • lxqt ghosts on default theme (only in taskbar) and notifications.
    • a quick fix is automatic hide option on taskbar settings.
  • if you want to change the scale (in lxqt)

/home/user # sudo nano /etc/environment
(in nano add these)
QT_SCALE_FACTOR=0.75

QT_AUTO_SCREEN_SCALE_FACTOR=0.75

Audio

  • Needs soc-sprd-audio-sc8830 package
  • Headphones and back speaker works
  • Headset and Handset only gives microphone and it's low volume, but /usr/share/alsa/ucm2/conf.d/sprdphone/HiFi can be patched to fix both. Like this

PulseAudio

Need to add add these lines at /etc/asound.conf:

defaults.ctl.card 1
defaults.pcm.card 1
defaults.pcm.device 1

Also need to edit this line in /etc/pulse/default.pa:

load-module module-udev-detect

To:

load-module module-udev-detect tsched=0

WiFi

You can copy /system/etc/wifi from stock rom to the device, then wifi works.

Steps to fix wifi 1.Download wifi firmware below or extract yours from stock system image.

  • If you want to extract yours, you need to use an system unpacker.

2.Copy the wifi folder to your sdcard.
3. run this command(s):

/home/user :# mkdir /system
/home/user :# mkdir /system/etc
/home/user :# cp /[your wifi folder path or sd card]/wifi /system/etc/
/home/user :# reboot
# [later than reboot]
/home/user :# nmtui # nmtui --> activate connections --> wlan0/your ssid and password --> ok

Done! Now you can use your wifi without issues!

Added them here: HAKANKOKCU/firmware-samsung-goyavewifi

Couldn't get firmware-aosp-broadcom-wlan working.

One weird issue is it seems to not connect at all, but you have to use nmtui for first connection. then it just works.

Useful tips

You can access your (pmOS) internal storage using this command;

 /home/user # tcpsvd -vE 172.16.42.1 21 ftpd -A / 

Adding files fails with 500 Unknown command

You can add username logins:

 /home/user # tcpsvd -vE 172.16.42.1 21 ftpd -a user / 

You can change the directory:

 /home/user # tcpsvd -vE 172.16.42.1 21 ftpd -A /path/to/the/directory 

You can mount your sdcard

/home/user # mkdir /sdcard
/home/user # mount /dev/mmcblk1p1 /sdcard

You can also use udisks2 and gvfs, but sometimes doesn't work. For NTFS, you need ntfs-3g

Making it permanent

  • You can make mounting sdcard permanent;
/home/user # ash -c "echo 'sudo mount /dev/mmcblk1p1 /sdcard' > /etc/local.d/sdcard.start 
/home/user # chmod +x /etc/local.d/sdcard.start

You can mount system partitions:

/home/user # mkdir /system
/home/user # mount /dev/mmcblk0p23 /system
  • lsblk output
NAME             MAJ:MIN RM  SIZE RO TYPE MOUNTPOINTS                  
mmcblk0          179:0    0  7.3G  0 disk
├─mmcblk0p1      179:1    0    2M  0 part
├─mmcblk0p2      179:2    0    2M  0 part
├─mmcblk0p3      179:3    0    1M  0 part
├─mmcblk0p4      179:4    0    1M  0 part
├─mmcblk0p5      179:5    0    1M  0 part
├─mmcblk0p6      179:6    0    1M  0 part
├─mmcblk0p7      179:7    0    4M  0 part
├─mmcblk0p8      179:8    0    8M  0 part
├─mmcblk0p9      179:9    0    8M  0 part
├─mmcblk0p10     179:10   0    4M  0 part
├─mmcblk0p11     179:11   0    1M  0 part
├─mmcblk0p12     179:12   0    1M  0 part
├─mmcblk0p13     179:13   0    1M  0 part
├─mmcblk0p14     179:14   0    1M  0 part
├─mmcblk0p15     179:15   0    1M  0 part
├─mmcblk0p16     179:16   0    2M  0 part
├─mmcblk0p17     179:17   0   20M  0 part
├─mmcblk0p18     179:18   0    5M  0 part
├─mmcblk0p19     179:19   0    1M  0 part
├─mmcblk0p20     179:20   0   16M  0 part
├─mmcblk0p21     179:21   0   16M  0 part
├─mmcblk0p22     179:22   0  200M  0 part
├─mmcblk0p23     179:23   0  1.5G  0 part /system
├─mmcblk0p24     179:24   0   12M  0 part
└─mmcblk0p25     179:25   0  5.5G  0 part
  ├─mmcblk0p25p1 254:0    0  243M  0 part /boot
  └─mmcblk0p25p2 254:1    0  5.3G  0 part /
mmcblk0boot0     179:32   0    4M  1 disk
mmcblk0boot1     179:64   0    4M  1 disk
mmcblk0rpmb      179:96   0    4M  0 disk
mmcblk1          179:128  0 14.4G  0 disk
└─mmcblk1p1      179:129  0 14.2G  0 part
zram0            253:0    0    0B  0 disk
  • fdisk output
dido@katanakralligi ~ % sudo fdisk -l
GPT PMBR size mismatch (15253503 != 15269887) will be corrected by write.
The backup GPT table is corrupt, but the primary appears OK, so that will be used.
The backup GPT table is not on the end of the device.
Disk /dev/mmcblk0: 7.28 GiB, 7818182656 bytes, 15269888 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 52444E41-494F-2044-4D4D-43204449534B

Device            Start      End  Sectors  Size Type
/dev/mmcblk0p1     8192    12287     4096    2M Microsoft basic data
/dev/mmcblk0p2    12288    16383     4096    2M Microsoft basic data
/dev/mmcblk0p3    16384    18431     2048    1M Microsoft basic data
/dev/mmcblk0p4    18432    20479     2048    1M Microsoft basic data
/dev/mmcblk0p5    20480    22527     2048    1M Microsoft basic data
/dev/mmcblk0p6    22528    24575     2048    1M Microsoft basic data
/dev/mmcblk0p7    24576    32767     8192    4M Microsoft basic data
/dev/mmcblk0p8    32768    49151    16384    8M Microsoft basic data
/dev/mmcblk0p9    49152    65535    16384    8M Microsoft basic data
/dev/mmcblk0p10   65536    73727     8192    4M Microsoft basic data
/dev/mmcblk0p11   73728    75775     2048    1M Microsoft basic data
/dev/mmcblk0p12   75776    77823     2048    1M Microsoft basic data
/dev/mmcblk0p13   77824    79871     2048    1M Microsoft basic data
/dev/mmcblk0p14   79872    81919     2048    1M Microsoft basic data
/dev/mmcblk0p15   81920    83967     2048    1M Microsoft basic data
/dev/mmcblk0p16   83968    88063     4096    2M Microsoft basic data
/dev/mmcblk0p17   88064   129023    40960   20M Microsoft basic data
/dev/mmcblk0p18  129024   139263    10240    5M Microsoft basic data
/dev/mmcblk0p19  139264   141311     2048    1M Microsoft basic data
/dev/mmcblk0p20  141312   174079    32768   16M Microsoft basic data
/dev/mmcblk0p21  174080   206847    32768   16M Microsoft basic data
/dev/mmcblk0p22  206848   616447   409600  200M Microsoft basic data
/dev/mmcblk0p23  616448  3688447  3072000  1.5G Microsoft basic data
/dev/mmcblk0p24 3688448  3713023    24576   12M Microsoft basic data
/dev/mmcblk0p25 3713024 15239167 11526144  5.5G Microsoft basic data


Disk /dev/mmcblk0rpmb: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/mmcblk0boot1: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/mmcblk0boot0: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/mmcblk1: 14.41 GiB, 15476981760 bytes, 30228480 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 15ABED9C-4A0D-46E7-A919-7041E3FACB4C

Device          Start      End  Sectors  Size Type
/dev/mmcblk1p1 499712 30226431 29726720 14.2G Linux root (ARM)


Disk /dev/mapper/mmcblk0p25p1: 243 MiB, 254803968 bytes, 497664 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/mapper/mmcblk0p25p2: 5.26 GiB, 5645516288 bytes, 11026399 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
dido@katanakralligi ~ %

Input

HID buttons

  • event0: sci-keypad
    • home, power, volume keys
      • you can check raw data from /dev/input/event0

Touchscreen

  • event1: MELFAS_MMS449_Touchscreen
    • in portrait
    • includes "Recents" and back buttons
    • stops working on suspend, cat /sys/class/input/event1/device/device/device_enable reenables it
    • try a non-forceful reboot if it doesn't appear
  • Touchscreen Fix: you need to add this to /etc/X11/xorg.conf.d/00-fbdev-rotate-CCW.conf
Section "Device"
    Identifier "LCD"
    Driver "fbdev"
    Option "Rotate" "CCW"
EndSection
  • Note:this changes screens rotation
  • You can also add this at /etc/udev/rules.d/00-touchscreen-dev.rules:
SUBSYSTEM=="input", ATTRS{phys}=="1-0048/input0", ENV{LIBINPUT_CALIBRATION_MATRIX}="0 1 0 -1 0 1"

This needs a full reboot.

Headset

  • event2: headset-keyboard
    • works

Accelerometer

  • event3: accelerometer_sensor (STM K2HH)

Have to do this to get it working:

# echo 0 > /sys/class/input/event3/device/poll_delay
# echo 1 > /sys/class/input/event3/device/enable

You can confirm it working with evtest

Issues or Errors

  • Did you notice that error in fdisk output above?(also occurs on gparted)
    • To fix that error, just enter fdisk and write the changes.

And error is gone.
But comes after a reboot (idk why)

  • Error details:
GPT PMBR size mismatch (15253503 != 15269887) will be corrected by write.
The backup GPT table is corrupt, but the primary appears OK, so that will be used.
The backup GPT table is not on the end of the device.
  • Fdisk verify output:
No errors detected.
Header version: 1.0
Using 25 out of 128 partitions.
A total of 38845 free sectors is available in 2 segments (the largest is 15 MiB).
  • In any DE with polkit, sometimes an error occurs that policykit has crashed. so any apps with root/changing brightness will not work. It sometimes works, sometimes doesn't.

No matter what, in dock or app menu no apps are displayed. So don't use xfce.

Additional notes