We have moved to a new Sailfish OS Forum. Please start new discussions there.
19

[BUG] Sometimes aliendalvik fails to restart until reboot

asked 2016-06-21 00:54:12 +0300

Self-Perfection gravatar image

updated 2017-05-01 02:20:55 +0300

Occasionally aliendalvik can not start after being stopped until device reboot. When it happens any attempt to run android app shows an app cover with rotating progress circle which disappears after around a minute.

I tried to track down the issue and it turns out that /lib/systemd/system/aliendalvik.service has ExecStartPre=/system/script/alien_start_guard.sh and the latter script waits until file /run/user/100000/alien_ready_to_start appears. I don't know why, but occasionally this file disappears during runtime (might be related to enabling airplane mode). Therefore here is workaround for the issue: touch $XDG_RUNTIME_DIR/alien_ready_to_start After creating missing file aliendalvik starts and works just fine.

I notice this issue at least since 2015-12-21 and is still happens occasionally in 2.0.1.11 (Taalojärvi). And I'm not the only one who have this issue.

P.S.: this looks like an attempt to enforce specific order of running services implemented the wrong way. Systemd has neat way to specify service dependencies, why it is not used?

Update 2016-08-08: I tried to narrow down circumstances that leads to disappearing of $XDG_RUNTIME_DIR/alien_ready_to_start file and I don't see any specific triggering factor. Today this file disappeared a couple of hours before my morning wake up time. My Jolla device was in airplane mode, screen off, nobody was interacting with it. I woke for a bit around that time and probably turned screen on for a couple of seconds (without unlocking the device) just to check current time.

edit retag flag offensive close delete

Comments

1

I've noticed the same behaviour. Sometimes restarting alien dalvik via the official system settings ("Android Support"?) works, however using "Aliendalvik service state"-switch (https://openrepos.net/content/coderus/aliendalvik-toggle-jolla-settings) it sometimes get stuck

till ( 2016-06-21 10:29:25 +0300 )edit

I also have the same behavior. The version I use is 2.0.1.11 (Taalojärvi)... the previous version also had the same problem.

Wini ( 2016-06-25 12:53:15 +0300 )edit

Sometimes? Stopping and Restarting practically never works. Either you start it at boot-up and waste your Main-Memory and Battery-Capacity or you can't execute Android-Apps till Reboot with Android-Support.

hoschi ( 2016-06-30 14:27:32 +0300 )edit

Despite the service-file point to "/system/script/alient_start_guard.sh" I can't find the directory script there, the script seems to be stored at "/opt/alien/system/script/alien_start_guard.sh". Is this normal? Some of the voodoo-partitioning stuff?

hoschi ( 2016-06-30 14:35:43 +0300 )edit

1 Answer

Sort by » oldest newest most voted
1

answered 2016-06-30 14:57:48 +0300

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

updated 2016-06-30 15:05:38 +0300

hoschi gravatar image

Hi! Just for better view as answer:

$ ls -l /etc/systemd/user/post-user-session.target.wants/alien-pre-start.service

lrwxrwxrwx 1 root root 45 Sep  9  2015 /etc/systemd/user/post-user-session.target.wants/alien-pre-start.service -> /usr/lib/systemd/user/alien-pre-start.service

$ cat /usr/lib/systemd/user/alien-pre-start.service

[Unit]
Description=Myriad Alien Dalvik Pre-Start
After=user-session.target dbus.socket lipstick.service
Requires=dbus.socket
ConditionPathExists=!/tmp/os-update-running

[Service]
Type=oneshot
ExecStart=/opt/alien/system/script/alien_pre_start.sh

[Install]
WantedBy=post-user-session.target


$ cat /opt/alien/system/script/alien_pre_start.sh 
#!/bin/bash
# Copyright 2015 Myriad Group AG. All Rights Reserved.

# Clean up all leftover notifications from last Alien run.
/opt/alien/system/genv/bin/alien_notification_cleaner

# Notify Alien can start now
touch $XDG_RUNTIME_DIR/alien_ready_to_start

Therefore I execute as user nemo (not root, because this is user-stuff from systemd):

$ /opt/alien/system/script/alien_pre_start.sh

Windows: Reboot
Linux: Be root...while, not in this case. Be a user with developer-mode and a terminal ;)

edit flag offensive delete publish link more
Login/Signup to Answer

Question tools

Follow
5 followers

Stats

Asked: 2016-06-21 00:54:12 +0300

Seen: 702 times

Last updated: May 01 '17