Intercept calls to the file system

Login to reply to this topic.
Fri, 2005-01-28 07:10
Joined: 2003-11-20
Forum posts: 8
Hi All,

Is it possible to intercept the file system calls in Nokia Series 60 SDK ?? The scenario is : Instead of invokig the RFile APIs, the OS shud invoke my file system APIs.

Thanks and regards
Anu

Fri, 2005-01-28 08:52
Joined: 2004-07-28
Forum posts: 1379
Intercept calls to the file system
Why?

It is possiable yes.  Is it easy?  No.

You would need to create a stub DLL to replace efsrv.dll.  This dll would need the exact same exports as the real efsrv.dll (in the exact same order).  Then you would call this dll efsrv.dll.  The original dll, you would rename and link to from your stub.  In your stub, you forward the calls onto the real DLL.

didster

Fri, 2005-01-28 10:03
Anonymous (not verified)
Forum posts: 2018
Intercepting system calls
But we can't replace or rename efsrv.dll as it's placed in ROM  (on the phone ).  Do you have any other solution?

Thanks and regards
Anu
Fri, 2005-01-28 10:12
Joined: 2004-07-28
Forum posts: 1379
Intercept calls to the file system
You could monkey with the files import table at runtime, as most Win32 API intercepters do.  But you'll always going to be faced with a problem of injecting your DLL into the process in order to do this - on Win32, they use hooks, which work since the OS does the injection for you.

The only other thing I could suggest would be to write a "loader" app which loads your app, then botches the import table.  This is how may cracks ahem etc work.

Your problem is mad worse though since (most) user "programs" arn't EXEs, they are DLLs.

Good luck Smiley

didster

  • Login to reply to this topic.