Jump to content

Samsung Galaxy S9 (samsung-starqltechn): Difference between revisions

From postmarketOS Wiki
m rollbackEdits.php mass rollback
Tag: Rollback
Dsankouski (talk | contribs)
m fix kernel and aport links
 
(20 intermediate revisions by 7 users not shown)
Line 4: Line 4:
| codename = samsung-starqltechn
| codename = samsung-starqltechn
| image = File:SM-G9600.jpg
| image = File:SM-G9600.jpg
| imagecaption = SM-G9600
| imagecaption = SM-G9600 with SXMO running Firefox (WIP kernel from dsankouski repository)
| releaseyear = 2018
| releaseyear = 2018
| originalsoftware = Android
| originalsoftware = Android
Line 16: Line 16:
| memory = 4 GB
| memory = 4 GB
| architecture = aarch64
| architecture = aarch64
| type = handset
| pmoskernel =  
| pmoskernel =  
<!-- the following status_* questions should be answered with Y - yes, P - partial, N - no, or left blank (for untested or unknown) -->
<!-- the following status_* questions should be answered with Y - yes, P - partial, N - no, or left blank (for untested or unknown) -->
| status_usbnet = Y
| status_usbnet = Y
| status_flashing = N
| status_flashing = N
| status_touch =  
| status_emmc = Y
| status_screen = N
| status_sdcard = Y
| status_touch = Y
| status_screen = Y
| status_wifi = N
| status_wifi = N
| status_xwayland =  
| status_xwayland =  
| status_fde = <!-- When installing with full disk encryption, can you type in the password with the on screen keyboard = Y
| status_fde = <!-- When installing with full disk encryption, can you type in the password with the on screen keyboard = Y
| status_mainline = <!-- Instead of a Linux kernel fork, it is possible to run mainline. -->
| status_battery = Y
| status_battery = <!-- Charging the battery with charging-sdl is possible -->
| status_3d = <!-- Hardware accelerated 3D graphics (e.g. with freedreno) --> Y
| status_3d = <!-- Hardware accelerated 3D graphics (e.g. with freedreno) -->
| status_accel = <!-- The sensor that measures proper acceleration works -->
| status_accel = <!-- The sensor that measures proper acceleration works -->
| status_audio = <!-- Using the device's speakers/headphone jack works -->
| status_audio = <!-- Using the device's speakers/headphone jack works -->
| status_bluetooth = <!-- It's possible to pair and use other devices via the bluetooth protocol -->
| status_bluetooth = <!-- It's possible to pair and use other devices via the bluetooth protocol --> N
| status_camera = <!-- Taking photos and videos works. -->
| status_camera = <!-- Taking photos and videos works. -->
| status_gps = <!-- The Global Positioning System sensor works.  -->
| status_gps = <!-- The Global Positioning System sensor works.  -->
| status_mobiledata = <!-- Connecting to the Internet via cellular network. -->
| status_mobiledata = <!-- Connecting to the Internet via cellular network. --> Y
| status_sms = <!-- Sending and receiving short messages works as intended. -->
| status_sms = <!-- Sending and receiving short messages works as intended. --> Y
| status_calls = <!-- Talking to other people over the cellular network. -->
| status_calls = <!-- Talking to other people over the cellular network. -->
| status = <!-- Text displayed in the "not booting" table on the Devices page , e.g "kernel compiles, doesn't boot" -->
| status = <!-- Text displayed in the "not booting" table on the Devices page , e.g "kernel compiles, doesn't boot" -->
| booting = yes<!-- The device is booting at all, can be yes/no *IMPORTANT* -->
| packaged = yes
| category = community
| status_otg =  
| status_otg =  
| status_haptics = Y
| whet_dhry =  
| whet_dhry =  
| status_uboot = yes
| status_uboot = Y
| status_uboot_mainline = Y
| status_uboot_mainline = N
| status_uboot_primary = N
| status_uboot_primary = N
| status_uboot_secondary = Y
| status_uboot_secondary = Y
Line 53: Line 57:


-->
-->
}}
}}  


== Contributors ==
== Contributors ==
Line 59: Line 63:


== Maintainer(s) ==
== Maintainer(s) ==
* [[User:Dsankouski|Dsankouski]]
<!-- Only if this device doesn't run on linux-postmarketos yet! -->
<!-- Only if this device doesn't run on linux-postmarketos yet! -->
<!-- This person needs to be willing to answer questions from users of this device -->
<!-- This person needs to be willing to answer questions from users of this device -->
Line 75: Line 80:
== Installation ==
== Installation ==


=== Flash boot image from TWRP ===
=== Prerequisites ===
<code>adb push $BOOT_IMAGE_PATH /tmp/boot.img && adb -d shell 'dd of=/dev/block/platform/soc/1d84000.ufshc/by-name/boot if=/tmp/boot.img'</code>
==== Upgrade ====


== Mainline ==
Before installing postmarketOS, it's recommended that you upgrade your device to the latest release of Android. This is not a requirement but is heavily recommended.
Mainline kernel can be booted with stock bootloader or u-boot. Logs may be viewed from pstore(ramoops) or simple framebuffer.  


=== Status ===
==== Unlock the bootloader ====
* <span style="color:green">Green lines - works</span>
* <span style="color:blue">Blue - in progress</span>
* <span style="color:red">Red - backlog</span>


==== Roadmap ====
Before installing postmarketOS you have to unlock your bootloader.
* <span style="color:green">boots</span>
<span style="color:red">Remember, it will irrevocably trip knox flag, hence making Samsung pay no longer usable.
* <span style="color:green">framebuffer
</span>
* <span style="color:green">storage, both main and sdcard
* <span style="color:blue">touchscreen driver (dsankouski)
* <span style="color:red">muic driver(max77705), at least detect usb cable</span>
* <span style="color:red">assemble firmware package in aports</span>
* <span style="color:blue">wifi (dsankouski)</span>
* <span style="color:red">bluetooth</span>
* <span style="color:red">display panel driver</span>


=== Assembling boot image ===
1. Open setting, go to "About phone", then "Software information" and tap on the "Build number" box ~10 times until the "You are now a developer" toast message appears.
* clone mainline sources
* build kernel. See also [[Compiling_kernels_with_envkernel.sh]]
* append dtb to gzipped kernel image
** pushd .output/arch/arm64/boot
** <code>cat Image.gz dts/qcom/sdm845-samsung-starqltechn.dtb > Image.gz-dtb</code>
* generate initramfs image
* make android bootimage <code>mkbootimg --base 0x0 --kernel_offset 0x00008000 --ramdisk_offset 0x02000000 --tags_offset 0x01e00000 --pagesize 4096 --second_offset 0x00f00000 --ramdisk "$INITRAMFS" --kernel Image.gz-dtb -o boot.img</code>


== U-boot ==
2. Go back to the main settings page, go to "Developer options". Toggle the switch to "OEM unlocking"


Has support in main tree, can boot PostmarketOS and Android.


See also [https://u-boot.readthedocs.io/en/latest/board/qualcomm/sdm845.html u-boot sdm845 docs]
=== Manual build ===


== Notes ==
The vendor is Samsung, the codename is "starqltechn".
=== Uart ===


`/dev/ttyHS8` can be exposed on USB D+D- lines. It's configured in data mover mode by downstream kernel.
Follow the [[pmbootstrap]] article, until you have done the install action (note that <code>--fde</code> stands for full-disk-encryption - this can also be left out).
<pre>
pmbootstrap install --fde
</pre>


=== Getting logs from pstore ===
Reboot back into flash mode as explained above.
Boot to twrp, and check <code>/sys/fs/pstore</code> folder


=== Stock bootloader ===
By default the rootfs will be flashed to system, this doesn't leave much free space for your applications / data, if you don't mind factory resetting the device you can instead flash to userdata by specifying the partition like below.
Loads payload into ram at random physical address for security reason.
 
Initramfs physical load address is 0xa2000000 both for boot image and recovery image
<pre>
pmbootstrap flasher flash_rootfs --partition userdata --method heimdall-bootimg --no-reboot
pmbootstrap flasher flash_kernel --method heimdall-bootimg --resume
</pre>
 
The phone should reboot into PostmarketOS now.
 
=== Post install ===
==== pd-mapper ====
Kernel CONFIG_QCOM_PD_MAPPER option was disabled in 6.13 due to 'some weird race conditions', and we stick with userspace pd-mapper. Since starqltechn relies on `msm-firmware-loader` package to link phone's firmware (as opposed to dedicated firmware package in majority sdm845 devices), starqltechn has non standard firmware location, and pd-mapper should be built with [https://github.com/linux-msm/pd-mapper/pull/16 firmware class parameter path support].
 
Build instructions:
* clone [https://github.com/dsankouski/pd-mapper/tree/support_msm_firmware_loader dsankouski pd-mapper repo] 
* checkout support_msm_firmware_loader branch 
* <code>make</code>
* copy pd-mapper to phone at <code>/usr/bin/pd-mapper</code>


== See also ==
== See also ==
<!--
<!--
Link to related gitlab issues or merge requests like the following (replace CHANGEME with the ID, e.g. 1234):
Link to related gitlab issues or merge requests like the following (replace CHANGEME with the ID, e.g. 1234):
* {{MR|https://gitlab.com/postmarketOS/pmaports/merge_requests/510|pmaports}} Initial merge request
* {{MR|510|pmaports}} Initial merge request
* {{issue|CHANGEME|pmaports}} Some related issue
* {{issue|CHANGEME|pmaports}} Some related issue
You can also add normal web links:
You can also add normal web links:
* [https://redmine.replicant.us/projects/replicant/wiki/GalaxyS2I9100 Replicant wiki page]
* [https://redmine.replicant.us/projects/replicant/wiki/GalaxyS2I9100 Replicant wiki page]
-->
-->
[https://gitlab.com/postmarketOS/pmaports/-/merge_requests/2835 aport MR]
{{MR|2835|pmaports}}
 
{{MR|6493|move_device_to_community}}


[https://github.com/u-boot/u-boot/tree/master/board/samsung/starqltechn u-boot]
[https://github.com/u-boot/u-boot/tree/master/board/samsung/starqltechn u-boot]


[https://github.com/u-boot/u-boot/blob/master/doc/board/qualcomm/sdm845.rst u-boot sdm845 devices docs]
[https://docs.u-boot.org/en/stable/board/qualcomm/board.html u-boot qcom devices docs]


[https://gitlab.com/dsankouski/pmaports/-/tree/device/samsung-starqltechn aport fork for SM-G9600]
[https://gitlab.com/sdm845-mainline/linux SDM845 mainline kernel]


[https://gitlab.com/dsankouski/sdm845-linux-next/-/tree/starqltechn mainline kernel fork for SM-G9600]
=== Internal pages ===
{{Special:Prefixindex|prefix=Samsung_Galaxy_S9_(samsung-starqltechn)/|hideredirects=1|stripprefix=0}}

Latest revision as of 10:11, 2 August 2025

Samsung Galaxy S9 (SM-G9600
DS)
SM-G9600 with SXMO running Firefox (WIP kernel from dsankouski repository)
SM-G9600 with SXMO running Firefox (WIP kernel from dsankouski repository)
Manufacturer Samsung
Name Galaxy S9 (SM-G9600
DS)
Codename samsung-starqltechn
Released 2018
Type handset
Hardware
Chipset Qualcomm Snapdragon 845 (SDM845)
CPU Octa-core (4x 2.8 GHz Kryo 385 Gold
4x 1.7 GHz Kryo 385 Silver)
GPU Adreno 630
Display 5.8 inch 18.5:9, 2960 x 1440 pixel 568 PPI, capacitive touchscreen, 10 multi-touch points, Super AMOLED, Corning Gorilla Glass 5, glossy: yes
Storage 64 GB
Memory 4 GB
Architecture aarch64
Software
Android 8
Android 10
postmarketOS
Category community
yes
Device package device-samsung-starqltechn
Kernel package linux-postmarketos-qcom-sdm845
Features
Broken
Works
Works
Works
Works
Touchscreen
Works
Multimedia
Untested
Camera
Untested
Connectivity
WiFi
Broken
Bluetooth
Broken
GPS
Untested
Modem
Calls
Untested
SMS
Works
Mobile data
Works
Miscellaneous
Works
Untested
Sensors
Untested
Haptics
Works
U-Boot
Broken
Works
Broken
Works

Contributors

  • dsankouski

Maintainer(s)

Users owning this device


How to enter flash mode

Hold Power + Volume Down + Bixby until screen shows vendor logo. Use Odin or Heimdall to flash.

Installation

Prerequisites

Upgrade

Before installing postmarketOS, it's recommended that you upgrade your device to the latest release of Android. This is not a requirement but is heavily recommended.

Unlock the bootloader

Before installing postmarketOS you have to unlock your bootloader. Remember, it will irrevocably trip knox flag, hence making Samsung pay no longer usable.

1. Open setting, go to "About phone", then "Software information" and tap on the "Build number" box ~10 times until the "You are now a developer" toast message appears.

2. Go back to the main settings page, go to "Developer options". Toggle the switch to "OEM unlocking"


Manual build

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

Follow the pmbootstrap article, until you have done the install action (note that --fde stands for full-disk-encryption - this can also be left out).

pmbootstrap install --fde

Reboot back into flash mode as explained above.

By default the rootfs will be flashed to system, this doesn't leave much free space for your applications / data, if you don't mind factory resetting the device you can instead flash to userdata by specifying the partition like below.

pmbootstrap flasher flash_rootfs --partition userdata --method heimdall-bootimg --no-reboot
pmbootstrap flasher flash_kernel --method heimdall-bootimg --resume

The phone should reboot into PostmarketOS now.

Post install

pd-mapper

Kernel CONFIG_QCOM_PD_MAPPER option was disabled in 6.13 due to 'some weird race conditions', and we stick with userspace pd-mapper. Since starqltechn relies on `msm-firmware-loader` package to link phone's firmware (as opposed to dedicated firmware package in majority sdm845 devices), starqltechn has non standard firmware location, and pd-mapper should be built with firmware class parameter path support.

Build instructions:

  • clone dsankouski pd-mapper repo
  • checkout support_msm_firmware_loader branch
  • make
  • copy pd-mapper to phone at /usr/bin/pd-mapper

See also

pmaports!2835

move_device_to_community!6493

u-boot

u-boot qcom devices docs

SDM845 mainline kernel

Internal pages