[Focal] session-migration scripts are not run on read-only-RTC (read: QCOM) devices
I write issue to this repo for now because I'm not sure what package this belongs.
session-migration uses the script directory's mtime to determine if it should even consider any script inside that directory. And at the moment, the mtime of the directory on the rootfs seems to have whatever time it is when running in recovery instead of the mtime inside the tarball.
$ ls -lhd /usr/share/session-migration/scripts/
drwxr-xr-x 2 root root 4.0K Jan 1 07:13 /usr/share/session-migration/scripts/
For now, it seems like the culprit is... Busybox??? (the output is on FP4 while it has its time wrong).
phablet@ubuntu-phablet:~/test$ busybox xzcat /cache/recovery/rootfs-9563c8d159e2309fc648a2c37954609b9a1b690f889678cfaf113164be2c7bae.tar.xz | tar -x system/./usr/share/session-migration/
tar: system/./usr/share/session-migration/scripts/morph-browser-name-change.sh: time stamp 2022-12-03 07:10:42 is 1670024191.635859236 s in the future
tar: system/./usr/share/session-migration/scripts/messaging-app-name-change.sh: time stamp 2022-11-30 21:31:20 is 1669816629.634916892 s in the future
<multiple lines removed>
phablet@ubuntu-phablet:~/test$ ls -lhd system/usr/share/session-migration/scripts/
drwxr-xr-x 2 phablet phablet 4.0K Dec 23 2022 system/usr/share/session-migration/scripts/
phablet@ubuntu-phablet:~/test$ rm -rf system/
phablet@ubuntu-phablet:~/test$ busybox xzcat /cache/recovery/rootfs-9563c8d159e2309fc648a2c37954609b9a1b690f889678cfaf113164be2c7bae.tar.xz | busybox tar -x system/./usr/share/session-migration/
phablet@ubuntu-phablet:~/test$ ls -lhd system/usr/share/session-migration/scripts/
drwxr-xr-x 2 phablet phablet 4.0K Jan 1 07:35 system/usr/share/session-migration/scripts/
Edited by Ratchanan Srirattanamet