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 2015
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 downstream
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
Device package device-samsung-goyavewifi
Kernel package linux-samsung-goyavewifi
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.
Partial
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

  • Al3x
  • AmateurPenguin (Notes: gud)
  • Choc (Notes: running pmOS)
  • Ernk11323 (Notes: Running PostmarketOS)
  • HAKANKOKCU (Notes: Running PostmarketOS, have 2 which other has Lineage.)
  • Vicenre22 (Notes: i have 3 tablets (2 modded stock firmware and 1 for EDK2 porting with mainline))


How to enter flash mode

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

Installation

Warning WARNING: Your device WILL BE ERASED if you decide to install into userdata partiton.
Warning WARNING: You may need to flash stock rom if the flashing fails.

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

  • 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 larger than 3gb for flawless experience)
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
Note:sometimes heimdall can hang
7.run pmbootstrap flasher flash_kernel
8.Done!
Now you can ssh into your device!

For first boot: You need to wait atleast 3 or 5 minutes to lightdm fully appear.

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.

Display

Display works.

  • No gpu accel or drm, can only run x11.
  • Due to a patch "sprd swapped colors patch", no splash when booting.(Without the patch, Xorg crashes, both probably because the display is 16bit).
    • The error code of pbsplash is 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
  • Suspending doesnt work. 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 and on some themes (only in taskbar) and notifications.
    • a quick fix is changing themes.
  • if you want to change the scale (in lxqt) add these to /etc/environment
QT_SCALE_FACTOR=0.75
QT_AUTO_SCREEN_SCALE_FACTOR=0.75

You can change the numbers to increase or decrease the scale.

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 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.SCP to your device and copy to the home folder of your device

$ sudo scp ~/wifi/* # your user name@172.16.42.1:~/*
# then, in your device
$ sudo mkdir /system
$ sudo mkdir /system/etc
$ sudo mkdir /system/etc/wifi
$ sudo cp ~/* /system/etc/wifi
$ sudo reboot

Now wifi should work.

Added them here: HAKANKOKCU/firmware-samsung-goyavewifi

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

Photos

Here are some photos of the device. Black:

Camera

  • There is a video0 device.

sudo v4l2-ctl --stream-mmap --stream-count=1 --stream-to=raw.dat finishes with VIDIOC_REQBUFS returned -1 (Not a tty)
I'll try with sudo script /dev/tty0

Performance

  • Resource usages on goyavewifi when lxqt is running.

htop resource usages

  • This device can run firefox.
  • You can use NetSurf.
  • An example of netsurf showing this page.

netsurf

Useful tips

About swaps

  • You should enable swap for more ram and more performance.

You can make a swap file. Here is for a swap file sized 1024 MB;

~ $ dd if=/dev/zero of=/path/to/your/swapfile bs=256 count=4 # change path to your swapfile path (i recommend /system or /)
~ $ mkswap /path/to/your/swapfile # change the path
~ # swapon /path/to/your/swapfile # change the path
~ # nano /etc/fstab 
<add this line>
/path/to/your/swapfile swap swap sw,nofail 0 0 /path/to/your/swapfile
<end>

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

The fdisk output are located here

FAQ

How to find that the device is in the initramfs stage?

Step 1. Turn on the device and immediately plug in to pc. Step 2. Wait for USB device to appear. Step 3. When USB device appears,the device is booting the initramfs.

Booting to initramfs is usually takes 5.3 seconds.

What is the difference between other models of Tab 3?

  • The device (goyavewifi) SM-T113(NU) is Samsung Galaxy Tab 3 Lite 7.0 Value Edition
  • The device (goyawifi) SM-T110 is Samsung Galaxy Tab 3 Lite 7.0
  • The device (lt02) SM-T210 is Samsung Galaxy Tab 3 7.0

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
  • Rotation fix: 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 to fix touch with rotation
  • Udev fix ( no 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

  • 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.

  • Using system as a swap partition is broken.After rebooting the system will fail to boot even if the system is installed to userdata or any other partition.
  • Console or None selections on pmbootstrap init has display issues
  • You can install sxmo-de-dwm to system partition but there will not be any free space.
  • Changing kernel cmdline doesnt work.

UART

This device can log UART with 619K (or 680K) resistor. 151K wouldn't log almost any S-Boot logs but OS exec'ed with kexec would still log.

To get S-Boot logs, put 619K resistor between ID and GND. While it's powering on, hold home button to get logs. This seems permanent in my device but shouldn't really affect normal usage. Just logs more stuff if you have CONFIG_FRAMEBUFFER_CONSOLE on.

For some reason, sdcard doesn't want to work while UART is active with micro usb.

Additional notes