Day 22
–mic finishes SailfishOScommunity-release-4.4.0.58-sake-zero/sailfishos-sake-release-4.4.0.58-zero.zip
Which contains a bz2.
Rebooting into Lineage Recovery, through adb root shell, I notice there is no bunzip2
The toybox command that wraps everything doesn’t know it either: toybox bunzip2
toybox: Unknown command bunzip2
So I push my 64-bit busybox (from ubports) to /system/bin and ln -s /system/bin/busybox /system/bin/bunzip2
Next thing, tar --help
does show j bzip2 compression
- so that might use the bunzip2
command
(The truth is busybox is 1.4M while toybox is under 500k)
Next I use Lineage recovery “Format data/factory reset”.
mount /data/
now works as f2fs and it’s empty. Maybe it should be ext4, but let’s see.
Next I use Lineage recovery “Apply update”/“Apply from adb”
adb sideload SailfishOScommunity-release-4.4.0.58-sake-zero/sailfishos-sake-release-4.4.0.58-zero.zip
Package not signed, install anyway? Yes
E:Error in /sideload/package.zip (killed by signal 11)
Maybe the sideloading is for “update” packages which I am not familiar with.
My zip file has a straightforward updater-unpack.sh
however:
FS_ARC="/data/sailfishos-rootfs.tar.bz2"
FS_DST="/data/.stowaways/sailfishos"
rm -rf $FS_DST
mkdir -p $FS_DST
tar --numeric-owner -xvjf $FS_ARC -C $FS_DST
EXIT=$?
rm $FS_ARC
So I just push the .bz2 file and tar --numeric-owner -xvjf /data/sfe-sake-4.4.0.58-zero.tar.bz2 $FS_DST
tar: exec bzip2: No such file or directory
Ah, so I should link that to busybox…
bzip2: short write
Altough the error comes from bzip2, I think tar from toybox may be the culprit here.
Let’s link that to busybox too
tar: /data/.stowaways/sailfishos not found in archive
:facepalm:! I forgot an -C
before $FS_DST: tar --numeric-owner -xvjf /data/sfe-sake-4.4.0.58-zero.tar.bz2 -C $FS_DST
Good. it works.
Now we’re going to reboot to bootloader and boot
(without flashing) the hybris-boot.img.
Remember, if we flash it, Lineage recovery is gone since it lives on boot.img for this device. And we need that to inspect what happened in /data/.stowaways/saifishos…
After 60 something seconds it reboots.
Entering Lineage Recovery, adb root shell, mounting /data… it’s empty!
Hmm… how could that be?
Let’s re-trace the steps and just reboot into recovery:
HOST: adb push external/busybox/busybox /system/bin/
ADB#: ln -s /system/bin/busybox /system/bin/bzip2
ADB#: ln -sf /system/bin/busybox /system/bin/tar
HOST: adb push sfe-sake-4.4.0.58-zero.tar.bz2 /data/
ADB#: mkdir -p /data/.stowaways/sailfishos
ADB#: tar --numeric-owner -xvjf /data/sfe-sake-4.4.0.58-zero.tar.bz2 -C /data/.stowaways/sailfishos
Reboot to bootloader → Reboot to recovery
ADB# mount /data
ADB# ls /data/.stowaways/sailfishos/
Rootfs is there. Let’s boot hybris-boot again …
Reboots in 60 seconds, let’s hold Vol-up, enter Recovery, enable Adb shell
Now stoways survive.
And I got my first init.log!