Jump to content

Samsung Galaxy S III (samsung-m0): Difference between revisions

From postmarketOS Wiki
Colaur (talk | contribs)
Madhaxbro (talk | contribs)
No edit summary
 
(156 intermediate revisions by 40 users not shown)
Line 1: Line 1:
{{Infobox device
{{Infobox device
<!-- Main -->
| manufacturer = Samsung
| manufacturer = Samsung
| name = Galaxy S III LTE
| name         = Galaxy S III
| codename = samsung-i9305
| codename     = samsung-m0
| image = File:Samsung-i9300-galaxy-s-iii-ofic.jpg
| model        = <!-- Manufacturer's model/part number, e.g. 2312DRA50G -->
| imagecaption = Samsung Galaxy SIII LTE
| image       = File:Samsung-m0.png
| releaseyear = 2012
| imagecaption = Samsung Galaxy S III
| originalsoftware = Android 4.1.1
| releaseyear = 2012
| chipset = Exynos 4412 Quad
| prereleaseyear = <!-- If the device was announced earlier than release -->
| cpu = Quad-core 1.4 GHz Cortex-A9
 
| gpu = Mali-400MP4
| booting = yes
| storage = 16 GB
| status  = <!-- Text displayed in the non-booting box, e.g "kernel compiles, doesn't boot" -->
 
| packaged = yes
| category = community
 
 
<!-- Hardware -->
| chipset = Samsung Exynos 4412 Quad
| cpu     = Quad-core 1.4 GHz Cortex-A9
| gpu     = Mali 400 MP4
| som    = <!-- Only applicable for carrier boards -->
| display = 720x1280 Super AMOLED
| display = 720x1280 Super AMOLED
| memory = 2 GB
| storage = 16/32/64 GB
| architecture = armhf
| memory = 1 GB (GT-i9300 & SHW-M440S)
| status_usbnet = Y
| architecture = armv7
| status_flashing =  
| wp_type =
| status_touch = Y
 
| status_screen = Y
 
| status_wifi = Y
<!-- Software -->
| status_xwayland = Y
| originalsoftware = Android
| status_fde = Y
| originalversion  = 4.1.1
| status_mainline =  
| extendedversion  = <!-- Latest supported manufacturer OS version -->
| status_battery =
| optionalsoftware = <!-- Other OS options -->
| status_3d =  
| status_fossbootloader = P
| status_accel =  
 
| status_audio =  
 
| status_bluetooth =
<!-- PostmarketOS -->
| status_camera =
| type          = handset
| status_gps =  
| pmoskernel    = <!-- Kernel version used in postmarketOS -->
| status_mobiledata =  
| whet_dhry    = 0.0 <!-- UnixBench score, see [[Unixbench]] -->
| status_sms =  
| genericdevice = <!-- Name of the generic port page -->
| status_calls =  
| optionalgenericdevice = no <!-- yes to change the genericdevice box into an optional genericdevice box -->
| booting = yes
| kernelpackage = <!-- {{Kernel package|device-codename|category}} -->
| devicepackage = <!-- {{Device package|device-codename|category}} -->
| firmwarepackage = <!-- {{Firmware package|device-codename|category}} -->
 
<!-- Warning / Note boxes / Miscellaneous -->
| supported      = yes <!-- no if device cannot run postmarketOS (see [[Category:Unsupported Devices]]) -->
| prebuiltimages = no  <!-- yes if prebuilt images are aviable on the pmOS website -->
| boot_internal_storage = <!-- no if the device can't boot from internal storage -->
| bootable_media = <!-- Specify the media type that can be used to boot pmOS, e.g "USB Stick" -->
| changearch    = <!-- Optional, text displayed in the "changearch" box, e.g "armv7" -->
 
| initial_MR  = <!-- {{MR|CHANGE_ME|pmaports}} -->
| related_post = <!-- {{Lemmy|CHANGE_ME_TO_POST_ID}} -->
 
 
 
<!-- Features -->
<!--
For each of the following questions about device functionality, please respond as follows:
- Y for Yes    - if the feature works as expected
- P for Partial - if the feature works partially
- N for No      - if the feature does not work
- - for N/A    - if the feature is not applicable for the device
-  Leave blank - if the feature has not been tested
-->
 
<!-- Main Features -->
| status_flashing = Y <!-- Flashing with pmbootstrap -->
| status_usbnet  = P <!-- USB networking -->
| status_emmc    = Y <!-- Internal storage -->
| status_sdcard  = Y <!-- SD card support -->
| status_battery  = Y <!-- Battery percentage/charging -->
| status_screen  = Y <!-- Built-in display/embedded display connector -->
| status_touch    = Y <!-- Touchscreen -->
| status_keyboard = - <!-- Build in Physical Keyboard -->
| status_touchpad = - <!-- Build in Physical Touchpad -->
| status_stylus  = - <!-- Stylus/digital pen -->
 
 
<!-- Multimedia Features -->
| status_3d     = Y <!-- 3D acceleration -->
| status_dvb    = - <!-- TV tuner -->
| status_audio = P <!-- Speakers/headphones -->
| status_camera = P <!-- Rear/front cameras -->
| status_cameraflash = - <!-- Flash/torch -->
| status_irtx  = - <!-- IR transmitter -->
| status_irrx  = - <!-- IR receiver -->
 
 
<!-- Connectivity Features -->
| status_wifi  = Y <!-- Wi-Fi -->
| status_bluetooth = P <!-- Bluetooth -->
| status_ethernet = - <!-- Wired Ethernet -->
| status_gps   = N <!-- GPS -->
| status_nfc  = - <!-- NFC -->
| status_calls = N <!-- Cellular calls -->
| status_sms  = N <!-- SMS -->
| status_mobiledata = N <!-- Mobile data -->
 
 
<!-- Miscellaneous Features -->
| status_fde  = Y <!-- Full Disk Encryption -->
| status_usba = - <!-- USB-A ports -->
| status_sata = - <!-- SATA -->
| status_otg  = Y <!-- USB OTG -->
| status_hdmidp = P <!-- HDMI/DisplayPort -->
 
 
<!-- Sensors -->
| status_accel    = Y <!-- Accelerometer -->
| status_magnet    = - <!-- Magnetometer -->
| status_light    = Y <!-- Ambient light -->
| status_proximity = - <!-- Proximity sensor -->
| status_hall      = - <!-- Hall effect -->
| status_haptics  = - <!-- Vibration/haptics -->
| status_barometer = - <!-- Barometer -->
| status_powersensor = - <!-- Power sensor -->
 
 
<!-- U-Boot (optional, for devices running U-Boot) -->
<!--
| status_uboot          = Y
| status_uboot_primary  = Y
| status_uboot_secondary = -
| status_uboot_mainline  = N
| status_uboot_internalstorage =
| status_uboot_sd        =
| status_uboot_usbhost  =
| status_uboot_usbperipheral =
| status_uboot_screen    =
| status_uboot_keyboard  = -
| status_uboot_buttons  =
-->
}}
}}
'''So far, what works for samsung-i9305 (Galaxy SIII LTE version) also works for the samsung-i9300 (Galaxy SIII international GSM version without LTE).  (Neither of these SIII models should be confused with the North American SIII models, which require OS builds.)'''


== Contributors ==
== Contributors ==
* [[User:Thiagaoplusplus|Thiagaopluplus]]
* tyxieblub
* tyxieblub
* [[User:Newbyte|Newbyte]]
* [[User:Grimler|Grimler]]


== Maintainer(s) ==
== Maintainer(s) ==
<!-- Only if this device doesn't run on linux-postmarketos yet! -->
* [[User:Newbyte|Newbyte]]
<!-- This person needs to be willing to answer questions from users of this device -->
 
== Basic Info ==
 
So far, what works for [[Samsung Galaxy S III LTE (samsung-m3)]] also works for the samsung-m0 (Galaxy S III international GSM version without LTE, Also known as Galaxy S III 3G SHW-M440S in South Korea) and samsung-shv-e210s (a Korean variant). (None of these S III models should be confused with the North American S III models, which require OS builds.)
 
Code name is MIDAS. Search for midas-mainline to find more info.
 
== Users owning this device ==
{{Device owners}}


== How to enter flash mode ==
== How to enter flash mode ==
Line 51: Line 164:
== Installation ==
== Installation ==


Set phone to ODIN mode
=== Step 1: Flash the system ===
 
==== Option 1: Flash the system to an SD card ====
 
Start by flashing a pre-built postmarketOS rootfs image onto an SD card, as described in the [[installation]] article.
 
==== Option 2: Flash the system to the phone's internal storage ====
 
{{note|'''Note:''' If this runs into errors, please use option 1.}}
 
'''Prepare img2simg'''
 
Start by downloading and building [https://github.com/anestisb/android-simg2img/ simg2img], make sure that it's runnable from somewhere, you can just copy the generated binaries, (only 'img2simg' is needed), in /usr/bin and make them executable with chmod.
 
'''Prepare needed images - Option 1: Use a ''pre-built'' image'''
 
Download a pre-built postmarketOS rootfs image (GNOME mobile recommended, others ran into errors for me, more testing required), and extract it with any xz-supporting archive software, make sure to NOT extract the .img itself, only the .xz.
 
'''Prepare needed images - Option 2: Use a image you built yourself with ''pmbootstrap'''''
 
Follow the instructions at [[Installation/Using_pmbootstrap|this Wiki page]] till "''Flashing''", since you won't flash the image yet, instead do
pmbootstrap export
and copy your rootfs image (usually named '''samsung-m0.img''') from the output directory to a working directory.
 
'''Convert the image into ''Android sparse format'''''
 
The next step is to convert the rootfs image into an ''Android sparse image''.
 
This is needed so we can flash the image in ''download mode''.
 
To do this, we will use ''img2simg''. Run this in the directory where you downloaded/saved the rootfs image:
img2simg path-to-rootfs.img pmos-sparse.img
The command might take some time to be executed, but once done, you will have an Android sparse image of postmarketOS ("pmos-sparse.img").
 
'''Flash the image'''
 
The next step is to flash that image with Heimdall. Note: you might need to repeat these steps if Android overwrites the USERDATA partition. Anyways, to flash the image, we need to enter ODIN mode as described in [https://wiki.postmarketos.org/wiki/Samsung_Galaxy_S_III_(samsung-m0)#Step_2:_Enter_ODIN_mode Enter ODIN mode], and run this command:
heimdall flash --USERDATA pmos-sparse.img
 
=== Step 2: Enter ODIN mode ===
 
To enter ODIN mode, follow these steps:


   1. Turn off phone
   1. Turn off phone
  3. Hold Volume Down + Home + Power until you get Warning!! screen
   2. Connect USB cable
   2. Connect USB cable
   3. Hold VOLUME_DOWN + HOME + POWER until you get Warning!! screen
   4. Push Volume up to continue to ODIN mode screen
  4. Push VOLUME_UP to continue to ODIN mode screen
 
=== Step 3: Flash the kernel via ODIN mode ===
 
Now, use Heimdall to flash the image with -boot at the end to your boot partition. Make sure that you extract it before flashing it (the downloaded file is a compressed .tar.xz archive).
 
Flash it with this command:
 
heimdall flash --BOOT <Decompressed image filename> --verbose
 
Note that it's important to write BOOT in all capitalised letters, as otherwise you will get an error about the partition not being found in the PIT.
 
After that's done, your device should now automatically reboot into postmarketOS!
 
== WiFi ==
 
As of {{MR|2556|pmaports}}, WiFi should "just work" (on mainline).
 
If WiFi networks show up but you can't connect to them, you can try using the nvram for samsung-m3/i9305. This is a hack and not necessarily endorsed, but at least one user has reported that their samsung-m0/i9300 needs this for WiFi to work. We would like to handle this better, but currently we don't have any way of doing this.
 
To switch to the nvram meant for samsung-m3, run this command:
 
<syntaxhighlight lang="shell-session>
$ cd /lib/firmware/brcm
$ sudo mv brcmfmac4334-sdio.samsung,i9300.txt brcmfmac4334-sdio.samsung,i9300.txt.bak
$ sudo ln -sf brcmfmac4334-sdio.samsung,i9305.txt brcmfmac4334-sdio.samsung,i9300.txt
</syntaxhighlight>
 
If it still refuses to connect, you might want to try replacing the contents of <code>/lib/firmware/bcrm/brcmfmac4334-sdio.samsung,i9300.txt</code> with [https://raw.githubusercontent.com/TheMuppets/proprietary_vendor_samsung/cm-14.1/smdk4412-common/proprietary/etc/wifi/nvram_net.txt the nvram from LineageOS]. Apparently this is necessary on some British i9300 models.
 
Related issue: {{issue|1571|pmaports}}
 
== Video out ==
 
[[File:Samsung-m0-video-out.jpg|400px|thumb|right|Samsung Galaxy S III providing video out to a TV through an original Samsung dock (model name: EDD-S20EWE).]]
 
Video out should work as long as you use an 11pin MHL cable or dock (safest option would be an original Samsung dock/adapter from the time period, Samsung's EDD-S20EWE is known to work).
 
In 2022-09, all hdmi related nodes were disabled ({{MR|3395|pmaports}}) as the kernel driver reports the wrong state, and this led to the Phosh stack not starting up.
A WIP to fix issue can be found at [https://gitlab.com/exynos4-mainline/linux/-/tree/m0-mhl-fixes gitlab.com/exynos4-mainline/linux/-/tree/m0-mhl-fixes].
 
== Battery ==
 
With mainline, battery reporting works as of {{MR|2423|pmaports}}, and charging works as of {{MR|2546|pmaports}}. Charging allegedly randomly stops, but should that happen you can just unplug and re-plug the cable. Charging is also very slow and the device will probably lose power if you use it while charging.


At this point you can follow the [[Installation guide | general installation guide]].
Battery reporting and charging via postmarketOS does not work on the downstream kernel - the device gets stuck on whatever percentage it was on boot (although it does charge in recovery mode)
Installation to the system is not yet supported for the device, so make sure to install postmarketOS to the sdcard. Also be sure to not enable FDE as osk-sdl is not yet supported for this device, and enabling it would require you to telnet into the device to unlock it.


== Modem ==


==Installing with downstream kernel==
The modem does not work in postmarketOS. That said, there was some work done to enable the modem on the i9300 variant of this device. It can be found here: https://github.com/fourkbomb/linux/tree/modem. Note that even if you apply this, you would likely need userspace patches as well for calls and mobile data to be usable.


== Wifi ==
== Audio ==


To get the wifi working, you'll need to modify the wpa_supplicant configuration. If this is not done, wpa_supplicant starts with -ip2p0 which is not supported on our device.
Audio mostly works. Notable omissions are input from the main microphone and headset audio out.


  $ echo 'wpa_supplicant_args="-iwlan0 -Dwext"' | sudo tee /etc/conf.d/wpa_supplicant
== GPS ==
Write the following file to <source>/etc/network/interfaces</source>


  auto lo
The Galaxy S III uses [[Broadcom BCM4751 GPS]].
  iface lo inet loopback 
  auto wlan0
  iface wlan0 inet dhcp


To connect using NetworkManger you will need to change the default DHCP client from the NetworkManager internal DHCP client to dhclient (you will need to specify the additional package at install with pmbootstrap or apk add dhclient if you have a connection) by creating <source>/etc/NetworkManager/conf.d/dhcp-client.conf</source> and adding
== Miscellaneous mainline kernel information ==
 
  [main]
  dhcp=dhclient


Start the networkmanger service and restart networking service
The kernel package for this device in postmarketOS is {{Template:pmaport|linux-postmarketos-exynos4}}. The patches can be found in the [https://gitlab.com/exynos4-mainline/linux exynos4-mainline/linux repository on GitLab].


  $ sudo rc-service networkmanger start
A large part of the mainlining process was done by [https://github.com/fourkbomb forkbomb]; see [http://blog.forkwhiletrue.me/pages/midas-mainline/ Midas on Mainline].
  $ sudo rc-service networking restart


Search for available WiFi networks and connect to network
The Replicant project also provides good mainline support for the Galaxy S III; [https://gitlab.postmarketos.org/postmarketOS/pmbootstrap/-/merge_requests/1219#note_85246108 they have expressed intent to collaborate with us]. Their support matrix can be found [https://redmine.replicant.us/projects/replicant/wiki/GalaxyS3I9300 on their wiki]. Relevant links:


  $ sudo nmcli device wifi list ifname wlan0
* [https://redmine.replicant.us/projects/replicant/wiki/GalaxyS3I9300 General information]
  $ sudo nmcli device wifi connect "$SSID" password "$PASSWORD" ifname wlan0
* [https://redmine.replicant.us/projects/replicant/wiki/Exynos4Bootrom More bootloader research is here.]
* [https://git.replicant.us/replicant-next/kernel_replicant_linux Replicant's mainline kernel git repo]


Set services to start
Upstream DTS: [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm/boot/dts/exynos4412-i9305.dts exynos4412-i9305.dts]


  $ sudo rc-update add wpa_supplicant boot
=== Alternative bootloaders ===
  $ sudo rc-update add networking default
  $ sudo rc-update add networkmanager default


Reboot and you should be connected on boot.
* forkbomb got mainline u-boot running on this device and wrote about it in this blog post: https://blog.forkwhiletrue.me/posts/an-almost-fully-libre-galaxy-s3/
* [https://github.com/xboot/xboot/tree/b71fe8174882277897649bfe2177bf3ca300af69/src/arch/arm32/mach-exynos4412 xboot] might be a completely free bootloader option. Looks to have zero proprietary blobs.


You may also connect directly using wpa_supplicant forgoing NetworkManager. Please note this method will not automatically reconnect to WiFi if you loose connection
=== Modem support ===


$ wpa_passphrase YOUR_SSID YOUR_PASSPHRASE | sudo tee /etc/wpa_supplicant/wpa_supplicant.conf
Replicant supports the modem on mainline Linux, and they're working on getting the i9300 modem working with a mainline kernel in a way that pmOS can also utilize: https://redmine.replicant.us/issues/1954 https://git.replicant.us/contrib/GNUtoo/kernel_replicant_linux/log/?h=replicant-11-i9300-modem
$ sudo rc-service wpa_supplicant restart


The Qualcomm Gobi MDM9615 Modem seems to have mainline kernel support as well: https://redmine.replicant.us/projects/replicant/wiki/GalaxyS3I9305#Hardware-table


== Mainline Kernel ==
LTE modem support with the mainline kernel on Replicant is being done here: https://redmine.replicant.us/issues/2206 The Note II discussed here has the same or very similar modem as the i9305.
The mainline kernel now has some support for the Samsung Galaxy SIII LTE (i9305):


Upstream dts: [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm/boot/dts/exynos4412-i9305.dts exynos4412-i9305.dts]
== Warnings and considerations ==


Upstream status: [http://blog.forkwhiletrue.me/pages/midas-mainline/ Midas on Mainline].
=== Power ===


Note that [https://github.com/fourkbomb/linux/commit/2a6027178ae40c1d3baa965fe21b19cbf09493ce a patch is required] to make it work with the stock samsung bootloader.
It used to be that the battery percentage wasn't properly monitored and would get stuck at a set percentage at boot. While this was the case, the phone would not shut down when battery levels went too low, which could make the phone behave strangely on significantly worn batteries (in the ballpark of 50% wear). There are theories that this may have caused hardware failure for one user, but this is not proven. Battery level reporting has since been fixed, but it has not been extensively tested for reliability, so we recommend that you try to not let your phone's battery percentage fall too low. It should shut down on its own before anything adverse can happen, however.


forkbomb from LineageOS got mainline u-boot running on this device:
See {{issue|1115|pmaports}} for more information.
[https://blog.forkwhiletrue.me/posts/an-almost-fully-libre-galaxy-s3/]


Replicant has this device booting with mainline Linux and almost mainline U-Boot with only the need for a few patches on top and would like to collaborate with us [https://github.com/postmarketOS/pmbootstrap/pull/1219#issuecomment-395876420]
=== eMMC firmware bugs ===


The Qualcomm Gobi MDM9615 Modem seems to have mainline kernel support as well: [https://redmine.replicant.us/projects/replicant/wiki/GalaxyS3I9305#Hardware-table]
Replicant has a good article about this: https://redmine.replicant.us/projects/replicant/wiki/EMMCFirmwareBugs


Replicant and LineageOS successfully got the Lima driver for Mesa working on Mali when using mainline linux: [http://www.belg.in/replicant_9.webm video] [https://github.com/CustomROMs/android_local_manifests_i9300/issues/1#issuecomment-532308101 success announcement]
=== Heimdall does not consider partition sizes when flashing ===


Replicant currently supports this device [https://redmine.replicant.us/projects/replicant/wiki/GalaxyS3I9300 in 6.0] and is doing a lot of research in order to get it running with [https://redmine.replicant.us/projects/replicant/wiki/Upstream a mainline kernel with a mainline bootloader] for Replicant 9. [https://redmine.replicant.us/projects/replicant/wiki/Exynos4Bootrom More bootloader research is here.]
See {{github|494|Heimdall|Benjamin-Dobell}}


[https://github.com/xboot/xboot/tree/b71fe8174882277897649bfe2177bf3ca300af69/src/arch/arm32/mach-exynos4412 xboot] might be a completely free bootloader option. Looks to have zero proprietary blobs.
== See also ==
* {{wikipedia|Samsung_Galaxy_S_III|Wikipedia}}
* {{Device package|samsung-m0|community}}
* {{Kernel package|postmarketos-exynos4|community}}
* [https://media.ccc.de/v/34c3-8784-emmc_hacking_or_how_i_fixed_long-dead_galaxy_s3_phones Fix long dead Galaxy S3 phone eMMC bug]
* [https://toomoch.github.io/i9300-EMMC-GUIDE/ Guide to revive a bricked i9300 EMMC]
* {{MR|2556|pmaports}} Rename from i9300 to m0
* [https://github.com/ungeskriptet/miscellaneous/raw/main/twrp-3.6.0_9-i9300_emmc-boot-partitions-patch.img TWRP with eMMC boot partitions patch], useful for flashing bootloaders

Latest revision as of 19:40, 16 August 2025

Samsung Galaxy S III
Samsung Galaxy S III
Samsung Galaxy S III
Manufacturer Samsung
Name Galaxy S III
Codename samsung-m0
Released 2012
Type handset
Hardware
Chipset Samsung Exynos 4412 Quad
CPU Quad-core 1.4 GHz Cortex-A9
GPU Mali 400 MP4
Display 720x1280 Super AMOLED
Storage 16/32/64 GB
Memory 1 GB (GT-i9300 & SHW-M440S)
Architecture armv7
Software
Android 4.1.1
Android
FOSS bootloader partial
postmarketOS
Category community
no
yes
0.0
Device package device-samsung-m0
Kernel package linux-postmarketos-exynos4
Features
Works
Partial
Works
Works
Works
Works
Touchscreen
Works
Multimedia
3D Acceleration
Works
Partial
Camera
Partial
Connectivity
WiFi
Works
Bluetooth
Partial
GPS
Broken
Modem
Calls
Broken
SMS
Broken
Mobile data
Broken
Miscellaneous
Works
Works
Partial
Sensors
Works
Ambient Light
Works

Contributors

Maintainer(s)

Basic Info

So far, what works for Samsung Galaxy S III LTE (samsung-m3) also works for the samsung-m0 (Galaxy S III international GSM version without LTE, Also known as Galaxy S III 3G SHW-M440S in South Korea) and samsung-shv-e210s (a Korean variant). (None of these S III models should be confused with the North American S III models, which require OS builds.)

Code name is MIDAS. Search for midas-mainline to find more info.

Users owning this device


How to enter flash mode

  • Hold power + Home + volume down
  • When prompted, release all buttons and press volume up

Installation

Step 1: Flash the system

Option 1: Flash the system to an SD card

Start by flashing a pre-built postmarketOS rootfs image onto an SD card, as described in the installation article.

Option 2: Flash the system to the phone's internal storage

Note Note: If this runs into errors, please use option 1.

Prepare img2simg

Start by downloading and building simg2img, make sure that it's runnable from somewhere, you can just copy the generated binaries, (only 'img2simg' is needed), in /usr/bin and make them executable with chmod.

Prepare needed images - Option 1: Use a pre-built image

Download a pre-built postmarketOS rootfs image (GNOME mobile recommended, others ran into errors for me, more testing required), and extract it with any xz-supporting archive software, make sure to NOT extract the .img itself, only the .xz.

Prepare needed images - Option 2: Use a image you built yourself with pmbootstrap

Follow the instructions at this Wiki page till "Flashing", since you won't flash the image yet, instead do

pmbootstrap export

and copy your rootfs image (usually named samsung-m0.img) from the output directory to a working directory.

Convert the image into Android sparse format

The next step is to convert the rootfs image into an Android sparse image.

This is needed so we can flash the image in download mode.

To do this, we will use img2simg. Run this in the directory where you downloaded/saved the rootfs image:

img2simg path-to-rootfs.img pmos-sparse.img

The command might take some time to be executed, but once done, you will have an Android sparse image of postmarketOS ("pmos-sparse.img").

Flash the image

The next step is to flash that image with Heimdall. Note: you might need to repeat these steps if Android overwrites the USERDATA partition. Anyways, to flash the image, we need to enter ODIN mode as described in Enter ODIN mode, and run this command:

heimdall flash --USERDATA pmos-sparse.img

Step 2: Enter ODIN mode

To enter ODIN mode, follow these steps:

 1. Turn off phone
 3. Hold Volume Down + Home + Power until you get Warning!! screen
 2. Connect USB cable
 4. Push Volume up to continue to ODIN mode screen

Step 3: Flash the kernel via ODIN mode

Now, use Heimdall to flash the image with -boot at the end to your boot partition. Make sure that you extract it before flashing it (the downloaded file is a compressed .tar.xz archive).

Flash it with this command:

heimdall flash --BOOT <Decompressed image filename> --verbose

Note that it's important to write BOOT in all capitalised letters, as otherwise you will get an error about the partition not being found in the PIT.

After that's done, your device should now automatically reboot into postmarketOS!

WiFi

As of pmaports!2556, WiFi should "just work" (on mainline).

If WiFi networks show up but you can't connect to them, you can try using the nvram for samsung-m3/i9305. This is a hack and not necessarily endorsed, but at least one user has reported that their samsung-m0/i9300 needs this for WiFi to work. We would like to handle this better, but currently we don't have any way of doing this.

To switch to the nvram meant for samsung-m3, run this command:

$ cd /lib/firmware/brcm
$ sudo mv brcmfmac4334-sdio.samsung,i9300.txt brcmfmac4334-sdio.samsung,i9300.txt.bak
$ sudo ln -sf brcmfmac4334-sdio.samsung,i9305.txt brcmfmac4334-sdio.samsung,i9300.txt

If it still refuses to connect, you might want to try replacing the contents of /lib/firmware/bcrm/brcmfmac4334-sdio.samsung,i9300.txt with the nvram from LineageOS. Apparently this is necessary on some British i9300 models.

Related issue: pmaports#1571

Video out

Samsung Galaxy S III providing video out to a TV through an original Samsung dock (model name: EDD-S20EWE).

Video out should work as long as you use an 11pin MHL cable or dock (safest option would be an original Samsung dock/adapter from the time period, Samsung's EDD-S20EWE is known to work).

In 2022-09, all hdmi related nodes were disabled (pmaports!3395) as the kernel driver reports the wrong state, and this led to the Phosh stack not starting up. A WIP to fix issue can be found at gitlab.com/exynos4-mainline/linux/-/tree/m0-mhl-fixes.

Battery

With mainline, battery reporting works as of pmaports!2423, and charging works as of pmaports!2546. Charging allegedly randomly stops, but should that happen you can just unplug and re-plug the cable. Charging is also very slow and the device will probably lose power if you use it while charging.

Battery reporting and charging via postmarketOS does not work on the downstream kernel - the device gets stuck on whatever percentage it was on boot (although it does charge in recovery mode)

Modem

The modem does not work in postmarketOS. That said, there was some work done to enable the modem on the i9300 variant of this device. It can be found here: https://github.com/fourkbomb/linux/tree/modem. Note that even if you apply this, you would likely need userspace patches as well for calls and mobile data to be usable.

Audio

Audio mostly works. Notable omissions are input from the main microphone and headset audio out.

GPS

The Galaxy S III uses Broadcom BCM4751 GPS.

Miscellaneous mainline kernel information

The kernel package for this device in postmarketOS is linux-postmarketos-exynos4. The patches can be found in the exynos4-mainline/linux repository on GitLab.

A large part of the mainlining process was done by forkbomb; see Midas on Mainline.

The Replicant project also provides good mainline support for the Galaxy S III; they have expressed intent to collaborate with us. Their support matrix can be found on their wiki. Relevant links:

Upstream DTS: exynos4412-i9305.dts

Alternative bootloaders

Modem support

Replicant supports the modem on mainline Linux, and they're working on getting the i9300 modem working with a mainline kernel in a way that pmOS can also utilize: https://redmine.replicant.us/issues/1954 https://git.replicant.us/contrib/GNUtoo/kernel_replicant_linux/log/?h=replicant-11-i9300-modem

The Qualcomm Gobi MDM9615 Modem seems to have mainline kernel support as well: https://redmine.replicant.us/projects/replicant/wiki/GalaxyS3I9305#Hardware-table

LTE modem support with the mainline kernel on Replicant is being done here: https://redmine.replicant.us/issues/2206 The Note II discussed here has the same or very similar modem as the i9305.

Warnings and considerations

Power

It used to be that the battery percentage wasn't properly monitored and would get stuck at a set percentage at boot. While this was the case, the phone would not shut down when battery levels went too low, which could make the phone behave strangely on significantly worn batteries (in the ballpark of 50% wear). There are theories that this may have caused hardware failure for one user, but this is not proven. Battery level reporting has since been fixed, but it has not been extensively tested for reliability, so we recommend that you try to not let your phone's battery percentage fall too low. It should shut down on its own before anything adverse can happen, however.

See pmaports#1115 for more information.

eMMC firmware bugs

Replicant has a good article about this: https://redmine.replicant.us/projects/replicant/wiki/EMMCFirmwareBugs

Heimdall does not consider partition sizes when flashing

See Heimdall#494

See also