[4.5.0.19, XA2] AppSupport does not start

REPRODUCIBILITY: 100%
OS VERSION: 4.5.0.19
HARDWARE: Sony Xperia XA2
UI LANGUAGE: pl_PL
REGRESSION: yes

DESCRIPTION:

The Android AppSupport does not start, neither manually through its Settings page, nor through launching individual apps, nor auto-start on reboot / cold boot. It says ‘Unable to start’.

It used to crash randomly quite a lot since the last Sailfish update (once every couple days), but restarting always helped, so I did not investigate. It suddenly stopped helping a few days ago. Logcat says something about the watchdog killing system_server because of hung PowerManagerService, and then init segfaulting during a reboot sequence (attached).

PRECONDITIONS:

I think none? I installed quite a lot of apps, maybe this might be low disk space related.

STEPS TO REPRODUCE:

  1. Launch AppSupport.
  2. Wait.

EXPECTED RESULT:

The AppSupport starts, Android apps work.

ACTUAL RESULT:

It fails to start after a couple minutes, Android apps are unusable.

MODIFICATIONS:

none I guess (no openrepos, no storeman, no waydroid)
I use microG as a GMS replacement inside the Android container, but that has survived all updates and now crashed out of nowhere.

ADDITIONAL INFORMATION:

Full logcat: Logs of crashing Sailfish's Android AppSupport · GitHub
The watchdog bit:

05-17 00:54:04.731   136   159 W Watchdog: Failed to write to /proc/sysrq-trigger
05-17 00:54:04.731   136   159 W Watchdog: java.io.FileNotFoundException: /proc/sysrq-trigger: open failed: EROFS (Read-only file system)
05-17 00:54:04.731   136   159 W Watchdog: 	at libcore.io.IoBridge.open(IoBridge.java:492)
05-17 00:54:04.731   136   159 W Watchdog: 	at java.io.FileOutputStream.<init>(FileOutputStream.java:236)
05-17 00:54:04.731   136   159 W Watchdog: 	at java.io.FileOutputStream.<init>(FileOutputStream.java:125)
05-17 00:54:04.731   136   159 W Watchdog: 	at java.io.FileWriter.<init>(FileWriter.java:63)
05-17 00:54:04.731   136   159 W Watchdog: 	at com.android.server.Watchdog.doSysRq(Watchdog.java:724)
05-17 00:54:04.731   136   159 W Watchdog: 	at com.android.server.Watchdog.run(Watchdog.java:657)
05-17 00:54:04.731   136   159 W Watchdog: Caused by: android.system.ErrnoException: open failed: EROFS (Read-only file system)
05-17 00:54:04.731   136   159 W Watchdog: 	at libcore.io.Linux.open(Native Method)
05-17 00:54:04.731   136   159 W Watchdog: 	at libcore.io.ForwardingOs.open(ForwardingOs.java:166)
05-17 00:54:04.731   136   159 W Watchdog: 	at libcore.io.BlockGuardOs.open(BlockGuardOs.java:254)
05-17 00:54:04.731   136   159 W Watchdog: 	at libcore.io.IoBridge.open(IoBridge.java:478)
05-17 00:54:04.731   136   159 W Watchdog: 	... 5 more
05-17 00:54:04.732   136   159 W Watchdog: Failed to write to /proc/sysrq-trigger
05-17 00:54:04.732   136   159 W Watchdog: java.io.FileNotFoundException: /proc/sysrq-trigger: open failed: EROFS (Read-only file system)
05-17 00:54:04.732   136   159 W Watchdog: 	at libcore.io.IoBridge.open(IoBridge.java:492)
05-17 00:54:04.732   136   159 W Watchdog: 	at java.io.FileOutputStream.<init>(FileOutputStream.java:236)
05-17 00:54:04.732   136   159 W Watchdog: 	at java.io.FileOutputStream.<init>(FileOutputStream.java:125)
05-17 00:54:04.732   136   159 W Watchdog: 	at java.io.FileWriter.<init>(FileWriter.java:63)
05-17 00:54:04.732   136   159 W Watchdog: 	at com.android.server.Watchdog.doSysRq(Watchdog.java:724)
05-17 00:54:04.732   136   159 W Watchdog: 	at com.android.server.Watchdog.run(Watchdog.java:658)
05-17 00:54:04.732   136   159 W Watchdog: Caused by: android.system.ErrnoException: open failed: EROFS (Read-only file system)
05-17 00:54:04.732   136   159 W Watchdog: 	at libcore.io.Linux.open(Native Method)
05-17 00:54:04.732   136   159 W Watchdog: 	at libcore.io.ForwardingOs.open(ForwardingOs.java:166)
05-17 00:54:04.732   136   159 W Watchdog: 	at libcore.io.BlockGuardOs.open(BlockGuardOs.java:254)
05-17 00:54:04.732   136   159 W Watchdog: 	at libcore.io.IoBridge.open(IoBridge.java:478)
05-17 00:54:04.732   136   159 W Watchdog: 	... 5 more
05-17 00:54:04.741   136   159 W Watchdog: *** WATCHDOG KILLING SYSTEM PROCESS: Blocked in handler on main thread (main)
05-17 00:54:04.744   136   159 W Watchdog: main annotated stack trace:
05-17 00:54:04.744   136   159 W Watchdog:     at com.android.server.power.PowerManagerService.nativeInit(Native Method)
05-17 00:54:04.745   136   159 W Watchdog:     at com.android.server.power.PowerManagerService.access$500(PowerManagerService.java:144)
05-17 00:54:04.745   136   159 W Watchdog:     at com.android.server.power.PowerManagerService$NativeWrapper.nativeInit(PowerManagerService.java:738)
05-17 00:54:04.745   136   159 W Watchdog:     at com.android.server.power.PowerManagerService.<init>(PowerManagerService.java:1034)
05-17 00:54:04.745   136   159 W Watchdog:     - locked <0x040f282c> (a java.lang.Object)
05-17 00:54:04.745   136   159 W Watchdog:     at com.android.server.power.PowerManagerService.<init>(PowerManagerService.java:892)
05-17 00:54:04.745   136   159 W Watchdog:     at java.lang.reflect.Constructor.newInstance0(Native Method)
05-17 00:54:04.746   136   159 W Watchdog:     at java.lang.reflect.Constructor.newInstance(Constructor.java:343)
05-17 00:54:04.746   136   159 W Watchdog:     at com.android.server.SystemServiceManager.startService(SystemServiceManager.java:150)
05-17 00:54:04.746   136   159 W Watchdog:     at com.android.server.SystemServer.startBootstrapServices(SystemServer.java:817)
05-17 00:54:04.748   136   159 W Watchdog:     at com.android.server.SystemServer.run(SystemServer.java:624)
05-17 00:54:04.749   136   159 W Watchdog:     at com.android.server.SystemServer.main(SystemServer.java:438)
05-17 00:54:04.749   136   159 W Watchdog:     at java.lang.reflect.Method.invoke(Native Method)
05-17 00:54:04.749   136   159 W Watchdog:     at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:599)
05-17 00:54:04.749   136   159 W Watchdog:     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:925)
05-17 00:54:04.749   136   159 W Watchdog: *** GOODBYE!

Free disk:

[defaultuser@Arex2 ~]$ df -h / ~ /run/media/defaultuser/*
Filesystem                                             Size  Used Avail Use% Mounted on
/dev/sailfish/root                                     2,4G  1,9G  499M  80% /
/dev/mapper/luks-91fa3577-f58d-4444-8c72-1f99e1d578b6   18G   17G  464M  98% /home
/dev/mmcblk1p1                                          30G   30G  604M  99% /run/media/defaultuser/9016-4EF8

I consider reinstalling AppSupport, if it might help, however I hope I can somehow back up all the apps’ settings first (hopefully including banking apps, microG etc.) so that they can later be restored. Is there any ‘cache’ that might be worth cleaning, or something that might be removed/recreated without affecting the apps that might help?

Is it possible that Patchmanager is installed on your device?

No, no Patchmanager and nothing otherwise patched I hope, especially explicitly relating to Android apps (as a nice user, I was extra careful to not touch anything I do not understand :wink: but who knows, maybe it happened by itself). I might try to verify checksums of system images if it can help, but I don’t know much of where I should find the relevant stuff, nor where I should start looking next etc.

Do you use a SD card? Is your filesystem full?

Hello, I can confirm that it is happening for me too from today! It has stopped working/starting.

I have 64GB SD card which is 50% full and my main filesystem has ~500 MB free space.

I already posted the output of df on root, home and sdcard, which shows >400MiB free space on each of them. I had a situation when the sdcard went 100% full for a short while lately, but I removed some big files and everything seemed okay again.

Removed some files from sailfish home which had around 500mb of free space and it worked. So apparently Android Support stops working when space is “low” and it does not matter even where…

I made more free space, and it has not helped sadly.

To me, XA2 dual sim, the only way I’ve managed to start the android app layer again is to turn the phone off completely, then turn it on gain.
A reboot even the one with the combo of power button + volume up don’t work for me.
Probably not related, but you might have to stop and start ofono to get the phone network to work as it often don’t start out of the box after a complete power off

This helped indeed! I freed up some space and did a cold reboot (waiting a bit between power off and boot up), and then it miraculously worked again. Thanks a lot!

You can extend your storage space by using the other slot on most modern devices: Extend SailfishOS rootfs with a hidden, unused partition.-Oskar Roesler's Blog
The only drawback is you can’t directly reflash sfos, you have to first flash android again. Updates are carried out as usual.

On my xperia 10ii, the app support stop working if in background is running an app with maps, like a gps tracker