![]() |
[Announce] Dalvik resetter + Profile changer for Sailfish
Finally I did it, I'm sure it's far to be perfect, but here is my two first app :D
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 http://imagizer.imageshack.us/v2/800...0/838/up8e.jpg http://imagizer.imageshack.us/v2/800...0/607/attf.jpg 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... |
Re: [Announce] 2 small and useful (maybe) app...
Quote:
And I seriosuly mean it, if someone follows your instructions just to install profile changer they should be aware they in the meantime allowed all semi-android(just make sailfish wrapper that runs 'sudo x') or other applications easy way in, this really should not be dep for anything |
Re: [Announce] 2 small and useful (maybe) app...
Maybe you are right, I'm not developer and not so tech, I just did it because it was easy for me instead creating script with pass asking.
If you think it better to remove this post, I will remove.. PS. can you explain it please: Quote:
|
Re: [Announce] 2 small and useful (maybe) app...
It's not possible to use setuid?
|
Re: [Announce] 2 small and useful (maybe) app...
reset alien is very good idea. its not that solid :D. many reboot because of that.
|
Re: [Announce] 2 small and useful (maybe) app...
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.
|
Re: [Announce] 2 small and useful (maybe) app...
Quote:
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.
Example (added example with 2 commands seperated by "&&"): Code:
#include <stdio.h> compiled it with gcc on the phone like this: Code:
gcc vpnc-helper.c -o vpnc-helper |
Re: [Announce] 2 small and useful (maybe) app...
Quote:
My first target was to create working rpm file, that can be installable/uninstallable from desktop. Finally I got it... But... when we press on the icon it run my script as USER and many commands I need to run as ROOT when I already user.. In my first version (sudo not installed yet) I used devel-su many times in one script, for example to run this command (echo silent > /usr/share/jolla-mods/temp) I needed write it like this to get it work: Code:
echo rootme|devel-su -c sh -c "echo root|devel-su -c echo silent > /usr/share/jolla-mods/temp" Too much weird combination :( Now with sudo I run the same command like this (much easily): Code:
sudo sh -c "sudo echo silent > /usr/share/jolla-profchanger/temp" Also when and if I will learn how to package with root permission (I don't know what to write to .spec file for this), something like aegis manifest on N9, when after installation by pressing on the icon it will run script automatically as ROOT, it will be nice. But also here I have a problem.. For example this command we need to run as USER: Code:
dbus-send --type=method_call --dest=com.nokia.profiled /com/nokia/profiled com.nokia.profiled.set_profile string:"silent" |
Re: [Announce] 2 small and useful (maybe) app...
Quote:
For example in script included commands: root command user command user command root command user command Each root command is a different command, that mean I need a different my-helper files ? And how I implement this and how to run this file in the script ? |
Re: [Announce] 2 small and useful (maybe) app...
Quote:
PS. if someone can create more beauty icons it will be nice :p |
Re: [Announce] 2 small and useful (maybe) app...
Never set SUID bit on shell scripts. Executing a shell script involves a two-step process 1) The kernel starts up a SUID copy of the shell interpreter 2) The shell interpreter begins executing the shell script. You can interrupt the kernel after the first step and switch the file that the shell interpreter is about to execute.
|
Re: [Announce] 2 small and useful (maybe) app...
Quote:
Sorry I'm not programmer and all this terminology is really chines for me. I'm simple noob user that like scripting a little and trying to find easy way to do some stuff in the system without typing password every time :o |
Re: [Announce] 2 small and useful (maybe) app...
Not sure I completely see the necessity for Profile Changer.
It's pretty easy to add sound settings as a favourite in Settings, and just leave Settings as a running app on the Home screen |
Re: [Announce] 2 small and useful (maybe) app...
Quote:
|
Re: [Announce] 2 small and useful (maybe) app...
Quote:
|
Re: [Announce] 2 small and useful (maybe) app...
Can you please change the thread title?
Like: [ANNOUNCE] Dalvik resetter + Profile changer for Sailfish |
Re: [Announce] Dalvik resetter + Profile changer for Sailfish
Done... ;)
|
Re: [Announce] Dalvik resetter + Profile changer for Sailfish
Just now noticed that if you display stuck and not going sleep, refreshing of aliendalvik can help too :)
|
Re: [Announce] Dalvik resetter + Profile changer for Sailfish
Profile changer updated..
v0.2 have some small changes in the commands.. |
Re: [Announce] Dalvik resetter + Profile changer for Sailfish
thanks for these, god i hope profilematic comes to sailfish, so then i can automate / time this profile thing to have basic quiet hours!
p.s after new update, profile one doesnt work for me, dalvik resetter does still thought :( p.p.s uninstall and re-install has it working again :):p |
Re: [Announce] Dalvik resetter + Profile changer for Sailfish
Ok, I tried to create new version and using helper instead SUDO from meShell post.
For Alien Dalvik it work without any problem (update will be uploaded soon, but in the profile changer I have one little problem, Desktop icon & text not updated :( All commands work like expected, it change icon and create new .desktop file for silent or general when you press again on the icon. It just leave empty icon with same text on the desktop. In the version with sudo usage all work like should to work, it also updated desktop icon and text. How to cause update of the icon on the desktop without refresh of homescreen ? EDIT: Nevermind , got it :) (update soon) EDIT2: No.. it still not work :( |
Re: [Announce] Dalvik resetter + Profile changer for Sailfish
|
Re: [Announce] Dalvik resetter + Profile changer for Sailfish
Nice job
seems to be working correctly |
Re: [Announce] Dalvik resetter + Profile changer for Sailfish
Update:
v0.4 (Profile changer) * sudo NOT required anymore, but also can't change icon on your homescreen. |
Re: [Announce] Dalvik resetter + Profile changer for Sailfish
Could you please make the source public?
I think alien resetter is just a litte "systemctl restart aliendalvik.service, but i'd like to see how exactly you make the root think, i just don't understand the steps posted on page 1 :O Would be helpful for my app :) Thank you :) |
Re: [Announce] Dalvik resetter + Profile changer for Sailfish
Quote:
Code:
#include <stdio.h> |
Re: [Announce] Dalvik resetter + Profile changer for Sailfish
Update:
v0.5 (Profile changer) * sudo NOT required anymore, this version also update icon on your homescreen (thanks to Coderus). |
Re: [Announce] Dalvik resetter + Profile changer for Sailfish
Thanks for Dalvik reset, i was already annoyed by constant "systemctl restart aliendalvik.service"
http://i.imgur.com/VKhyeWm.png http://i.imgur.com/Azca3NI.png Two icons i made quickly. No idea if you wanted to stick with orange theme, but i did these to fit my personal favorite ambience :p Edges seem to be a bit rough, but so did the icon_launcher_template file, so i think that it isn't noticeable on phone screen |
Re: [Announce] Dalvik resetter + Profile changer for Sailfish
there is a new app in jolla habour call killdroid
|
Re: [Announce] Dalvik resetter + Profile changer for Sailfish
Quote:
|
Re: [Announce] 2 small and useful (maybe) app...
Quote:
in N9 it was simple, devel-su user -c "comnand" and it didn't ask about password. Can we do something similar on Jolla? thanks |
Re: [Announce] Dalvik resetter + Profile changer for Sailfish
Ok, found it :D
When you are ROOT and if you want to run command that should be run as USER, you can use this command: Code:
su -l nemo -c "your command" |
All times are GMT. The time now is 10:40. |
vBulletin® Version 3.8.8