View Single Post
Posts: 40 | Thanked: 70 times | Joined on Oct 2019
#528
When I was tinkering with Sailfish on Nexus 5 I had to realize that many relevant info are kind of all over the net. As I did not see a recent straightforward noob install guide, I just created one. So anyone having Android on the Nexus 5 but wanting to try Sailfish can save time.


If you have Nexus 5 with Android -
Noob install guide based on CM13 and SFOS 3.0.3.9 (for Linux):

I. Requirements
- 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:
fastboot devices
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
fastboot devices
- 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-3.0.3.9 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 3.1.0.12
- 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:
ssh nemo@192.168.2.15
- Use password. After the connection was established, check the repos:
ssu lr
- Remove adaptation-community (not to mix with adaptation-community-common)
ssu dr adaptation-community

- add new adaptation-community-hammerhead repo:

Code:
ssu ar adaptation-community-hammerhead http://repo.merproject.org/obs/home:/mautz:/sfos-latest/sailfishos_3.1.0.12_latest/
- add new adaptation-community-common-hammerhead repo as well:

Code:
ssu ar adaptation-community-common-hammerhead http://repo.merproject.org/obs/nemo:/testing:/hw:/common/sailfishos_3.1.0.12/
Run:
ssu release 3.1.0.12

- On the phone open terminal in Sailfish and then run:
devel-su
(Use same password as for ssh)
- Run:
passwd root
Choose password, type twice

- Now back to the terminal (ssh) window and run:
su
- Use root password and at the root prompt run:
pkcon refresh

- Finally Upgrade sailfish:
version --dup

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:
multirom-20170314-v33a-UNOFFICIAL-hammerhead.zip
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

I have a wrong (missing?) icon in the upper right corner and don't know how to get rid of it. And did not figure out yet how to change the battery icon. Do you still need sensorsfix.zip? I did not use it.

Last edited by sailor; 2019-10-23 at 00:47.
 

The Following 4 Users Say Thank You to sailor For This Useful Post: