All of a sudden, install of Android-apps doesn't start any more

I tried to install different apps. Apps I had installed before. Even tried to invoke the app installer from the command line:

[nemo@Sailfish Download]$ apkd-install Threema-4.42.apk
method return time=1604925675.810071 sender=:1.12 -> destination=:1.180 serial=41 reply_serial=2 boolean true

And thats all. No error message. No timeout. And nothing in the journal.
Only thing I could imaging is a lack of free space.
However, it didn’t really help to clean up some space.
I’m on Sailfish X/Xperia XA2,

just to be clear - so you’re saying that the app doesn’t install, is that it? Does it do anything different when you try to install through Sailfish? I would be surprised if it was a spaceissue on XA2… Did you recently make any changes to the phone? New aops installed, patches, etc…?

Installation of SailfishOS Apps works fine. Trying to install Android apps through either Jolla filemanager or from Android (e.g. through Aurora Store) fails.
Invoking the installation from Android at least returns “installation failed”. No further info, though.
I can’t remember having changed anything recently.

Strange - and is it every app, like even if you try to install some simple file manager or browser or something, or is it just on a particular app that you want and had installed before?

I cannot even update the fdroid-store (“unknown error”).

I guess maybe worth a shot to reinstall Aliendalvik… I have had one particular app do that to me, where I had it installed and working previously, then wiped and reflashed the phone, and now it installs fine, but won’t open. It just hangs on the cover with a spinner for a while and closes. But everything else is working fine…

Reinstalling AD means whiping my entire Android install, including preconfigured apps, all my credentials, and, even worse, my microg install. Certainly I won’t but rather keep my old apps until I upgrade my entire phone (or someone comes up with a solution).

First times when experimenting with the new Android app support, I wiped the whole /home/.android directory several times, it’s not that big of an issue reinstalling everything.

Honestly. I have something else to do. Except for there was a way to backup everything (including user data) and easily reinstall?

I just reinstalled everything from scratch.

Lucky you having time for that. Any hints anyone what I may try to get AD working properly again?

I got a bit further. Apparently, AD lost permissions to write in theandroid-storage directory. Any idea anyone how this happened and how to fix it?

12 12:14:39.211 73 73 I AlienAppManager: Informing launcher service of Threema:
11-12 12:14:39.240 73 518 D VoldConnector: SND -> {14 volume mkdirs /storage/sailfishos_storage/Android/data/}
11-12 12:14:39.242 5 12 E cutils : Failed to mkdirat(/storage/sailfishos_storage/Android): Read-only file system
11-12 12:14:39.242 73 143 D VoldConnector: RCV <- {400 14 Command failed}
11-12 12:14:39.244 1090 1090 W ContextImpl: Failed to ensure /storage/sailfishos_storage/Android/data/
11-12 12:14:39.263 73 518 D VoldConnector: SND -> {15 volume mkdirs /storage/sailfishos_storage/Android/data/}
11-12 12:14:39.266 5 12 E cutils : Failed to mkdirat(/storage/sailfishos_storage/Android): Read-only file system
11-12 12:14:39.266 73 143 D VoldConnector: RCV <- {400 15 Command failed}
11-12 12:14:39.267 1090 1090 W ContextImpl: Failed to ensure /storage/sailfishos_storage/Android/data/
11-12 12:14:39.565 73 1129 I BackgroundDexOptService: Pinning optimized code {}
11-12 12:14:40.225 34 34 I wificond: Fail RSSI polling because wifi is not associated.
11-12 12:14:40.225 73 150 E WificondControl: Invalid signal poll result from wificond
11-12 12:14:52.242 73 150 I chatty : uid=1000(system) WifiStateMachin identical 4 lines
11-12 12:14:55.247 73 150 E WificondControl: Invalid signal poll result from wificond
11-12 12:14:57.421 501 609 W MediaScanner: Error opening directory ‘/storage/sailfishos_storage/android_storage/’, skipping: Permission denied.

/storage/sailfishos_storage/… is how the Android system sees the /home/nemo/… directory, and it has no privileges to write there. Try to install the app through Sailfish, (like from a Sailfish app - does it work then?

No, does not work from e.g. sf filemanager. I could install from a few updates from fdroid though. Weird.

What is the owner of android_storage? Check with
ls -l /home/nemo/android_storage?
It should belong to media_rw:media_rw.
If you backupped and restored that folder manually it could have gotten wrong rights…

The owner is correct.
It es getting even stranger:
I have just figured out that I cannot invoke the installation of Android apps through the sfos filebrowser, or from the command line. However, installation DOES start when using an Android filebrowser, like thorugh Aliendalvik Control-> Downloads -> Klick downloaded apk to install.
What the…

Are you able to apkd-install as root (devel-su) from command line then?

What is the output of
cat /etc/group | grep media

And was it an upgrade from an older release (nemo) or freshly flashed (defaultuser)?

It’s an updated release. Install as root doesn’t work either.
This is the group-file content:

[nemo@Sailfish ~]$ cat /etc/group|grep media

[nemo@Sailfish ~]$

Sorry then, out of ideas.

I can only suggest try to disable AD, then backup
as well as
and deinstall aliendalvik, reboot and install aliendalvik support again.

Check if it works.

Then disable AD, restore your backups and enable AD.
This way you should have everything set up as before.
Disclaimer: I did not have to do that yet, and it may not be 100% assured that everything will be like before. Someone else?

when you say MicroG, is it the way of modifying the system.img or the one with just enabling ‘spoofing’ in AD settings?

And what are the rights of
ls -al /home/nemo/android_storage/*
ls -al /home/.android/*

1 Like

I haven’t had time to investigate further, and I found the workaround through alien-dalvik-control as descibed which deescaleted priority.
However, permissions of /home/.android seem wrong:

[nemo@Sailfish .android]$ ls -al

total 12
drwxr-xr-x 3 root root 4096 Aug 12 2019 .

drwxr-xr-x 12 root root 4096 Nov 18 09:58 …

drwxrwx–x 34 system system 4096 Nov 18 09:58 data

[nemo@Sailfish .android]$ touch bla

touch: bla: Permission denied

[nemo@Sailfish .android]$

To whom should .android belong?
Maybe an update issue?