![]() |
[ANNOUNCE] AppLock - An application locking daemon for Maemo handsets
What is AppLock?
AppLock is an application designed to lock your phone if any one of a predetermined set of applications is launched. In layman's terms, if a locked application is started your phone will enter a lock state and wait for you to enter your password before continuing. What does AppLock do? AppLock runs in the form of a background daemon which listens to DBus messages. These messages are used to determine when an application is started on your phone, and if the application is on AppLock's blacklist it will promptly lock your phone. This allows you to prevent people from accessing certain applications on your phone without your permission. Usage NOTE - For more information on testing AppLock and for a comprehensive list of the commands and DBus methods and signals available please consult the README file. You can download the latest README file here. AppLock can be used from either a CLI or using the user interface introduced in version 0.3.0 The user interface is by far the easiest way to go about using AppLock and can be accessed from your menu. User Interface v0.3.0+ http://talk.maemo.org/attachment.php...1&d=1310074830 As of version 0.3.0 a user interface is included with AppLock. This user interface is designed to simplify the process of adding applications to your lock list however please note that it is still in development and as such has a few bugs. I hope to address these bugs in my next release however for the time being here are the workarounds. What still needs to be done? Milestone 1: Pre-Release
Milestone 2: OSSO Service Support
Pre-Milestone 3: Stable monitoring
This milestone will be reached when a functional, and usable, GUI has been written and tested.
Milestone 4: Beta Release
Milestone 5: Final Release This release will be pushed to extras as soon as all bugs have been rectified and the package is deemed stable enough for day to day use. Source Code Source code for AppLock is available on Gitorious, you can view, download and contribute to it by visiting http://gitorious.org/applock-n900/applock All development is done in Qt using the Nokia Qt SDK Download AppLock is available in the Extras-Devel repository or alternatively you can download the deb file from my website here: http://sierrasoftworks.com/AppLock |
Re: [WIP] AppLock - An application locking daemon for Maemo handsets
Does it drains battry??( Since chacking apps in every 5 sec.)
|
Re: [WIP] AppLock - An application locking daemon for Maemo handsets
The idea is that while your phone's screen is off or locked it will pause checking. But from what I can see it isn't too bad. Will run a proper test when I have a release-ready version to use for benchmarking.
|
Re: [WIP] AppLock - An application locking daemon for Maemo handsets
Quote:
From what I see, you've just announced the concept and provided a source of the work you've done till now. Am I right? And I see that its not a public release yet. :) Great start. :) I'm awaiting the first public release from you. |
Re: [WIP] AppLock - An application locking daemon for Maemo handsets
Haha, I actually have only really got around to doing some testing of the code today and so I figured I might as well start a thread since people would want to hear about the progress on it.
Quote:
At the moment I am being stubborn and still trying to get DBus method calls to be monitored, looks like I am going to have to make use of the core libdbus classes in order to get that low level stuff done which is a bit of a pain... (Looks up the dbus-monitor source code). With any luck though, if I do manage to get that right, that will drop the battery usage and complexity (as well as the risk factor) by a large margin which is always nice. What it boils down to is that if I can stop being silly and actually follow my dev milestones I should have a pre-release built (Milestone 1) up by tomorrow sometime. Will keep you all posted. |
Re: [WIP] AppLock - An application locking daemon for Maemo handsets
Quote:
|
Re: [WIP] AppLock - An application locking daemon for Maemo handsets
Hi jstokes, would I just connect that on the system bus? (Since that's where the top_application method is called) or is there something else I need to do instead?
|
Re: [WIP] AppLock - An application locking daemon for Maemo handsets
Hi there,
Quote:
However, and I just remembered sorry, this may not work great for you with many of the programs that come with the N900: they preload themselves so they will have already registered their names... You can call the method NameHasOwner with a D-Bus service name, though, to see if a program has already registered itself http://wiki.openmoko.org/wiki/Org_freedesktop_DBus. and http://dbus.freedesktop.org/doc/dbus-specification.html may also prove helpful |
Re: [WIP] AppLock - An application locking daemon for Maemo handsets
Ah, yeah in Qt they have a signal that gets emitted by the QDBusConnection::interface() object called serviceOwnerChanged which does the same thing. Unfortunately it doesn't give me quite what I want as like you said, is just shows when an app launches.
What the libdbus classes give me (if you look at what dbus-monitor can do) is the ability to "eavesdrop" on which method calls are made across the bus. So all I really need to do is check to see if a call is made to the top_application function, if it is I grab the dbus path and compare it to the ones I have stored in memory (from the .service files) and if it matches any of my "locked" ones I just lock the phone. All sounds great in theory but unfortunately the dbus bindings are having a field day with my Qt install (156 errors and counting... :P) because Qt doesn't use many of the headers that it depends on. Overall, a royal PITA Thanks anyway, am sure that those calls will come in useful at some point. I wonder, do you know if A) those signals are triggered on an app that doesn't make use of DBus and B) you can determine the source of origin? If !B then I could always use them as a trigger for the check routine rather than having a continuous check (would just have to implement some kind of anti-spam protection), but if B it would be really, really useful :) |
Re: [WIP] AppLock - An application locking daemon for Maemo handsets
Quote:
AFAIA, none of the bindings support spying on method calls - signals only. But I could be wrong. I think dbus_bus_add_match can be used, but I don't know if you would be required to do any mainloop integration as you would with DBus-GLib when using the GLib mainloop and DBusConnection to listen to stuff. Quote:
Quote:
B: If you have an owner's name (something like ":1.56"), you can use GetConnectionUnixProcessID (part of org.freedesktop.DBus) to get the PID of the application asking. I'm not entirely sure if this is what you want but run dbus-monitor, look for "method call sender=<some number here>" and try Code:
dbus-send --print-reply --dest=org.freedesktop.DBus /org/freedesktop/DBus org.freedesktop.DBus.GetConnectionUnixProcessID string:"<some number here>" |
All times are GMT. The time now is 15:54. |
vBulletin® Version 3.8.8