Jump to content

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

From postmarketOS Wiki
m add install details
No edit summary
Line 36: Line 36:


'''So far, what works for samsung-i9305 (Galaxy SIII LTE version) also works for the samsung-i9300 (Galaxy SIII international GSM version without LTE) and samsung-shv-e210s (a Korean variant). (None of these SIII models should be confused with the North American SIII models, which require OS builds.)'''
'''So far, what works for samsung-i9305 (Galaxy SIII LTE version) also works for the samsung-i9300 (Galaxy SIII international GSM version without LTE) and samsung-shv-e210s (a Korean variant). (None of these SIII models should be confused with the North American SIII models, which require OS builds.)'''
== Users owning this device ==
{{Device owners}}


== Contributors ==
== Contributors ==

Revision as of 08:00, 29 April 2020

Warning WARNING: This device is not recommended for future use with postmarketOS due to its armhf architecture. Alpine Linux (the distribution that postmarketOS extends) pmaports#599 has been considering dropping it.
The processor of the device may support the armv7 architecture. If so, you can modify the device package and change the architecture accordingly.
Samsung Galaxy S III LTE
Samsung Galaxy SIII LTE
Samsung Galaxy SIII LTE
Manufacturer Samsung
Name Galaxy S III LTE
Codename samsung-i9305
Released 2012
Hardware
Chipset Exynos 4412 Quad
CPU Quad-core 1.4 GHz Cortex-A9
GPU Mali-400MP4
Display 720x1280 Super AMOLED
Storage 16 GB
Memory 2 GB
Architecture armhf
Software
Original software Android 4.1.1
postmarketOS
Category testing
Pre-built images no
Features
Flashing
No data
USB Networking
Works
Internal storage
No data
SD card
No data
Battery
No data
Screen
Works
Touchscreen
Works
Multimedia
3D Acceleration
No data
Audio
No data
Camera
No data
Camera Flash
No data
Connectivity
WiFi
Works
Bluetooth
No data
GPS
No data
NFC
No data
Modem
Calls
No data
SMS
No data
Mobile data
No data
Miscellaneous
FDE
Works
USB OTG
No data
HDMI/DP
No data
Sensors
Accelerometer
No data
Magnetometer
No data
Ambient Light
No data
Proximity
No data
Hall Effect
No data
Haptics
No data
Barometer
No data


So far, what works for samsung-i9305 (Galaxy SIII LTE version) also works for the samsung-i9300 (Galaxy SIII international GSM version without LTE) and samsung-shv-e210s (a Korean variant). (None of these SIII models should be confused with the North American SIII models, which require OS builds.)

Users owning this device


Contributors

  • tyxieblub
  • colaur

Maintainer(s)

How to enter flash mode

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

Installation

Set phone to ODIN mode

 1. Turn off phone
 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
# Ready the build
pmbootstrap init (weston or xfce4 should do)

# Install rootfs to Micro SD Card
pmbootstrap --sdcard=/dev/mmcblk0/1/2/3 # (will depend on where your Micro SD Card is mounted)

# Put the i9305 / i9300 into odin mode with the steps above and flash the kernel (to boot from the Micro SD Card)
pmbootstrap flasher flash_kernel # (in odin mode)

# and it should reboot automatically

Installing with downstream kernel

#FIRST PMBOOTSTRAP INSTALL
mkdir ~/code
cd ~/code
git clone https://gitlab.com/postmarketOS/pmbootstrap.git

#CONFIG PMBOOTSTRAP
alias pmbootstrap=~/code/pmbootstrap/pmbootstrap.py
pmbootstrap init
#work path default
#samsung
#i9305
#n
#wathever
#weston
#n
#none
#y
#samsung-i9305
#y

#FOR DEBUGGING (NOT REQUIRED)
pmbootstrap initfs hook_add debug-shell
#Check log with 'tail -f ~/.local/var/pmbootstrap/log.txt'

#CREATE RECOVERY ZIP (for flashing with TWRP)
pmbootstrap install --no-fde --android-recovery-zip

#COPY ON SDCARD
cp ~/.local/var/pmbootstrap/chroot_buildroot_armhf/var/lib/postmarketos-android-recovery-installer/pmos-samsung-i9305.zip /media/computer/sdcard/
#Insert sdcard in phone
#Reboot on recovery with up+home+power
#Install from zip
#Reboot

#IF BOOT STANDBY (DEBUG)
#Connect with USB cable
telnet 172.16.42.1
pmos_continue_boot

Wifi

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.

 $ echo 'wpa_supplicant_args="-Dwext"' | sudo tee /etc/conf.d/wpa_supplicant

You can use either Network manager or networking and wpa_supplicant. Network manager is recommend in most cases as it handles reconnection.

Network Manager

Ensure the networkmanger service is running

 $ sudo rc-status | grep 'networkmanager'

if it not visible, try to start the service:

 $ sudo rc-service networkmanager start

Search for available WiFi networks and connect to network

 $ sudo nmcli device wifi list ifname wlan0
 $ sudo nmcli --ask dev wifi connect SSID

Reboot and you should be connected.

Networking and wpa_supplicant

You will need to manually configure the interfaces by creating

/etc/network/interfaces

e.g.,

 $ sudo vi /etc/network/interfaces
  auto lo
  iface lo inet loopback
  auto wlan0
  iface wlan0 inet dhcp
  

Save changes and add networking to start with system

$ sudo rc-update add networking

Add WiFi network information

$ wpa_passphrase YOUR_SSID YOUR_PASSPHRASE | sudo tee /etc/wpa_supplicant/wpa_supplicant.conf

Restart services

$ sudo rc-service wpa_supplicant restart
$ sudo rc-service networking start

Mainline Kernel

The mainline kernel now has some support for the Samsung Galaxy SIII LTE (i9305):

Upstream dts: exynos4412-i9305.dts

Upstream status: Midas on Mainline.

Note that a patch is required to make it work with the stock samsung bootloader.

forkbomb from LineageOS got mainline u-boot running on this device: [1]

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 [2]

The Qualcomm Gobi MDM9615 Modem seems to have mainline kernel support as well: [3]

Replicant and LineageOS successfully got the Lima driver for Mesa working on Mali when using mainline linux: video success announcement

Replicant currently supports this device in 6.0 and is doing a lot of research in order to get it running with a mainline kernel with a mainline bootloader for Replicant 9. More bootloader research is here.

xboot might be a completely free bootloader option. Looks to have zero proprietary blobs.


Install with mainline kernel (WIP, not functional yet)

#Export image files in ~/.local/var/pmbootstrap/chroot_rootfs_samsung-i9305/boot/
pmbootstrap export

#5,3M -rw-r--r--  1 root root 5,3M déc.  22 20:31 boot.img-samsung-i9305 (initramfs + vmlinuz)
#1,3M -rw-r--r--  1 root root 1,3M déc.  22 20:31 initramfs-samsung-i9305
#6,1M -rw-r--r--  1 root root 6,1M déc.  22 20:31 initramfs-samsung-i9305-extra
#4,1M -rw-r--r--  1 root root 4,1M nov.   5 17:30 vmlinuz-samsung-i9305

#Get linux-next
cd ~/code
# Case 1 : first checkout
git clone https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git linux
cd linux/
git fetch origin
git reset --hard origin/master
# Case 2 : update
cd linux/
git checkout master
git pull

#Prepare compile with i9305 defconfig in ~/code/linux/arch/arm/configs
source ~/code/pmbootstrap/helpers/envkernel.sh
make exynos_defconfig
#DTS : Note that ~/code/linux/arch/arm/boot/dts/exynos4412-i9305.dts already exists and should work
#Makefile in ~/code/linux/arch/arm/boot/dts/ already contains this DTS

#Kernel compilation
make -j5

#Prepare shell
<code>
pmbootstrap chroot -- apk add abootimg android-tools mkbootimg dtbtool findutils
export DEVICE="$(pmbootstrap config device)"
export WORK="$(pmbootstrap config work)"
export TEMP="$WORK/chroot_native/tmp/mainline/"
mkdir -p "$TEMP"

#Patch boot image
cd ~/code/linux/.output/arch/arm/boot
cat zImage dts/exynos4412-i9305.dtb > "$TEMP"/zImage-dtb
cp "/tmp/postmarketOS-export/boot.img-$DEVICE" "$TEMP/boot.img"
pmbootstrap chroot
abootimg -u /tmp/mainline/boot.img  -k /tmp/mainline/zImage-dtb -c bootsize=8955904
exit

#Flash with Heimdall - WARNING - NOT FUNCTIONNAL YET
# enter download mode with down+home+power
# Connect usb
# click 'up'
heimdall detect
heimdall flash --BOOT ~/.local/var/pmbootstrap/chroot_native/tmp/mainline/boot.img