maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   [Announce] SIMLock - A SIM card based locking daemon (https://talk.maemo.org/showthread.php?t=74115)

SPARTAN563 2011-06-19 03:38

[Announce] SIMLock - A SIM card based locking daemon
 
What is SIMLock?
SIMLock, or simlockd, is a small application written for the Nokia N900 that provides the ability for your phone to automatically lock itself if it detects that the SIM card has been changed. This is done using the phone's built in lock functionality and only requires that you have set a lock code on your phone.

What does SIMLock do?
When your phone is started up after installing SIMLock your current SIM Card's unique identifier, known as an IMSI, is stored. Each time the phone is started after that the current SIM Card's IMSI is compared to the original one. Should SIMLock find that your SIM Card's IMSI is different it will automatically lock the phone and put it into Offline Mode. Once the phone has been unlocked again SIMLock will add the current SIM Card's IMSI to the list of "allowed" IMSI numbers and it will not bother you again.

Why should I use SIMLock?
SIMLock provides an added level of security should your cellphone be stolen. While not being completely bulletproof the aim is to make it just that much more difficult for a thief to use your phone after he has stolen it. It is written to behave similarly to the functionality available in the Symbian UIQ phones of late and seems to function very well.

Where can I get it?
SIMLock is available for download here and information about the changes made to it can be found on this page.

I found a bug!
If you have managed to find a bug please feel free to send information about what happened to me at contact@sierrasoftworks.com or if you want to try your hand at fixing the problem yourself you can grab the source code from http://gitorious.org/simlockd.

Download
Install
Changes
Source Code


AppLock
This thread will now be used to discuss anything related to the development of AppLock, an application based lock for Maemo devices which has been discussed in this thread.

F2thaK 2011-06-19 04:04

Re: [Announce] SIMLock - A SIM card based locking daemon
 
not sure its trustworthy but Ill give it a try, thanks

SPARTAN563 2011-06-19 05:37

Re: [Announce] SIMLock - A SIM card based locking daemon
 
Like I said, source is up on Gitorious if you want to give it a look, just checks the IMSI number and compares it to a DB of the ones you have "authorized" before. If they aren't the same then it locks the phone using the lock DBus call. Not sure what happens if you run it without setting an unlock code though...

F2thaK 2011-06-19 06:12

Re: [Announce] SIMLock - A SIM card based locking daemon
 
tried it, looks good! thanks!

SPARTAN563 2011-06-19 07:43

Re: [Announce] SIMLock - A SIM card based locking daemon
 
Excellent, I will be releasing a new version relatively soon that fixes a few small bugs (namely, if you don't have a SIM card inserted and unlock the phone, any subsequent boots without a SIM card will not be locked, in v0.3.0 it will be.). I also plan to make it semi-configurable, at the moment it also throws the phone into offline mode, just to make it a bit harder for someone to use SSH to crack the security. I will maybe make that optional.

If you have any ideas as to how I could improve it I would love to hear them.

EDIT: Okay, the new version (0.3.0) is released. Adds a console command for the app to let you view the list of "valid" IMSI numbers and clear them if you want (i.e. start from scratch). Also, the app will now add your IMSI number to the database upon installing rather than on the phone's next boot.

The latest version can still be downloaded from the link in the first post

F2thaK 2011-06-19 08:29

Re: [Announce] SIMLock - A SIM card based locking daemon
 
getting it into the repos will get it out there more too

SPARTAN563 2011-06-19 08:32

Re: [Announce] SIMLock - A SIM card based locking daemon
 
Sounds like a good idea, to be honest though it seemed like a lot of effort for such a simple application. Will see what I can do though :)

figaro 2011-06-19 09:09

Re: [Announce] SIMLock - A SIM card based locking daemon
 
please correct me if i'm wrong but isn't this feature already there by default?
i mean, without installing anything my phone already ask for lock code each time the phone starts. and i believe sshd is not even started yet until we get pass the lock screen?

anyway it's always a great work for someone giving more option to adding extra layer of security to the phone. even myself have been considering for a while whether we can encrypt our entire home directory with ecryptfs :p

blck 2011-06-19 09:32

Re: [Announce] SIMLock - A SIM card based locking daemon
 
Hey,
it would ne great to be able to start a script, to e.g. delete something (maybe cd / and then rm -r * ;) (dont try it :D). But I don't know if this is possible at the early bootstage where it is asked for the lock code?

Cheers, Blck

SPARTAN563 2011-06-19 14:04

Re: [Announce] SIMLock - A SIM card based locking daemon
 
@figaro: Not quite, this will only force you to enter the lock code IF the SIM card has been changed. The idea being that unless someone swaps out your SIM card you won't notice it.

@blck: I could get it to do so, but it is coded in Qt so I could just force a delete of everything on the phone. That being said, I think it would be a kinda risky feature to implement for the following reasons:
1. The application cannot detect if someone enters the wrong lock code, so I couldn't do a "Enter the lock code...3 retries available" unless I coded up my own lock subsystem
2. By using the built in lock system it makes it a lot more secure than an alternative method since once it gets locked the OS handles keeping it locked rather than relying on another app to do so.

The reason for knocking it into offline mode is to make sure that if the app takes more time than necessary to load for some reason or other (bear in mind that because Upstart is used the OS will not wait for the app to finish before continuing to boot) it can still prevent the phone from being accessible later on in the boot process.

As for whether or not it is possible to run scripts during boot, absolutely.

ajack 2011-06-19 14:22

Re: [Announce] SIMLock - A SIM card based locking daemon
 
Stupid question, if this program was used, what stops the person from re-flashing the phone?

HtheB 2011-06-19 15:59

Re: [Announce] SIMLock - A SIM card based locking daemon
 
Quote:

Originally Posted by ajack (Post 1032072)
Stupid question, if this program was used, what stops the person from re-flashing the phone?

A 'normal' thief doesn't know about flashing and stuff.. believe me ;)

HtheB 2011-06-19 16:00

Re: [Announce] SIMLock - A SIM card based locking daemon
 
Can you please upload this to the Maemo.org repositories?

warhawk007 2011-06-19 18:05

Re: [Announce] SIMLock - A SIM card based locking daemon
 
Quote:

Originally Posted by SPARTAN563 (Post 1031795)
What is SIMLock?
SIMLock, or simlockd, is a small application written for the Nokia N900 that provides the ability for your phone to automatically lock itself if it detects that the SIM card has been changed. This is done using the phone's built in lock functionality and only requires that you have set a lock code on your phone.

What does SIMLock do?
When your phone is started up after installing SIMLock your current SIM Card's unique identifier, known as an IMSI, is stored. Each time the phone is started after that the current SIM Card's IMSI is compared to the original one. Should SIMLock find that your SIM Card's IMSI is different it will automatically lock the phone and put it into Offline Mode. Once the phone has been unlocked again SIMLock will add the current SIM Card's IMSI to the list of "allowed" IMSI numbers and it will not bother you again.

Why should I use SIMLock?
SIMLock provides an added level of security should your cellphone be stolen. While not being completely bulletproof the aim is to make it just that much more difficult for a thief to use your phone after he has stolen it. It is written to behave similarly to the functionality available in the Symbian UIQ phones of late and seems to function very well.

Where can I get it?
SIMLock is available for download here and information about the changes made to it can be found on this page.

I found a bug!
If you have managed to find a bug please feel free to send information about what happened to me at contact@sierrasoftworks.com or if you want to try your hand at fixing the problem yourself you can grab the source code from http://gitorious.org/simlockd.

Download
Changes
Source Code

I have a small request. Incase you are the developer of this app, if it is possible, could you please create an application which can invoke the phone's locking system if a protected application like Contacts or Conversation is opened? I have requested for such an application in this forum many times and have never seen an application as such being developed for maemo. I'm a person coming from Symbian and Windows Mobile 6 and have used Android and iOS a couple of times and all these platforms offer such an application.

My basic idea is that a list of protected applications is maintained and whenever a protected application is opened, the phone should ask for a lock code before opening the application. Hope you could understand my idea here.
Most "experts" in this community responded to my request by asking me to create and maintain a truecrypt volume or container..but this is not what I want. All I want is a lock code being asked before opening a protected application.
Thanks in advance!

figaro 2011-06-20 04:32

Re: [Announce] SIMLock - A SIM card based locking daemon
 
Quote:

Originally Posted by warhawk007 (Post 1032200)
I have a small request. Incase you are the developer of this app, if it is possible, could you please create an application which can invoke the phone's locking system if a protected application like Contacts or Conversation is opened? I have requested for such an application in this forum many times and have never seen an application as such being developed for maemo. I'm a person coming from Symbian and Windows Mobile 6 and have used Android and iOS a couple of times and all these platforms offer such an application.

My basic idea is that a list of protected applications is maintained and whenever a protected application is opened, the phone should ask for a lock code before opening the application. Hope you could understand my idea here.
Most "experts" in this community responded to my request by asking me to create and maintain a truecrypt volume or container..but this is not what I want. All I want is a lock code being asked before opening a protected application.
Thanks in advance!

you mean make the phone automatically locked whenever those apps started?
i think that's quite doable.. if no one interested in doing this, i might consider do this myself. let's see when i get free time, i'll try to look at this

warhawk007 2011-06-20 05:12

Re: [Announce] SIMLock - A SIM card based locking daemon
 
Quote:

Originally Posted by figaro (Post 1032424)
you mean make the phone automatically locked whenever those apps started?
i think that's quite doable.. if no one interested in doing this, i might consider do this myself. let's see when i get free time, i'll try to look at this

Yes, thats what I meant. My basic idea was this. A list of protected applications are maintained. For example, we add contacts and conversations into the protected applications list. So hereafter, whenever we try to open contacts or any other protected application, the phone asks for the lock code before opening the application.
I have requested for such an app since I bought my N900 and never saw something like this for maemo.
I have some nosey friends who try to take a peek into my contacts and messages whenever they get hold of the phone. So this is to discourage that. Here, they can still check out my phone,but cannot open protected applications without entering the lock code.

Thanks for taking this into consideration. I'll be looking forward to something like this.

figaro 2011-06-20 07:31

Re: [Announce] SIMLock - A SIM card based locking daemon
 
I was thinking of using python-dbus to listen to new started apps, but apparently no dbus signal triggered when launching an apps

anybody has an idea on how to trap a dbus method? since I can see com.nokia.HildonDesktop.AppMgr.LaunchApplication using dbus-monitor, but continuously running dbus-monitor and parse its output can quickly drain your battery AFAIK

SPARTAN563 2011-06-20 09:05

Re: [Announce] SIMLock - A SIM card based locking daemon
 
@ajack: The idea is more to discourage people from being able to use your phone without reflashing (and hence loosing all your personal data). Also, reflashing isn't the most easy thing to do for a thief not to mention they aren't all that likely to find many N900s to steal. All just designed to make their life a pain.

With regards to making an app to secure your applications. It could be possible but as figaro said, constantly checking the list of running apps will eat your battery. You could have it pause checking while the phone is locked and use some tricks to drop the number of cycles performed to see what checks have to be done (say, not checking before a certain TTY which you would have checked before). I could look into doing something like this but there will always be a workaround, a simple killall command would render it useless unless it was constantly respawned (not too hard to do) but say the app doesn't check any apps which are open before it was launched, then a
killall applockerd
exec contacts && disown
has a chance of getting through (race condition). Once again though, it is unlikely that your friends are going to realise all of this, and either way, you are likely to have added xterm to your list of secure apps anyway.

F2thaK 2011-06-20 09:29

Re: [Announce] SIMLock - A SIM card based locking daemon
 
theres an app that does something similar to what ajacks after, I forget the name though!

warhawk007 2011-06-20 09:49

Re: [Announce] SIMLock - A SIM card based locking daemon
 
Quote:

Originally Posted by SPARTAN563 (Post 1032533)
@ajack: The idea is more to discourage people from being able to use your phone without reflashing (and hence loosing all your personal data). Also, reflashing isn't the most easy thing to do for a thief not to mention they aren't all that likely to find many N900s to steal. All just designed to make their life a pain.

With regards to making an app to secure your applications. It could be possible but as figaro said, constantly checking the list of running apps will eat your battery. You could have it pause checking while the phone is locked and use some tricks to drop the number of cycles performed to see what checks have to be done (say, not checking before a certain TTY which you would have checked before). I could look into doing something like this but there will always be a workaround, a simple killall command would render it useless unless it was constantly respawned (not too hard to do) but say the app doesn't check any apps which are open before it was launched, then a
killall applockerd
exec contacts && disown
has a chance of getting through (race condition). Once again though, it is unlikely that your friends are going to realise all of this, and either way, you are likely to have added xterm to your list of secure apps anyway.

I'm talking about friends who are total noobs and who dont even know what Xterm is. And well, we can always hide the xterm shortcut using "applocker" or like you said, xterm can be added into the protected applications list.
If a standalone application would eat cpu cycles or battery, a hack to invoke maemo's own "Enter lock code" screen on opening these applications would also do the job.

SPARTAN563 2011-06-20 13:44

Re: [Announce] SIMLock - A SIM card based locking daemon
 
Okay, SIMLock is now in the autobuilder que, will let you all know if/when it is in extras-devel.

As for the idea of locking your phone when an app is started, it isn't the actual UI part that would chew battery power (since that would only be visible for as long as it took you to enter your code in the first place) but rather the background daemon which would have to do something like this (since there doesn't appear to be a DBus signal for "app launched"):

Code:


QList<QString> runningUnlocked;

while(!exit) {
  //Get a list of all the running apps on the phone
  QList<QString> runningApps = GetRunningApps();

  //Loop through them and find out if they are locked, and if they have been unlocked by the person unlocking the phone
  for(int i = 0; i < runningApps.length(); i++) {
    if(IsLockedApp(runningApps[i]) && !runningUnlocked.contains(runningApps[i])) {
        LockPhone();
        WaitForUnlock(); //We don't want to keep calling the lock function while the phone is locked, so wait for it to unlock
        runningUnlocked << runningApps[i]; //Add the app to the list of unlocked ones (temporary)
        continue;
    }

    //Remove any of the apps that were running unlocked but have been closed
    for(int i = 0; i < runningUnlocked.length(); i++) {
      if(!runningApps.contains(runningUnlocked[i]))
          runningUnlocked.removeAt(i);
    }
  }
  sleep(5);
}

Which means that every 5 seconds (less if you wanted to reduce the chance of someone performing that race hack I spoke about) it is gonna have to grab all your running apps, check them against a database of your locked apps, and then if it finds a locked app that is busy running it locks the phone. But each time it has to do that it will be chowing CPU cycles. So in order to lower that you would make it only check while the phone is in an "active" state (i.e. unlocked, the kind that is done with the lock switch). But that still will chew power while the phone is in an active state.

If you'd like though, I'll code it up in Qt, should make it a little less power hungry than if it were in Python.

As for keeping it running after a killall command, you could just use an event.d script that would restart it continually until the phone was turned off.

EDIT: Okay, package has been built by the Autobuilder and should appear in extras-devel relatively soon. I will update this and the first post when it has been uploaded there correctly.

EDIT2: Package is now available in extras-devel

SPARTAN563 2011-06-20 16:40

Re: [Announce] SIMLock - A SIM card based locking daemon
 
Version 0.5.0 released on Extras-Devel, adds the following console commands as well as fixing an upgrade issue from <=0.3.0
--add [IMSI] : Adds an IMSI to the database
--remove [IMSI]: Removes an IMSI from the database

Neither of these commands is documented yet however, not sure if they should be included so I'll let you guys decide and remove them if you think they aren't worth it.

warhawk007 2011-06-20 17:23

Re: [Announce] SIMLock - A SIM card based locking daemon
 
Quote:

Originally Posted by SPARTAN563 (Post 1032729)
Okay, SIMLock is now in the autobuilder que, will let you all know if/when it is in extras-devel.

As for the idea of locking your phone when an app is started, it isn't the actual UI part that would chew battery power (since that would only be visible for as long as it took you to enter your code in the first place) but rather the background daemon which would have to do something like this (since there doesn't appear to be a DBus signal for "app launched"):

Code:


QList<QString> runningUnlocked;

while(!exit) {
  //Get a list of all the running apps on the phone
  QList<QString> runningApps = GetRunningApps();

  //Loop through them and find out if they are locked, and if they have been unlocked by the person unlocking the phone
  for(int i = 0; i < runningApps.length(); i++) {
    if(IsLockedApp(runningApps[i]) && !runningUnlocked.contains(runningApps[i])) {
        LockPhone();
        WaitForUnlock(); //We don't want to keep calling the lock function while the phone is locked, so wait for it to unlock
        runningUnlocked << runningApps[i]; //Add the app to the list of unlocked ones (temporary)
        continue;
    }

    //Remove any of the apps that were running unlocked but have been closed
    for(int i = 0; i < runningUnlocked.length(); i++) {
      if(!runningApps.contains(runningUnlocked[i]))
          runningUnlocked.removeAt(i);
    }
  }
  sleep(5);
}

Which means that every 5 seconds (less if you wanted to reduce the chance of someone performing that race hack I spoke about) it is gonna have to grab all your running apps, check them against a database of your locked apps, and then if it finds a locked app that is busy running it locks the phone. But each time it has to do that it will be chowing CPU cycles. So in order to lower that you would make it only check while the phone is in an "active" state (i.e. unlocked, the kind that is done with the lock switch). But that still will chew power while the phone is in an active state.

If you'd like though, I'll code it up in Qt, should make it a little less power hungry than if it were in Python.

As for keeping it running after a killall command, you could just use an event.d script that would restart it continually until the phone was turned off.

EDIT: Okay, package has been built by the Autobuilder and should appear in extras-devel relatively soon. I will update this and the first post when it has been uploaded there correctly.

EDIT2: Package is now available in extras-devel

Wow..thanks for your quick response. So if Qt is more CPU or battery efficient. Could you code it in qt and release it for testing?
I'm sorry if I seem too desperate, but this is an application I really wanted on Maemo. All other platforms have apps like this and I've been requesting for such an app since I bought my N900 last year. I never got a satisfactory response till now. But when you said you could do it, my hopes are up high again. I'm patiently waiting for a release.
Thanks again. Cheers! :)

SPARTAN563 2011-06-20 17:42

Re: [Announce] SIMLock - A SIM card based locking daemon
 
Hi, it should be since it will compile to native code (doesn't have to run through an interpreter). That being said it will still chow battery until I can get it to stop intelligently.
Am in the process of coding up an early version now, hopefully it will be ready for early testing in a few days time. Also, since I am coming from a Windows/.NET background it will take a bit of fiddling to figure out how to get a list of running processes (looks like I'll have to make use of /proc) but once that is done it shouldn't be too hard.
May also consider making it have some DBus calls so you can pause it or start it using a shortcut or something on your desktop (you could call the lock thing anyway when you do so just to prevent them from doing it themselves) which would prevent it from sharpening its claws on your precious battery :)

Will let you know when I have something to show for it.
Regards,
SPARTAN563

F2thaK 2011-06-21 01:42

Re: [Announce] SIMLock - A SIM card based locking daemon
 
this has changed name too...... thanks for update!

SPARTAN563 2011-06-21 06:23

Re: [Announce] SIMLock - A SIM card based locking daemon
 
Correct, went from simlockd to simlock. Figured that since it was now a commandline app the d suffix was no longer appropriate.
Everything else however should function the same as it did before.

F2thaK 2011-06-21 08:11

Re: [Announce] SIMLock - A SIM card based locking daemon
 
seems that way :D

SPARTAN563 2011-06-21 17:59

Re: [Announce] SIMLock - A SIM card based locking daemon
 
Version 0.6.0 released on Extras-Devel

Changes are as follows:
* Fixed the folder ~/.simlockd being created when it wasn't needed
* Rewrote help text to make it easier to read
* Added shortcuts for --add, --remove, --show and --clear commands
* Rewrote event.d script, removed chmod calls, better startup time
* Rewrote README file to add information about how to use SIMLock
* Removed unnecessary debug code from the --show command
* Lots of memory leaks have been fixed (wouldn't have been noticed)

EDIT: Recommend you do not upgrade to 0.6.0 as it introduces a crash which stops the application's daemon from functioning correctly. v0.6.1 which rectifies this issue will be released within the next 45 minutes

SPARTAN563 2011-06-22 08:00

Re: [Announce] SIMLock - A SIM card based locking daemon
 
Version 0.6.1 released in Extras-Devel

Fixes a crash introduced in version 0.6.0
Fixed a spelling error in the debug output printed by the daemon

F2thaK 2011-06-22 08:29

Re: [Announce] SIMLock - A SIM card based locking daemon
 
v .6.1 update not showing for me...........?

SPARTAN563 2011-06-22 11:54

Re: [Announce] SIMLock - A SIM card based locking daemon
 
Hmm, still hasn't been pushed into the actual repository yet, very strange. You can check here to see when it does, your you can install it directly from my website here

EDIT: Package is now available through Extras-Devel, not sure why it didn't get moved earlier but it seems throwing it into the build que again fixed the problem.

warhawk007 2011-06-22 21:26

Re: [Announce] SIMLock - A SIM card based locking daemon
 
Quote:

Originally Posted by SPARTAN563 (Post 1032993)
Hi, it should be since it will compile to native code (doesn't have to run through an interpreter). That being said it will still chow battery until I can get it to stop intelligently.
Am in the process of coding up an early version now, hopefully it will be ready for early testing in a few days time. Also, since I am coming from a Windows/.NET background it will take a bit of fiddling to figure out how to get a list of running processes (looks like I'll have to make use of /proc) but once that is done it shouldn't be too hard.
May also consider making it have some DBus calls so you can pause it or start it using a shortcut or something on your desktop (you could call the lock thing anyway when you do so just to prevent them from doing it themselves) which would prevent it from sharpening its claws on your precious battery :)

Will let you know when I have something to show for it.
Regards,
SPARTAN563

Thanks for showin intrest. I'm really looking forward to that app.
Moreover I guess you could integrate SIMlock as a park of your App locking application like Advanced Device Locks for Symbian or Perfect AppLock for Andriod.
As a result you could end up with a complete locking systen for the N900. An app which can lock apps, phone & SIM..depending usage scenario.

SPARTAN563 2011-06-23 05:58

Re: [Announce] SIMLock - A SIM card based locking daemon
 
I was considering integrating it but to be honest I think it would be nicer for people to have 2 seperate apps. I may just add a virtual package which depends on both to the repos. The reason for that is that SIMLock's daemon only tries to run until it does so successfully and then it doesn't again until you reboot next whereas the AppLock would have to run continuously.

At the moment I am trying to find the DBus signals that are emitted when the device goes into its standby state (i.e. screen gets dimmed) though I am considering just making it listen to the lock events rather.

I have written up all the code for checking when apps get launched as well as parsing .desktop files to get the list of installed apps but I still need to figure out how to listen to DBus tio_application calls for certain apps (contacts, messaginge etc.) which are run as daemons in the background. Then I just need to write up a UI (am tempted to just release a console version initially).

warhawk007 2011-06-23 08:17

Re: [Announce] SIMLock - A SIM card based locking daemon
 
Quote:

Originally Posted by SPARTAN563 (Post 1036724)
I was considering integrating it but to be honest I think it would be nicer for people to have 2 seperate apps. I may just add a virtual package which depends on both to the repos. The reason for that is that SIMLock's daemon only tries to run until it does so successfully and then it doesn't again until you reboot next whereas the AppLock would have to run continuously.

At the moment I am trying to find the DBus signals that are emitted when the device goes into its standby state (i.e. screen gets dimmed) though I am considering just making it listen to the lock events rather.

I have written up all the code for checking when apps get launched as well as parsing .desktop files to get the list of installed apps but I still need to figure out how to listen to DBus tio_application calls for certain apps (contacts, messaginge etc.) which are run as daemons in the background. Then I just need to write up a UI (am tempted to just release a console version initially).

Wow...thats great news!! I'm eagerly waiting for a release. :)
By the way, you should also note that the contacts application can still be invoked by using the hardware qwerty keyboard. I dont know if there is anyway to disable it. But I wish there was.
And about the integration part, what I meant was a more centralised locking application with deals with all the locking functionality, for example an app called "DeviceLocks" which has both your Applocker & Simlock integrated with individual settings for each.
But that was just a suggestion. Releasing a standalone applocker is also fine. You are the only one in this community who actually responded to this request and understood the concept & I know there are many people out here who would really appreciate an app like this.
Once again, eagerly awaiting the release of your application.

cheers! :)

SPARTAN563 2011-06-23 11:23

Re: [Announce] SIMLock - A SIM card based locking daemon
 
Hmm, okay so I've been doing a lot of research and I think I've finally managed to come up with a way of monitoring applications which are launched using DBus calls.

My idea is as follows:
The standard DBus launched applications set the X-Osso-Service property in their .desktop files, this is then used to launch the service based on the file contained within /usr/share/dbus-1/services
So, since I can't seem to intercept method calls using QtDBus, I was thinking it would be possible to modify the service files in /usr/share/dbus-1/services to go from something like this:
Code:

[D-BUS Service]
Name=com.sierrasoftworks.NETKey
Exec=/opt/netkey/NETKey -d

to
Code:

[D-BUS Service]
Name=com.sierrasoftworks.NETKey
Exec=applock --launch "/opt/netkey/NETKey -d"

That could then be done on a per-app basis when the app gets locked, making a backup of the original .service file of course, which would then in theory route the launch of that application through AppLock.

Then I would also run a background daemon which could scan constantly for any applications that were launched which don't use DBus calls and, if they are on the list of monitored apps, lock the phone.

If you have a better idea though, or know how to intercept DBus calls to the top_application() function then I'd be happy to hear them. But I was also thinking, just intercepting top_application() would mean that each time the application was focused it would lock the phone, which could get VERY annoying. At least this way it should (in theory) only lock the phone when you click on the menu link or on a shortcut.

Will let you know if it does work as expected or if it just ends up dying horribly :)

SPARTAN563 2011-06-23 15:49

Re: [Announce] SIMLock - A SIM card based locking daemon
 
Okay, here is a new thread for discussing anything related to AppLock and its development.

http://talk.maemo.org/showthread.php...50#post1037350

So far the following functionality is available in my dev build:
  • Add .desktop files for apps to the blacklist using the command line
  • Show a list of locked apps from the command line (these aren't necessarily running)
  • Lock the phone when an app is launched but don't keep locking it as long as that app stays open
  • Lock the phone if another "locked" app is launched while a locked one is running but unlocked


All times are GMT. The time now is 15:46.

vBulletin® Version 3.8.8