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

How to disable dalvik service as normal user?

asked 2015-10-22 21:43:58 +0300

breiti_oi gravatar image

Hi everyone!

I use the situations app and have a profile to go completely offline, therefore i want to stop the dalvik machine for the time. But if i try "systemctl stop aliendalvik.service" in Terminal as normal user, i get an "Access denied" Error. So, is there another way stop it from terminal for normal users? For now the only possibility seems to use a terminal command in situations.

edit retag flag offensive close delete

Comments

If I am not completely wrong you can do that in the "Settings" app under "Android Support".

xllndr ( 2015-10-22 21:50:22 +0300 )edit

thanks i know, but i want to automate it within situations. ;)

breiti_oi ( 2015-10-23 11:16:43 +0300 )edit
2

Could disabling AlienDalvik for good be offered officially by Jolla?

Now that we have the ability to easily Start/Stop the service from the settings could it be so that it persists after phone reboot. Or have additional switch within the setting for Starting/Stopping Android-support that would allow the set state to persist after reboot.

Asmodeus ( 2015-10-23 20:42:09 +0300 )edit

2 Answers

Sort by » oldest newest most voted
4

answered 2015-10-23 19:43:44 +0300

pawel gravatar image

in openrepos there is stop dalvik by schturman. install it and call it from situations

edit flag offensive delete publish link more
2

answered 2015-10-22 22:18:51 +0300

filipb92 gravatar image

updated 2015-10-23 19:01:11 +0300

If you don't mind using developer mode and install an extra package it can be done, not too complecated You have to install sudo, that should bring in visudo also, you'll need it. Not sure if I had to do it, but maybe you need to it it, run the followingcommand which will open vi to edit the sudoers file, bare with me,

export VISUAL=/bin/vi

visudo

visudo opens the file in vi, search for (or if not found, add) a line which should read something like:

nemo ALL=(ALL)NOPASSWD: ALL

If that line is there, exit vi, type escape followed by :q. If that line is not in the file add it, press shift-A at the end of the file and add that line, quit using escape :wq The user nemo can now execute any command as root by prefixing it with sudo, like so

sudo systemctl stop aliendalvik.service

Hope this helps

edit flag offensive delete publish link more

Comments

just tried, but now it ask's for nemo's password?

breiti_oi ( 2015-10-23 12:01:52 +0300 )edit

If you checked with visudo for the line with nemo ALL etc, maybe a restart of the phone might be needed for the sudo, You can also test that in the terminal

filipb92 ( 2015-10-23 18:28:48 +0300 )edit

If you get sudo working, it will work in situations. just tested it. The visudo step was missing

filipb92 ( 2015-10-23 18:42:23 +0300 )edit
2

You might want to change that setting to nemo ALL=NOPASSWD: systemctl stop aliendalvik.service

chemist ( 2015-10-23 20:11:08 +0300 )edit

Could it be the sudo package from NielDK has a problem with the syntax checking using visudo?

I decided to use chemist's solution because i don't wanted to install an extra "App", if a terminal command also do it and also don't want to give nemo too many rights.

But i has to the set complete path to systemctl:

nemo ALL=NOPASSWD: /bin/systemctl stop aliendalvik.service

Thanks to all of you! :)

breiti_oi ( 2015-10-24 13:01:12 +0300 )edit
Login/Signup to Answer

Question tools

Follow
2 followers

Stats

Asked: 2015-10-22 21:43:58 +0300

Seen: 654 times

Last updated: Oct 23 '15