Ok, so I found the commit from Zenfone: mounts from fp4 · sailfishos-on-sake/droid-config-sake@40d0ab8 · GitHub (which is inspired from FP4…
The steps required are:
- Get internet connection through USB on your device
- install
parse-android-dynparts
package
- (and the lengthiest) test
dmsetup
and commands from that commit (such as mounting /dev/mapper/dynpart-product_a
to /product
etc.
- Get internet through USB
According to HADK, if you’re connected through telnet over IP, you can do these changes on your host (Linux):
# iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE
# means as root; wlan0 is your interface connected to the internet
# echo 1 > /proc/sys/net/ipv4/ip_forward
# as root again
(On windows, the above would be obtained through Internet connection sharing of the correct adapter).
Then on device:
route add default gw 192.168.2.X # <- host's usb0 IP
echo 'nameserver 208.67.222.222' > /etc/resolv.conf
- Install
parse-android-dynparts
From the sake repo you can probably just wget/curl the parse-android-dynparts-0.0.1+master.20230311225315.73a7052-1.3.2.jolla.aarch64.rpm and zypper in parse-android-dynparts*.rpm
it.
- dmsetup and mount points.
If you look at the commit above, there is one script that does dmsetup create --concise "$(/usr/bin/parse-android-dynparts /dev/sda10)"
You need a similar script for your sda23
if I remembered correctly.
(ignore “sparse/” part, that is just your rootfs on the device)
Also, you need to figure out what it created: for example, on sake, the sparse/usr/lib/systemd/system/product.mount
mounts /dev/mapper/dynpart-product_a
. That of course won’t be the case on your device (because it doesnt do _a / _b for instance). For each of the /dev/mapper/dynpart-* partitions you need to edit the systemd mount or create a new one.
You also need create a dmsetup.service
as in that commit.
And last but not least, you need the dmsetup.service to have a “Before” line listing all mounts that use dynamic partitions, and also make sure that /usr/lib/systemd/system/local-fs.target.wants/
contains links to all of them.
Reboot and check logs until all mounts are succeeding.
- Document everything you do in a file, or back up (you can reverse ssh from telnet to your Linux host). May things go south you might want to re-do these steps