View Single Post
edp17's Avatar
Posts: 592 | Thanked: 706 times | Joined on Jul 2019 @ UK
#50
OTA update to 4.2 is ready.
The problem with wifi (keeps forgetting the password after every boot) remains. There is a workaround below.

Here is the instruction on what to do:

OTA 4.1 to 4.2
!IMPORTANT!
If you are on the kernel with waydroid support (hybris-boot-sfos42-06-waydroid.img), first you must flash the original cm14.1 kernel (hybris-boot-sfos42-01.img) otherwise the OTA update will break the system!
  1. Unapply and remove all patches
  2. Uninstall patchmanager
  3. Reboot (this is required after patchmanager is removed, otherwise you will need to restart lots of services)
  4. Boot into sfos, enable developer mode and set a password
  5. Connect the phone to a wifi network (for downloading packages)
    From this point, we will work on the PC, leave the phone connected.
  6. Connect the phone to a PC, open a console and on the PC run (enter the password when you prompted):
    Code:
    ssh nemo@192.168.2.15
  7. Switch user to root (enter the password when you prompted):
    Code:
    devel-su
  8. Check repos:
    Code:
    ssu lr
  9. Disable all repos, except: apps, hotfixes, jolla:
    Code:
    ssu dr <repo_name>
  10. Add/modify adaptation-community-common repo:
    Code:
    ssu ar adaptation-community-common https://repo.merproject.org/obs/nemo:/testing:/hw:/common/sailfishos_4.2.0.21/
  11. Add/modify adaptation-community-treltexx repo:
    Code:
    ssu ar adaptation-community-treltexx https://repo.sailfishos.org/obs/nemo:/testing:/hw:/samsung:/treltexx/sailfishos_4.2.0.21/
  12. In case you have the mousetracker repo, disable it as can be added after the update
    Code:
    ssu dr mousetracker
  13. if you have waydroid installed and chum repo added, disable the chum repo because its waydroid packages will interfere with the installed ones. (The new waydroid packages will be updated from the chum repo and will break the waydroid installation.)
    Code:
    ssu dr chum
  14. make sure that both adaptation-community-common and adaptation-community-treltexx are enabled and you do not have duplications (command 'ssu er <name>' enables the given repo)
  15. Put the device in release mode:
    Code:
    ssu release 4.2.0.21
  16. Refresh packages:
    Code:
    pkcon refresh
  17. Upgrade the system:
    Code:
    version --dup
  18. Then reboot:
    Code:
    reboot

Once rebooted into the new system try all functions and reboot at least once to try if it still starts the system correctly. If everything is okay, you can add back the chum and mousetracker repos:
  • Code:
    ssu ar chum https://repo.sailfishos.org/obs/sailfishos:/chum/4.2.0.21_armv7hl/
  • Code:
    ssu er chum
  • Code:
    ssu ar mousetracker https://repo.merproject.org/obs/home:/elros34:/sailfishapps/sailfishos_4.2.0.21/
  • Code:
    ssu er mousetracker

GPS and Bluetooth (and waydroid if installed) should work out of the box. Plus you don't need to flash the kernel either.


Workaround for the wifi issue:
This is a bit hacky but you need to do the hacky bit only once.
There is a script provided to turn wifi manually on/off from a command line or Shellex. The script is located in /usr/bin/droid/wifi-on.sh It has one parameter on or off (e.g.: wifi-on.sh on)
To make it work you need to enter your home network name, password and last IP address into the /usr/bin/droid/wifi-conf file.
In addition (and this is the hacky part) you need to do the following (only once):
  1. turn wifi on and connect to the home network
  2. turn wifi off
  3. as root, go into ~/.local/share/system/privileged/connman
  4. if you have multiple wifi_*_*_managed_psk folders in the, keep only one and delete the rest
  5. rename the kept wifi_*_*_managed_psk folder to tmp_wifi
  6. go into the tmp_wifi folder and edit the settings file
  7. Its first line will be the same as the original file name was like [wifi_*_*_managed_psk]
  8. rename the text in [] to match with the new name, so needs to be [tmp_wifi] (in the file you'll see the network name, password and last IP address that you need to add into the wifi.conf file)
  9. Done. From now if you call the `wifi-on.sh on` script as root, it will connect to the network defined in wifi.conf (you don't need to toggle the wifi button from the menu)

If you have any issues, give me a shout.
Good luck!

Last edited by edp17; 2022-02-24 at 07:26.
 

The Following User Says Thank You to edp17 For This Useful Post: