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

/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…

1 Like

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 3.4.0.24 (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
mediadrm:x:1031:
mediaex:x:1040:
media:x:1013:nemo
media_image:x:1057:
media_video:x:1056:
media_rw:x:1023:nemo
media_obb:x:1059:
media_audio:x:1055:
mediacodec:x:1046:

[nemo@Sailfish ~]$

Sorry then, out of ideas.

I can only suggest try to disable AD, then backup
/home/.android
as well as
/home/nemo/android_storage
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?

p.s.
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/*
and
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?

On my XA2 rights are same your ls -al. I think you need to use devel-su with touch command since nemo don’t have reading rights.

@inte Have you seen any progress on this. After several week of running on 3.4.0 without issues, suddenly I Android apps refuse to install.
Trying to install it from AlienDalvicControl -> Downloads tells me that there was an error parsing the package.

Actually I checked Alien Dalvik’s log via lxc-attach -n aliendalvik -- /system/bin/logcat. It seems that installation fails due to low memory. At least I get these messages in the log:

12-09 10:56:45.852    74   265 I ActivityManager: START u0 {act=android.intent.action.VIEW dat=content://com.android.externalstorage.documents/document/sailfishos_storage:android_storage/Aurora/de.mobilesoftwareag.clevertanken.65010.apk typ=application/vnd.android.package-archive flg=0x1 cmp=com.android.packageinstaller/.InstallStart} from uid 10011
12-09 10:56:45.876    21    21 E lowmemorykiller: Error opening /dev/memcg/apps/uid_99000/pid_951/memory.soft_limit_in_bytes; errno=2
12-09 10:56:45.885    74    86 I SurfaceFlinger: ALIEN: raising window: com.android.packageinstaller
12-09 10:56:45.902    74    86 E SurfaceFlinger: ALIEN: posted to thumbnailed window, discarding.
12-09 10:56:45.915    74   317 I ActivityManager: START u0 {act=android.intent.action.VIEW dat=content://com.android.externalstorage.documents/document/sailfishos_storage:android_storage/Aurora/de.mobilesoftwareag.clevertanken.65010.apk typ=application/vnd.android.package-archive flg=0x2000000 cmp=com.android.packageinstaller/.InstallStaging (has extras)} from uid 10015
12-09 10:56:45.953    74    86 I SurfaceFlinger: ALIEN: raising window: com.android.packageinstaller
12-09 10:56:45.969    74    86 E SurfaceFlinger: ALIEN: posted to thumbnailed window, discarding.
12-09 10:56:46.002    21    21 E lowmemorykiller: Error opening /dev/memcg/apps/uid_99000/pid_951/memory.soft_limit_in_bytes; errno=2
12-09 10:56:46.007  1575  1599 W InstallStaging: Error staging apk from content URI
12-09 10:56:46.007  1575  1599 W InstallStaging: java.io.FileNotFoundException: Missing file for sailfishos_storage:android_storage/Aurora/de.mobilesoftwareag.clevertanken.65010.apk at /storage/sailfishos_storage/android_storage/Aurora/de.mobilesoftwareag.clevertanken.65010.apk

RAM shouldn’t be a problem according to

[root@xa2 nemo]# cat /proc/meminfo 
MemTotal:        3729244 kB
MemFree:          110048 kB
MemAvailable:    1736288 kB
Buffers:          266128 kB
Cached:          1272536 kB
SwapCached:            0 kB
Active:          1460508 kB
Inactive:        1004744 kB
Active(anon):     935276 kB
Inactive(anon):    21008 kB
Active(file):     525232 kB
Inactive(file):   983736 kB
Unevictable:        6120 kB
Mlocked:            6120 kB
SwapTotal:        524284 kB
SwapFree:         524284 kB
Dirty:                24 kB
Writeback:             0 kB
AnonPages:        932764 kB
Mapped:           479292 kB
Shmem:             24560 kB
Slab:             397564 kB
SReclaimable:     233932 kB
SUnreclaim:       163632 kB
KernelStack:       32416 kB
PageTables:        30016 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:     2388904 kB
Committed_AS:   20063656 kB
VmallocTotal:   258867136 kB
VmallocUsed:           0 kB
VmallocChunk:          0 kB
CmaTotal:         163840 kB
CmaFree:               0 kB

as well as disk space seems to be alright:

[root@xa2 nemo]# df -h
Filesystem                Size      Used Available Use% Mounted on
/dev/sailfish/root        2.4G      1.9G    485.6M  80% /
devtmpfs                  1.7G    304.0K      1.7G   0% /dev
tmpfs                     1.8G         0      1.8G   0% /dev/shm
tmpfs                     1.8G     20.8M      1.8G   1% /run
tmpfs                     1.8G         0      1.8G   0% /sys/fs/cgroup
tmpfs                     1.8G    452.0K      1.8G   0% /tmp
tmpfs                     1.8G         0      1.8G   0% /mnt
/dev/mmcblk0p71         820.6M    271.4M    525.1M  34% /opt
/dev/mmcblk0p68         371.4M    206.8M    152.6M  58% /odm
/dev/mmcblk0p40          64.0M    496.0K     63.5M   1% /bt_firmware
/dev/mmcblk0p42         110.0M     95.6M     14.3M  87% /firmware
/dev/mmcblk0p2           27.5M    408.0K     26.4M   1% /persist
/dev/mmcblk0p44          11.7M      7.3M      4.1M  64% /dsp
/dev/mapper/sailfish-home
                         17.3G     16.7G    431.8M  98% /home
tmpfs                   364.2M      1.0M    363.2M   0% /run/user/100000
/dev/mapper/luks-ad1554a5-c2b8-4aa5-bc3c-e27d006ef6c0
                        117.1G     26.2G     90.9G  22% /run/media/root/sdcard

So why does lowmemorykiller fail?

After some unstructured research I found that within the lxc container of Alien Dalvik there’s a directory /data/app which contains some APK data. Most of the directories can directly be mapped to an installed app. However there was a directory called vmdl2083684193.tmp with an empty file with the name of the latest apk package that failed to install. So I deleted that directory and managed to install the app and others as well.

That directory is also available on the Sailfish side at /home/.android/data/app
Hence, if you run into the same problem, make sure there are no stale directores in the form /home/.android/data/app/vmdl??????????.tmp.

Hope that helps someone eventually

9 Likes

Thank you for your updates. I have to admit that I didn’t investigate the issue further since install through alien dalvik control worked fine for me.
I don’t have much time currently due to work, family and… christmas:)

1 Like

Solution from jollajo worked for me aswell,

had also vmdl???????.tmp folder in /home/.android/data/app.

THX :+1:

Helped me, thanks a lot!

You’re the boss. That fixed my troubles with Aurora and F-Droid apps (Xperia XA2, Sailfish 4.0.1.48): they stopped working, even refusing to download stuff, after a somewhat buggy F-Droid update.

But I didn’t have any “.tmp” directories into /data/app. I just stopped Alien Dalvik, logged in as root (devel-su) in the terminal and moved every directory created during the last hour (ls -l /home/.android/data/app) to another folder. I could have deleted them, but I like to play safe.

Started the Android Support again and I was able to normally install/update stuff with Aurora app.

1 Like

So how do I access the .android/data folder?

I got the same question as kissamies. As a non-developer, I am trying to understand all your posted possible solutions here (thanks a lot!) but I can’t access the folder .android/data. The file browser says that I have to right to read the content. Any tips for someone who is not that familiar with the terminal :slight_smile: ?

I’d suggest you activate Developer mode and Remote connection from Developer Tools from Settings. With that activated you can connect to your phone via SSH via USB or WIFI. Change to root via devel-su and change to the desired directory.

It’s quite a bit of fiddelling to get there, so probably not a way to go if you don’t have any experience with Linux or the joy of fiddelling. Wish you good luck.

Even if I activate the developer mode and devel-su in the terminal, I can’t access .android folder with the StartAsRoot for File-browser. It says I have no permission. No matter what I do. I used to be able to access the root directory when I fiddled with something way over a year ago, but now I have no access.