Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

What hackers can teach us about what might be coming in future versions of Windows Phone

DZone's Guide to

What hackers can teach us about what might be coming in future versions of Windows Phone

· Mobile Zone
Free Resource

Download this comprehensive Mobile Testing Reference Guide to help prioritize which mobile devices and OSs to test against, brought to you in partnership with Sauce Labs.

Ever wondered why so many of the "hacked" Windows Phone 7 apps show loading additional ringtones or accessing the camera directly?

Well I've had a little look at what some of the hackers have been doing and have found a few managed assemblies that aren't publicly available and it seems to be these that most of the people exploring in this area have been looking at.

So, for your amusement, interest and to satisfy your curiosity, here, in no particular order are some of those methods:
public abstract class Camera : IDisposable
{
  // ...
}
 
public sealed class PhotoCamera : Camera
{
  // ...
}
 
public sealed class VideoCamera : Camera
{
  // ...
}
 
public sealed class RingtoneLibrary
{
  // ...
  public void AddRingtone(Stream ringtoneSource, string ringtoneName)
  {
    // ...
 
    StreamHelper helper = new StreamHelper(ringtoneSource);
    try
    {
        NativeMethods.MediaApi_AddRingtoneFile(helper.GetTempFile(), ringtoneName);
    }
    finally
    {
        helper.Cleanup();
    }
 
    // ...
  }
 
  // ...
}
 
[DllImport("netcfmail3_7.dll")]
internal static extern byte GetMessageData(IntPtr pMessageNode, byte[] dataBuffer, int cbDataBuffer, byte[] idBuffer, int cbIdBuffer);
  
[DllImport("netcfmail3_7.dll")]
internal static extern int SendAsAttachment(string to, string subject, string messageClass, byte[] data, int cbData, string attachmentFileName);
 
[DllImport("netcfmail3_7.dll")]
internal static extern int SendInBody(string to, string subject, string messageClass, string body, int cchBody);
 
public CivicAddress ResolveAddress(GeoCoordinate coordinate)
{
  // ...
}
 
public static extern int HostGetAvailableFreeSpace(IntPtr pRuntimeHost, out long pAvailableSpace);
The things that jump out at me, apart from the camera access are the methods relating to emails!

My theory is that if there is managed functionality in the framework already (and its use doesn't pose a threat to the security of the users data or device) it's not unreasonable to assume that this could be made public in the future.

Just in case it bears repeating, this is all speculation and I have no special insight into what might be coming in future versions.

Analysts agree that a mix of emulators/simulators and real devices are necessary to optimize your mobile app testing - learn more in this white paper, brought to you in partnership with Sauce Labs.

Topics:

Published at DZone with permission of Matt Lacey, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}