Sailfish noob install guide on Nexus 5 for GNU/Linux
I was tinkering with Sailfish and a Nexus 5. Did not find a straightforward install guide so I just wrote one. If you have Nexus 5 with Android:Noob install guide based on CM13 and SFOS 18.104.22.168 (for GNU/Linux):
- Make sure your computer has working adb and fastboot. Setup instructions can be found here:https://wiki.lineageos.org/adb_fastboot_guide.html
- Make sure your computer is able to mount android internal storage (e.g. on arch "yay -S jmtpfs" and "yay -S gvfs-tmp" are required).
- OpenSSH is required in order to ssh into the phone.
- Enable USB debugging on your device
(Settings/About/Software Information/Build number - tap seven times, go to Developer Options and enable USB debugging)
- If you receive and "insufficient permissions for device" message during the install process, try: adb kill-server
After that run: sudo adb start-server
II. Unlocking the bootloader
Warning: Unlocking the bootloader will erase all data on your device!
Before proceeding, ensure that your data you want to keep is backed up.
- Connect the device to your PC via USB.
- On the computer open a terminal and run:
adb reboot bootloader
- Once the device is in fastboot mode, verify your PC finds it by typing:
If you see no permissions try running fastboot as root.
- Run the following command to unlock the bootloader:
fastboot oem unlock
- If the device doesn’t automatically reboot, reboot it. It should now be unlocked.
- Since the device resets completely, you will need to re-enable USB debugging to continue.
III. Installing a custom recovery
- Download a custom recovery - you can download TWRP:http://www.mediafire.com/file/1cihx7...d_20150630.img
In the forum it says this multirom recovery is needed or you won't be able to flash sensorsfix3.zip after install.
Not sure if TWRP works from here: https://dl.twrp.me/hammerhead/
Connect your device to your PC via USB.
- On the computer open a terminal and run:
adb reboot bootloader
- Once the device is in fastboot mode, verify your PC finds it by typing
- Flash recovery onto your device (cd into the directory first which contains the .img file extracted from .zip):
fastboot flash recovery TWRP_multirom_hammerhead_20150630.img
- Now reboot into recovery to verify the installation.
IV. Installing CM13 from custom recovery
- Download the CM13 .zip from here:http://www.mediafire.com/file/970u3n...13_release.zip
- If you want multiboot, please check step VII. first and consider the hints there.
- If you aren’t already in recovery mode, reboot into recovery mode:
adb reboot recovery
- Optional: Tap the Backup button to create a backup. Make sure the backup is created in the external sdcard or copy it onto your computer as the internal storage will be formatted.
- Go to main menu then tap Wipe.
- Tap Format Data and continue with the formatting process. This will delete all files stored on the internal storage.
- Return to the previous menu and tap Advanced Wipe.
- Select the Cache and System partitions to be wiped and then Swipe to Wipe.
- Sideload the CM13 .zip package: On the device, select “Advanced”, “ADB Sideload”, then swipe to begin sideload.
- On the host machine sideload the package using:
adb sideload filename.zip
Once installation has finished, return to the main menu, tap Reboot and then System.
At this stage you can boot into CM13. We will flash Sailfish over it.
V. Flashing Sailfish over CM13
Once the phone is booted, enable developer mode again and connect it to the PC via USB.
Tap on the notification saying USB and choose "File Transfer" there. If the OS is set up correctly (see above jmtpfs, gvfs),
the phone will appear in the file manager (like Thunar or Nautilus, etc.).
- Download the SFOS-22.214.171.124 image:http://www.mediafire.com/file/9hkddf...0.3.9.zip/file
- Copy this image on the internal storage on the phone e.g. into the Downloads folder.
- Turn off the phone and reboot into recovery, which means: Press Volume Down and Power, at the screen with the droid choose "Recovery mode" with volume up and press power.
- At the TWRP screen tap Install and search for the SFOS .zip file. Tap on it and Swipe to Confirm Flash.
After reboot Sailfish should be working.
VI. Upgrade to 126.96.36.199
- After booting into Sailfish, configure internet connection.
- SSH into the phone (requires openssh package), so connect the phone to the computer via USB and first make sure the device is up:
sudo ip link set dev usb0(whatever) up
(instead of usb0(whatever) use the correct device name, check with "ip a" [or use ifconfig for these steps])
- Add an ip to the device
sudo ip a add 192.168.2.14/24 dev usb0(whatever)
- On Sailfish check under Settings/Developer Tools the password for ssh and run:
- Use password. After the connection was established, check the repos:
- Remove adaptation-community (not to mix with adaptation-community-common)
ssu dr adaptation-community
- add new adaptation-community-hammerhead repo:
ssu ar adaptation-community-hammerhead http://repo.merproject.org/obs/home:/mautz:/sfos-latest/sailfishos_188.8.131.52_latest/
- add new adaptation-community-common-hammerhead repo as well:
ssu ar adaptation-community-common-hammerhead http://repo.merproject.org/obs/nemo:/testing:/hw:/common/sailfishos_184.108.40.206/
ssu release 220.127.116.11
- On the phone open terminal in Sailfish and then run:
(Use same password as for ssh)
Choose password, type twice
- Now back to the terminal (ssh) window and run:
- Use root password and at the root prompt run:
- Finally Upgrade sailfish:
Once it's finished, reboot.
Check the "Known issues" section in the first post of the SailfishOS Nexus5 thread!
VII. Bonus: MultiROM
- It's possible to multi-boot Android, Sailfish, UBPorts, etc.
- It's important that the internal OS has a kernel with kexec-hardboot support (otherwise it won't work).
What you have to do is sideload an OS at step IV. - instead of CM13 one with kexec-hardboot.
- Once the OS is installed, boot into it and copy this file to the internal storage:
From here: https://androidfilehost.com/?fid=1899786940962593823
This multirom project is kind of abandoned, but it is still working.
- Copy also the CM13 .zip file and SFOS .zip file to the internal storage.
- Reboot into Recovery mode and first install multirom from the downloaded .zip file.
- In order to install Sailfish, tap Advanced, MultiROM and set Sailfish there. Choose the CM13 .zip and the SFOS .zip.
After install and reboot you should be able to choose Sailfish at the MultiROM screen.
It looks it also works with UBPorts (have not tested it yet): https://github.com/nnn1590/MultiROMM...g/v1.188-fixed