PostmarketOS Installation
Installation steps on how to 'Linux your Android' using PMos
Our phones:
- Working (Community): Oneplus 6 (1x), Samsung Galaxy A3 (5x), Samsung Galaxy SIII (1x)
- Experimental (Testing): Oneplus One (1x), Samsung Galaxy Grand Prime (1x), Samsung Galaxy S7 Edge, any iOS
PMos in Three Steps
1. Identify your phone model
2. Find your device in the community section (or testing if applicable)
3. Download and install the latest stable release of SXMO (or any other UI) on the install page (walkthroughs below)
Walkthroughs
Oneplus 6
Prerequisites:
1. Inside Ubuntu, open the terminal and install fastboot
(If asking for UEFI toogle: Accept, set pwd)
sudo apt install fastboot (or android-tools)
2. Unlock the bootloader of the phone:
- Open Settings, go to "About" and tap on the "Build number" box ~10 times until the "You are now a developer" message appears.
- Go back to the main settings page, go to "System" and then "Developer options" (it might be hidden behind a dropdown menu). Toggle the switch to "Enable OEM unlocking"
Install PMos
1. Enter Flash-Mode:
- While OFF: Hold Power and Volume Up until you see a screen showing information about the device
2. Plug-In USB, make sure the device is recognised by running fastboot devices
3. Unlock by running: fastboot oem unlock
4. Say yes to all, delete internal storage, the device will reboot.
5. Back on PC: Download and unzip both pre-built images (img.xz and boot-img.xz):
- Navigate to the Downloads folder
cd ~/Downloads
and unzip the .xz archivesunxz --keep [file name, press tab to fill out automatically]
6. In the PC terminal enter the following commands:
fastboot erase dtbo
fastboot flash boot [the file that ends in -boot.img]
fastboot flash userdata [the other file]
- If you see <waiting for any device>, try running as
sudo
and restart your device into fastboot mode again.
8. After flashing use the following command to reboot device
fastboot reboot
9. YOU DID IT!
Samsung Galaxy A3
1. Install heimdall
and fastboot
. In the terminal run the following:
sudo apt-get install heimdall-flash fastboot
2. Download Samsung A3 1k2nd bootloader lk2nd-msm8916.img
- If you use a browser to download this file, it will end up in the users
Downloads
folder. In order to follow along with the guide, make sure you cd to theDownloads
folder by writingcd ~/Downloads
in the terminal
3. Shutdown the phone, and boot it holding the HOME button & volume down.
4. Connect the phone to the PC using a micro USB cable
5. In the terminal, enter the following command to flash the downloaded firmware:
heimdall flash --BOOT lk2nd-msm8916.img
6. The phone should boot into the ik2nd bootloader
7. Download a pre-built image with sxmo-de-sway. Make sure to download the .xz
file without boot
in the filename.
8. Unpack the .xz
archive
unxz --keep 20241002-0701-postmarketOS-v24.06-sxmo-de-sway-1.15.0-samsung-a3.img.xz
9. Flash PostmarketOS
fastboot flash userdata 20241002-0701-postmarketOS-v24.06-sxmo-de-sway-1.15.0-samsung-a3.img
10. Erase system and reboot the phone
fastboot erase system && fastboot reboot
11. DONE! The phone should boot into PostmarketOS
Samsung Galaxy SIII
1. Enter Flash-Mode:
- While OFF: Hold Power and Volume Up
2. Flash postmarketOS rootfs image onto microSD
- Download and unzip both pre-build images (img.xz and boot-img.xz):
- Navigate to the Downloads folder
cd ~/Downloads
and unzip the .xz archivesunxz --keep [file name, press tab to fill out automatically]
- flash the one that doesn't end in boot onto the micro sd
- plug micro sd into phone
3. Enter odin mode.
- Turn off phone
- Hold power, home and volume down buttons until warning screen.
- Plug in with cable to computer.
- Push vol down to continue into odin mode
4. Flash boot
- Download Heimdall
heimdall flash --BOOT <Decompressed image filename> --verbose
- After this is done the phone should automatically reboot into pmOS
Additionally:
- Connecting to wifi was troublesome. the networks will show up but connections didn't last/work. a hack that wasn't necessarily endorsed is mentioned in the wiki. this seemed to save my issues. "If WiFi networks show up but you can't connect to them, you can try using the nvram for samsung-m3/i9305."
How to:
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
Trouble with phone shutting down often and randomly even when charging:
- What seemed to fix it was to in config toggle 'auto-suspend' and 'auto-screen-off' off
(Walkthroughs: Testing)
Oneplus One
Partial 3D, broken USB OTG, broken audio & camera
Installation through pmbootstrap:
sudo apt install pmbootstrap
pmbootstrap init
3. Configuration questions
- Work path: return
- channel: choose edge (return)
- device: oneplus-bacon
- UI: use console
- Rest hit return
4. Bring phone into flashing mode
- While OFF, hold volume up and power until the device vibrates
5. Flash
pmbootstrap flasher boot pmbootstrap flasher flash_rootfs --partition userdata
Samsung Galaxy Grand Prime
1. Download lk2nd-msm8916.img from Releases page on Github
2. Boot your phone to bootloader (Odin/Download) mode by holding Volume Down and Home while powering up.
3. Follow lk2nd instructions to install lk2nd.
- Basically flash it to the boot partition
heimdall flash --BOOT lk2nd-msm8916.img
4. Follow Qualcomm_Snapdragon_410/412_(MSM8916) Installation to install postmarketOS.
Post Installation Steps
SSH
By default, SSH
is disabled. To start the SSH daemon
run the following command:
sudo service sshd start
To start the SSH daemon
automatically when your phone starts, enable the service:
sudo rc-update add sshd
Connect to device
Find your IP XXX.XXX.XXX.XXX
ip a
Connect by running
sudo user@ipadress