![]() |
2014-01-29
, 02:23
|
Posts: 2,076 |
Thanked: 3,268 times |
Joined on Feb 2011
|
#2
|
Finally I did it, I'm sure it's far to be perfect, but here is my two first app
May will be useful for someone...
1. Alien Dalvik restart - It's just bottom for quick refreshing aliendalvik service.
2. Profile changer - This is a small One click app for changing profile to silent and back to general. You can put this icon where you can quickly find it instead go to lockscreen..
Both apps requared sudo installed on your phone. You can install it from mer-tools repository. (thanks to rcolistete)
Also you need add this line: to:Code:$ devel-su # ssu ar mer-tools # ssu ur # pkcon refresh # pkcon install sudo
to: /etc/sudoers (thanks to szopin)Code:nemo ALL=(ALL) NOPASSWD: ALL
That's all
Download from my OpenRepos:
1. AlienDalvik restart
2. Profile changer
![]() |
2014-01-29
, 06:02
|
|
Posts: 5,339 |
Thanked: 4,133 times |
Joined on Jan 2010
@ Israel
|
#3
|
just make sailfish wrapper that runs 'sudo x'
![]() |
2014-01-29
, 07:21
|
Posts: 499 |
Thanked: 836 times |
Joined on Jun 2012
@ Finland
|
#6
|
The Following User Says Thank You to Boxeri For This Useful Post: | ||
![]() |
2014-01-29
, 07:37
|
|
Posts: 60 |
Thanked: 104 times |
Joined on Dec 2009
|
#7
|
It's not possible to use setuid?
#include <stdio.h> #include <stdlib.h> #include <sys/types.h> #include <unistd.h> int main() { setuid( 0 ); system( "/usr/sbin/vpnc && /sbin/ip route add xxx.xxx.x.0/24 dev tun0); return 0; }
gcc vpnc-helper.c -o vpnc-helper devel-su chown root:root vpnc-helper chmod 4755 vpnc-helper
The Following User Says Thank You to meShell For This Useful Post: | ||
![]() |
2014-01-29
, 07:41
|
|
Posts: 5,339 |
Thanked: 4,133 times |
Joined on Jan 2010
@ Israel
|
#8
|
It's not possible to use setuid?
echo rootme|devel-su -c sh -c "echo root|devel-su -c echo silent > /usr/share/jolla-mods/temp"
sudo sh -c "sudo echo silent > /usr/share/jolla-profchanger/temp"
dbus-send --type=method_call --dest=com.nokia.profiled /com/nokia/profiled com.nokia.profiled.set_profile string:"silent"
![]() |
2014-01-29
, 08:00
|
|
Posts: 5,339 |
Thanked: 4,133 times |
Joined on Jan 2010
@ Israel
|
#9
|
setuid( 0 )
It is possible, I am using this "helper" to start my "vpnc" with a GUI-Button, because I did not get a response and did not find any "recommended way to run as privileged" via Sailfis-App.
So there are 3 steps.
- compile helper program
- change owner to root:root
- change permissions to 4755
Example (added example with 2 commands seperated by "&&"):
compiled it with gcc on the phone like this:Code:#include <stdio.h> #include <stdlib.h> #include <sys/types.h> #include <unistd.h> int main() { setuid( 0 ); system( "/usr/sbin/vpnc && /sbin/ip route add xxx.xxx.x.0/24 dev tun0); return 0; }
Code:gcc vpnc-helper.c -o vpnc-helper devel-su chown root:root vpnc-helper chmod 4755 vpnc-helper
![]() |
2014-01-29
, 08:16
|
|
Posts: 5,339 |
Thanked: 4,133 times |
Joined on Jan 2010
@ Israel
|
#10
|
I also think that reset alien dalvik is really good idea! This is something that i do quite regularly on terminal because of connection problems on android side.
May will be useful for someone...
1. Alien Dalvik restart - It's just bottom for quick refreshing aliendalvik service.
v0.3
* sudo not needed anymore (used helper from meShell post, thanks)
2. Profile changer - This is a small One click app for changing profile to silent and back to general. You can put this icon where you can quickly find it instead go to lockscreen..
v0.5
* sudo NOT required anymore, this version also update icon on your homescreen (thanks to Coderus).
v0.4
* sudo NOT required anymore, but also can't change icon on your homescreen.
v0.2
* small changes in the commands
Download from my OpenRepos:
1. AlienDalvik restart
2. Profile changer
Beware, use it on your own risk !!!
PS. If someone can create more buty icons, I will repackage them...
Lausanne & Lyon de descente...
----------------
Schturman's home page
Schturman's repo on openrepos
RPM packaging directly on your Jolla phone.
Root & User SSH access to Jolla via WinSCP.
Root and User SSH access to Jolla via Nautilus on Linux PC.
Last edited by Schturman; 2014-02-07 at 22:18.