g7 / sailfishx-patcher-f5321

Patcher script that applies the f5321 (Xperia X Compact) compatibility layer on top of official Sailfish X f5121 images
29 stars 5 forks source link

OTA from 4.2.0.21 to 4.3.0.12 broke device #27

Closed henning-schild closed 2 years ago

henning-schild commented 2 years ago

UI was complaining about conflicting packages (looked a bit like #20) so i decided to run the update from the cmdline.

pkill sailfish-osupdateservice
rm ~defaultuser/.cache/sailfish-osupdateservice/os-info
[root@XperiaXCompact ~]# ssu release 
Device release is currently: 4.3.0.12
[root@XperiaXCompact ~]# version
Sailfish OS 4.2.0.21 (Verla)
[root@XperiaXCompact ~]# version --dup
REFRESHING CACHE AND DOWNLOADING PACKAGES
Finished transaction (status=1, runtime=167782ms)
UPGRADING SYSTEM
[52 %] [Install] qt5-qtmultimedia-plugin-mediaservice-gstmediaplayer 5.6.2+git29-1.11.1.jolla: [50 %[52 %] [Install] qt5-qtmultimedia-plugin-mediaservice-gstmediaplayer 5.6.2+git29-1.11.1.jolla: [26 %[52 %] [Install] qt5-qtmultimedia-plugin-mediaservice-gstmediaplayer 5.6.2+git29-1.11.1.jolla: [52 %[52 %] [Install] qt5-qtmultimedia-plugin-mediaservice-gstmediaplayer 5.6.2+git29-1.11.1.jolla: [78 %[52 %] [Install] qt5-qtmultimedia-plugin-mediaservice-gstmediaplayer 5.6.2+git29-1.11.1.jolla: [99 %[52 %] [Install] qt5-qtmultimedia-plugin-mediaservice-gstmediaplayer 5.6.2+git29-1.11.1.jolla: [100 [52 %] [Install] qt5-qtmultimedia-plugin-mediaservice-gstmediaplayer 5.6.2+git29-1.11.1.jolla: [100 [52 %] [Install] qt5-qtmultimedia-plugin-mediaservice-gstmediacapture 5.6.2+git29-1.11.1.jolla: [50 [52 %] [Install] qt5-qtmultimedia-plugin-mediaservice-gstmediacapture 5.6.2+git29-1.11.1.jolla: [0 %[52 %] [Install] qt5-qtmultimedia-plugin-mediaservice-gstmediacapture 5.6.2+git29-1.11.1.jolla: [16 [52 %] [Install] qt5-qtmultimedia-plugin-mediaservice-gstmediacapture 5.6.2+git29-1.11.1.jolla: [32 [52 %] [Install] qt5-qtmultimedia-plugin-mediaservice-gstmediacapture 5.6.2+git29-1.11.1.jolla: [49 [52 %] [Install] qt5-qtmultimedia-plugin-mediaservice-gstmediacapture 5.6.2+git29-1.11.1.jolla: [65 [52 %] [Install] qt5-qtmultimedia-plugin-mediaservice-gstmediacapture 5.6.2+git29-1.11.1.jolla: [82 [52 %] [Install] qt5-qtmultimedia-plugin-mediaservice-gstmediacapture 5.6.2+git29-1.11.1.jolla: [98 [52 %] [Install] qt5-qtmultimedia-plugin-mediaservice-gstmediacapture 5.6.2+git29-1.11.1.jolla: [99 [52 %] [Install] qt5-qtmultimedia-plugin-mediaservice-gstmediacapture 5.6.2+git29-1.11.1.jolla: [100[52 %] [Install] qt5-qtmultimedia-plugin-mediaservice-gstmediacapture 5.6.2+git29-1.11.1.jolla: [0 %[52 %] [Install] qt5-qtmultimedia-plugin-mediaservice-gstmediacapture 5.6.2+git29-1.11.1.jolla: [100[62 %] [Install] dsme 0.83.1-1.5.1.jolla: [100 %]

In the middle of things the device decided to reboot (battery was pretty much full). Now it is always stuck after entering decrypt PIN.

g7 commented 2 years ago

Hm, interesting... you should at least be able to access via recovery, the encryption pin is also the luks slot used by sailfish (yeah I know, useless...).

hybris-recovery-f5321.img.gz

Decompress that, and try booting it with

fastboot boot hybris-recovery-f5321.img

(I haven't tried it). For posterity these are the steps to obtain it:

1) Download official Sailfish X f5121 zip from Jolla 2) Extract hybris-recovery.img 3) Download yabit 4) Download droid-compat-f5321 from here and extract it:

rpm2cpio droid-devicetree-f5321*.rpm | cpio -idmv --no-absolute-filenames

5) Replace the device tree on the recovery image (this is the same thing that happens on device at every kernel upgrade):

./yabit.py --input hybris-recovery.img --output hybris-recovery-f5321.img --remove-original-dtbs --dtb usr/lib/devicetrees/msm8956-loire-kugo_generic.dtb --cmdline "selinux=0 lpm_levels.sleep_disabled=1 user_debug=31 androidboot.selinux=permissive msm_rtb.filter=0x3F ehci-hcd.park=3 dwc3.maximum_speed=high dwc3_msm.prop_chg_detect=Y coherent_pool=8M sched_enable_power_aware=1 androidboot.hardware=kugo zram.num_devices=4" 

Then you can boot it as above.

Once you're in you can share internet connection via RNDIS and continue the upgrade (via version --dup or if that is broken too zypper, but please check as I'm unsure on the actual syntax :D)

Good luck!

henning-schild commented 2 years ago

I ended up patching and flashing again. With all the potential loss of which the backups to SD card would not cover. But flash.sh always gets me into a reboot loop ... even with my old Sailfish_OS-patched-for-f5321-4.1.0.24-f5321-0.2.2.43 which worked before. So no way to get anything working again.

And my libvirt win10 somehow does not get the USB devices passed to emma ... to go back to a working android and potentially flash on top of that. I guess i have to conclude "bricked" for now, maybe a truly supported device or android next.

I will try your instructions to maybe get something to come up again, but am pretty pissed right now (no offense!) I chose for pain, but for today it is too much ... and not having a phone the coming days will add up. Not sure what happened.

g7 commented 2 years ago

None taken :) I find strange that a previously known-to-work version doesn't boot anymore, so perhaps something more serious happened :thinking:

If you don't want to use win10+emma, try FlashTool, it works well at least on suzu/kugo (had less luck with more recent sony devices but perhaps it was my fault - and in any case, newflasher works well as an alternative).

Good luck again, hopefully it's not an hard brick!

henning-schild commented 2 years ago

Another round of patching produced another result. To be fair the first run was made in docker because i had Vagrant issues. Anyhow no clue how i broke it ... but now it is back.