Jump to content

Samsung Galaxy S7 (samsung-herolte)

From postmarketOS Wiki

This is Samsung's flagship "Galaxy S" series Smartphone, released in March of 2016. It was, and still somewhat is - extremely popular in most regions, with a large ammount of units being sold worldwide. The first production variants are shipped with a build of Android 6.0 Marshmallow. It's [1] operating system is labeled as "Samsung Experience".

Some units were manufactured in late 2018. They include a newer build of Android 8.1 Oreo, also released for the older variants. This one does have the same model designation as before. They are fully compatible with each other.

Note Note that the only difference between these two seems to be the hardware revision and a new dark blue PCB color.

The international variant can be unlocked and has good unofficial Android (LineageOS) Community support, maintained by Open Source developers. Notably, by Ivan Meler.[2]

This entry was almost universally praised after the mostly disliked Galaxy S6. It has a similar panel to that device, a faster SoC, and a more reasonable design than a modified "Galaxy S5" housing with additional glue. It also has glue.

Note As a matter of fact, this device will boot Android and run completely fine. With no battery, or BMS installed! All that is needed is a 9 Volt charger, and a USB data cable. You read that correctly.

This mobile computer is easily relevant in the current era. It's still powerful and has high specs. The device codename is "Hero". It could be...

Samsung Galaxy S7
Samsung Galaxy S7 running PMOS SXMO
Samsung Galaxy S7 running PMOS SXMO
Manufacturer Samsung
Name Galaxy S7
Codename samsung-herolte
Model SM-G930F/DS
Released 2016
Type handset
Hardware
Chipset Exynos 8890 Octa
CPU 4x 2.3GHz Mongoose M1
4x 1.6GHz Cortex-A53
GPU 650MHz Mali-T880 MP12
Display 5.1 inch 16:9, 1440x2560 60 Hz Super AMOLED, 24 Bit (16777216 colors)
Storage 32/64 GB UFS 2.0 + microSDXC + USB OTG
Memory 4 GB 1794MHz LPDDR4X dual-channel
Architecture aarch64
Software
Original software
The software and version the device was shipped with.
Android 6.0.1
Extended version
The most recent supported version from the manufacturer.
Android 8.1
Optional software Android (LineageOS) (Unofficial)
FOSS bootloader no
postmarketOS
Pre-built images
Whether pre-built images are available from the postmarketOS Installation page.
no
Mainline
Instead of a Linux kernel fork, it is possible to run (Close to) Mainline.
no
Device package device-samsung-herolte
Kernel package linux-samsung-herolte
Firmware package firmware-samsung-herolte
Note This page is about all Exynos 8890 "S7" herolte variants. See #Similar devices.

Contributors

  • Polynomdivision

Users owning this device


Model variants

Galaxy S7 (Duos) "Hero"

  • SM-G9300 (China, MSM8996) - Incompatible! Needs a page. See SoC.
  • SM-G930A (US?, Carrier?) - Locked! Compatible? Booting?
  • SM-G930F (Global) - Compatible. Booting?
  • SM-G930FD (Global, Dual SIM) - Like G930F.
  • SM-G930xxx - Possibly locked. Compatible?
Note Most variants are single SIM, "Duos" ones (DS models) are hybrid dual SIM.

Galaxy S7 Edge (Duos) "Hero2"

  • SM-G9350 (China, MSM8996) - Incompatible! Needs a page. See SoC.
  • SM-G935F (Global) - Currently seperate page.
  • SM-G935FD (Global, Dual SIM) - Like G935F.
  • SM-G935xxx - Possibly locked. Compatible?

Also see #Similar devices for details on the "7" (2016) generation of Samsung Galaxy phones.

Note This includes most Exynos 8890 devices ever sold to consumers. Needs more research. And a lot more documentation.

Boot modes

Recovery (using Samsung bootloader) - hold Home+Volume Up+Power, or (with USB debugging enabled) - execute $ adb reboot recovery on a connected USB host

DFU (Odin/Download) mode - hold Home+Volume Down+Power, or (with USB debugging enabled) - execute $ adb reboot download on a connected USB host

Hard reset - hold Volume Down+Power

JTAG mode - Needs more research.

Possibly more.

Note Note: The PARAM partition contains display images for a "Kernal Panic Upload Mode" and others. Samsung[3] firmware needs more documentation.

Installation

  • Install TWRP recovery as described here.
  • Wipe the device while in TWRP.
  • Put device in DFU (Odin/Download) mode.
  • Execute $ pmbootstrap flasher flash_kernel to flash the kernel. (Note: You do not need to reflash the kernel if you want to install a different pmOS rootfs.)
  • Reboot Device into TWRP Recovery and execute pmbootstrap install --android-recovery-zip (Note that you could also add --recovery-install-partition=/dev/mmcblk0 to make it install to a micro SD card in the device.)
  • While in TWRP, enable sideloading by going to Advanced -> ADB Sideload and then execute $ pmbootstrap flasher --method=adb sideload

Alternative methods

  • After creating the rootfs, execute $ pmbootstrap export and write the images by executing $ adb push /tmp/pmbootstrap-export/samsung-herolte-root.img /dev/block/sda18 (for DATA), or (for SYSTEM) use sda14. (BOOT is sda5.) (Note that DATA can make "Samsung Experience" very unhappy. See #Firmware tools for a solution.)
  • A standard SD card installation will only require you to flash the initfs to BOOT.
  • Note that you could also use img2simg to compress them, if you need to use DFU mode. Or, use dd. It should also work fine.

Downstream kernel

Currently broken? Needs testing!

Warning WARNING: It may freeze during boot when using the latest firmware revision! (G930FXXU8EVH2) This is unconfirmed for older firmware builds.

What works

  • Compiling the kernel and booting (!314)
  • Wifi with the proprietary firmware (!309)
  • Display
  • TouchScreen
  • Flashing via android recovery zip
  • Wayland/Weston/Xwayland

Known issues

  • May not boot! Needs testing! And possibly, extensive investigation!
  • Using # apk upgrade can cause loading forever... Be aware of it.
  • Not sure if this still applies: The last time I got pmOS to actually boot on it, the WiFi unit would not work anymore, after disabling it once. The only soulution I found, was to reinstall. The OS. Note that this was a while ago, and may not be accurate.

Mainline kernel

Unsupported. The SoC is not in mainline and has no compatible mainline kenel fork!

Mainlining TODO

  • Create a DTS for this SoC, and one for this device. Possibly more for Samsung specific features/bugs. See Samsung Galaxy S8 (samsung-dreamlte). Note that the Android kernel for this one is based on Linux 4.x.
  • Look at uniLoader for booting.
  • Test it on Hero.
  • Possibly add the Edge variants. Or, create a seperate DTS for them.
  • Extensive testing to ensure board compatibility.
  • Create panel drivers.
  • Extensive testing to ensure compatibility.
  • Add any known working drivers. Be careful about the camera subsystem. It may cause fun problems, like not booting.
  • More extensive testing.
  • Whatever is necessary to mainline this SoC.
  • A lot more extensive testing.
  • Possible to add other Exynos 8890 devices. There seems to be one other phone by Meizu. Apart from that, only Samsung phones are known. Also see #Model variants.
  • A large ammount of extensive testing.
  • Possible Exynos 8890 generic device port?
  • You know what comes next...

Mainlining Notes

For uniLoader:

  • To enable the framebuffer we need to write 0x1290 to address 0x13960070. To get this value search for the decon_f base address and add 0x70 (HW_SW_TRIG_CONTROL) to it, then use devmem2 together with the value you calculated on a downstream kernel with CONFIG_DEVMEM enabled.
  • The MUIC UART is located under address 0x14c50000. To get minimal output follow this guide (add 0x20 to the UART address for the TX offset).
  • This isn't necessary anymore, as uniLoader got support for the S7 in commit bf49d01.
  • Consider merging the S7 Edge and this one into a combined kernel build for Exynos Galaxy "Hero" devices. This is already partially done in Android, and could enable us to mix some parts from both devices. Galaxy Note 7 "Grace" could also be similar enough. Needs investigation.

Notes

Development

Hardware

Parts Hardware Driver Notes Status
GPU Mali-T880 MP12
Modem Exynos Shannon 335
Touchscreen ?
Panel ?
Fuelgauge MAX77854
Accelerometer/Gyroscope K6DS3TR
Ambient Light/Proximity TMD49xx
Magnetometer YAS537 yas537 Driver in mainline, same as samsung-serranove. Untested, has driver.
Barometer LPS25H
Hall Effect ?
Grip Sensor ?
HRM Sensor ?
Home Button ?
Fingerprint ?
Touch Keys ? Like tm2-touchkey?
Status LED ?
Haptics ?
Sound ?
Front Camera ?
Back Camera ?

Input Events in Android

Event Source
0 Touchkeys
1 Touchscreen
2 ?
3 ?
4 ?
5 ?
6 ?
7 ?
8 Power/Volume/Home
9 ?
10 ?

Useful software

Recovery builds

Andoid builds

Ubuntu Touch builds

Firmware tools

Packages

Links

Source code

Wiki pages

Specifications

Similar devices

References

  1. It. Beware it as well when dealing with Samsung. You have been warned.
  2. Ivan Meler, unoffical Android (LineageOS) maintainer for 8890/8895.
  3. Samsung. A somewhat friendly giant.