While exploring a WhatsApp problem I found the /home/defaultuser (on the host sailfish filesystem) folder is mounted under as a UUID string under /storage (on the android filesystem):
devel-su appsupport-attach
/ # ls /storage
6231-3532 8ff87de4-0b37-4799-b09a-82773e869e07 emulated self
Is this expected behaviour - and is it documented?
It seems to upset WhatsApp, as WhatsApp tries to access this directory as if it were the sdcard to write a backup. The directory is mounted read-only, and doesn’t contain the Android folder that WhatsApp expects - so it causes the backup to fail (an error shows up in logcat).
If this isn’t expected, is there a way to remove this mount?
Alternatively, is there a way I can hide it temporarily so I can further investigate the WhatsApp problem?
I don’t receive any message content from most of my contacts (for a handful of contacts it still works).
Instead I get a placeholder “Waiting for this message. This may take a while.” showing in the WhatsApp chat user interface.
Also as I can’t save a backup, if I uninstall / reinstall WhatsApp I will lose the chat history.
The problem started when I cleared space on the phone including deleting a lot of pictures and videos from within the WhatsApp user interface. As part of this clean up I removed and later reinserted the SD card.
In logcat I can see the following warnings and errors. This missing Google Play Services is expected ( I don’t have microG installed) and has always been the case.
08-19 06:29:48.825 930 1116 W JobConsumer: java.util.concurrent.ExecutionException: java.io.IOException: disconnected
08-19 06:29:48.825 930 1116 W JobConsumer: at X.1Hk.get(:268435472)
08-19 06:29:48.825 930 1116 W JobConsumer: at com.whatsapp.jobqueue.job.SendE2EMessageJob.A0B(:2463)
08-19 06:29:48.825 930 1116 W JobConsumer: at X.6cu.run(:128)
08-19 06:29:48.825 930 1116 W JobConsumer: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
08-19 06:29:48.825 930 1116 W JobConsumer: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
08-19 06:29:48.825 930 1116 W JobConsumer: at X.6cu.run(:52)
08-19 06:29:48.825 930 1116 W JobConsumer: at java.lang.Thread.run(Thread.java:923)
08-19 06:29:48.825 930 1116 W JobConsumer: Caused by: java.io.IOException: disconnected
08-19 06:29:48.825 930 1116 W JobConsumer: at X.1Jh.handleMessage(:724)
08-19 06:29:48.825 930 1116 W JobConsumer: at android.os.Handler.dispatchMessage(Handler.java:106)
08-19 06:29:48.825 930 1116 W JobConsumer: at android.os.Looper.loop(Looper.java:223)
08-19 06:29:48.825 930 1116 W JobConsumer: at android.os.HandlerThread.run(HandlerThread.java:67)
08-19 06:29:49.352 930 953 W FirebaseMessaging: Failed to find package android.content.pm.PackageManager$NameNotFoundException: com.google.android.gms
08-19 06:29:49.370 930 953 W Metadata: Failed to find package android.content.pm.PackageManager$NameNotFoundException: com.google.android.gms
08-19 06:29:49.370 930 953 E Metadata: Google Play services missing or without correct permission.
08-19 05:54:34.585 12 16 E cutils : Failed to mkdirat(/mnt/media_rw/8ff87de4-0b37-4799-b09a-82773e869e07/Android): Read-only file system
08-19 05:54:34.587 930 1031 W ContextImpl: Failed to ensure /storage/8ff87de4-0b37-4799-b09a-82773e869e07/Android/media/com.whatsapp: android.os.ServiceSpecificException: (code -30)
08-19 05:54:34.589 12 16 E vold : Failed to find mounted volume for /storage/6231-3532/Android/media/com.whatsapp/
08-19 05:54:34.595 930 1031 W ContextImpl: Failed to ensure /storage/6231-3532/Android/media/com.whatsapp: android.os.ServiceSpecificException: (code -22)
I found that installing microG fixed the problem with WhatsApp.
The logs showed it was trying to use Google Cloud Messaging - although I’ve been running Sailfish without microG for years and not had any problem with WhatsApp before. Perhaps in the latest versions WhatsApp have increased their dependence on GCM, or the app had somehow got into a state that it couldn’t fix without using GCM.