Wednesday, August 29, 2012

Introducing the .ABEX File Format

As I have said in my last post, Droid Explorer will support the Android Backup (.ab) file format. But I also mentioned that Droid Explorer will extend the Android Backup file format so a backup can be tied to a specific device. This file format will be ABEX (Enhanced Android Backup). The file format is simple and just adds an additional header block to store the information.

	ENHANCED ANDROID BACKUP\n
[DEVICE ID]\n
[Droid Explorer Version]\n
[ABEX Version]\n
$$$ ENHANCED ANDROID BACKUP $$$\n

The first line is the Magic line. Next is the Device ID that the backup is tied to. This is value is a string. If the device is not connected, then an error message should be displayed notifying the user that the backup is tied to a specific device and that device could not be found. Next is the version of Droid Explorer (or the application that created the ABEX). This value is a string. Next is the Specification Version of ABEX (Current = 1). This value is an integer. The final line is an indicator showing the end of the ABEX header.


Following the ABEX Header should be the normal Android Backup content starting with the Android Backup Magic line.


I have a modified version of ABE that Droid Explorer will use to unpack these files and forked it on github.


Visually, these files will (at least for now) look just like a normal Android Backup. The difference will be the file extension and how Droid Explorer will handle them. If it is a “Basic” Android Backup, then the user will be prompted with a device selection when attempting to restore. Also, there will be an option to convert a “Basic” Android Backup to an “Enhanced” version. Also, Droid Explorer will allow the conversion of an “Enhanced” version to a “Basic” version.

Droid Explorer 0.8.8.7 Backup Feature

Droid Explorer 0.8.8.7 will be released in just a few days and will have some new features that you may find useful if you have a 4.x device.

The biggest feature is the ability to backup your device (does not require root). If you do not have a 4.x device connected, you will not be able to take advantage of this method of backup.

image

Along with that feature comes some additional features on top of it. A central location for your Android Backup files (*.ab). They will be stored in a folder in your user profile called “Android Backups”. This folder has a special folder applied to it so it is easy to tell where your backups are located.

image

Inside this folder there will be a folder for each device you use with Droid Explorer to create backups. The folder name is the “ID” of the device or the “Name” of the device if you changed it in the settings. Here you will see I have a couple backups in the folder Killik (the name I gave one of my devices).

image

But what can you do with these backups? Well, you can restore your device with them, of course. Just double click on one of the Android Backup (.ab) files and select the device you want to restore to. Make sure you restore to the correct device. I am not responsible for any disasters restoring may cause, including, but not limited to bricking your device, cat jumping of a cliff, house burning down. I may look in to extending the backups a bit, so Droid Explorer knows what device they came from, but that is not in this version.

If you right click on the Android Backup, you will also be given the option to restore the backup to a device. But, look closer at the picture below… There is also an option to unpack the backup file. This will turn the Android Backup in to a TAR Archive. Then you can get to the inner contents of the backup, like the Application Files if you choose to include those in your Backup.

image 

Another feature that will be added in the future is the ability to view backups from within Droid Explorer. If you have Droid Explorer v0.8.8.6, you will get a notification when you open Droid Explorer after the new version has been released. Keep your eye out for this version and future versions.

As always, if you have ideas for Droid Explorer, submit a Feature Request.

Saturday, March 3, 2012

Windows 7 and CIFS Out Of Memory Error

I have had a few users contact me about getting errors when mounting a share from Windows 7 with Mount Manager. This error was some type of “out of memory” error.

When you try to mount you see the following error:

mount error(12): Cannot allocate memory
Refer to the mount.cifs(8) manual page (e.g.man mount.cifs)

The error reports the following in Event Viewer:

Source: srv
Event ID: 2017
Level: Error
The server was unable to allocate from the system nonpaged pool because the server reached the configured limit for nonpaged pool allocations.

One user, after much research, found the solution. According to an article he found, you need to tell windows that it will be used as a file server and that it should allocate the memory that it needs to do so.

To do this, you have to set the following value in the registry to ‘1’.

HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\LargeSystemCache

Also you have to set the following value in the registry to ‘3’.

HKLM\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters\Size

Saturday, December 31, 2011

Html5 Unobtrusive Form Validation for ASP.NET MVC

I have a project that I was able to make use of modern browsers HTML5 form validation. But I wanted to include the validation that also takes place from within aspnet mvc so there is a unified experience with the validating the form. I took the jquery.unobtrusive-validation.js and made some modifications to it to hook in to the aspnet mvc validation. It is not yet 100%, the “Required” aspnet mvc validation doesn’t seem to “trigger” unless the field is filled out, then attempted to be submitted, and then cleared again, but the default html5 “required” validation message still shows initially. Either way, I figured I would share this and maybe someone could build on it and improve it. Enjoy.

Here are some screenshots of the results.

Failed Regex Validation
image 

Failed Minimum String Length Validation
image 

Failed Remote Password Strength Validation
image

Failed Compare to Password Field Validation
image


Download from Skydrive

Wednesday, December 21, 2011

Visual Studio Achievements app for iPhone

mzl.fkogmsgw.170x170-75A friend of mine liked the idea of the VSA app that I wrote for Android and decided to write an iOS version. It uses the exact same web API that the android version uses so it has the same features like the Leaderboard, viewing achievement details, user details, and marking users as a “favorite”. He also created the 9guy logo you see on the right for the iOS app.

The app will be available for free in iTunes once it passes the Apple approval process.

Now we just have to wait for the Channel9 Team to make the Visual Studio Achievements available to the public.

album[4]

Update: The app has been approved by apple and should appear in the app store any time now.

Update 2: You can now get the iOS version of Visual Studio Achievements in iTunes

Introducing the .ABEX File Format

As I have said in my last post, Droid Explorer will support the Android Backup (.ab) file format. But I also mentioned that Droid Explorer will extend the Android Backup file format so a backup can be tied to a specific device. This file format will be ABEX (Enhanced Android Backup). The file format is simple and just adds an additional header block to store the information.

	ENHANCED ANDROID BACKUP\n
[DEVICE ID]\n
[Droid Explorer Version]\n
[ABEX Version]\n
$$$ ENHANCED ANDROID BACKUP $$$\n

The first line is the Magic line. Next is the Device ID that the backup is tied to. This is value is a string. If the device is not connected, then an error message should be displayed notifying the user that the backup is tied to a specific device and that device could not be found. Next is the version of Droid Explorer (or the application that created the ABEX). This value is a string. Next is the Specification Version of ABEX (Current = 1). This value is an integer. The final line is an indicator showing the end of the ABEX header.


Following the ABEX Header should be the normal Android Backup content starting with the Android Backup Magic line.


I have a modified version of ABE that Droid Explorer will use to unpack these files and forked it on github.


Visually, these files will (at least for now) look just like a normal Android Backup. The difference will be the file extension and how Droid Explorer will handle them. If it is a “Basic” Android Backup, then the user will be prompted with a device selection when attempting to restore. Also, there will be an option to convert a “Basic” Android Backup to an “Enhanced” version. Also, Droid Explorer will allow the conversion of an “Enhanced” version to a “Basic” version.

Droid Explorer 0.8.8.7 Backup Feature

Droid Explorer 0.8.8.7 will be released in just a few days and will have some new features that you may find useful if you have a 4.x device.

The biggest feature is the ability to backup your device (does not require root). If you do not have a 4.x device connected, you will not be able to take advantage of this method of backup.

image

Along with that feature comes some additional features on top of it. A central location for your Android Backup files (*.ab). They will be stored in a folder in your user profile called “Android Backups”. This folder has a special folder applied to it so it is easy to tell where your backups are located.

image

Inside this folder there will be a folder for each device you use with Droid Explorer to create backups. The folder name is the “ID” of the device or the “Name” of the device if you changed it in the settings. Here you will see I have a couple backups in the folder Killik (the name I gave one of my devices).

image

But what can you do with these backups? Well, you can restore your device with them, of course. Just double click on one of the Android Backup (.ab) files and select the device you want to restore to. Make sure you restore to the correct device. I am not responsible for any disasters restoring may cause, including, but not limited to bricking your device, cat jumping of a cliff, house burning down. I may look in to extending the backups a bit, so Droid Explorer knows what device they came from, but that is not in this version.

If you right click on the Android Backup, you will also be given the option to restore the backup to a device. But, look closer at the picture below… There is also an option to unpack the backup file. This will turn the Android Backup in to a TAR Archive. Then you can get to the inner contents of the backup, like the Application Files if you choose to include those in your Backup.

image 

Another feature that will be added in the future is the ability to view backups from within Droid Explorer. If you have Droid Explorer v0.8.8.6, you will get a notification when you open Droid Explorer after the new version has been released. Keep your eye out for this version and future versions.

As always, if you have ideas for Droid Explorer, submit a Feature Request.

Windows 7 and CIFS Out Of Memory Error

I have had a few users contact me about getting errors when mounting a share from Windows 7 with Mount Manager. This error was some type of “out of memory” error.

When you try to mount you see the following error:

mount error(12): Cannot allocate memory
Refer to the mount.cifs(8) manual page (e.g.man mount.cifs)

The error reports the following in Event Viewer:

Source: srv
Event ID: 2017
Level: Error
The server was unable to allocate from the system nonpaged pool because the server reached the configured limit for nonpaged pool allocations.

One user, after much research, found the solution. According to an article he found, you need to tell windows that it will be used as a file server and that it should allocate the memory that it needs to do so.

To do this, you have to set the following value in the registry to ‘1’.

HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\LargeSystemCache

Also you have to set the following value in the registry to ‘3’.

HKLM\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters\Size

Html5 Unobtrusive Form Validation for ASP.NET MVC

I have a project that I was able to make use of modern browsers HTML5 form validation. But I wanted to include the validation that also takes place from within aspnet mvc so there is a unified experience with the validating the form. I took the jquery.unobtrusive-validation.js and made some modifications to it to hook in to the aspnet mvc validation. It is not yet 100%, the “Required” aspnet mvc validation doesn’t seem to “trigger” unless the field is filled out, then attempted to be submitted, and then cleared again, but the default html5 “required” validation message still shows initially. Either way, I figured I would share this and maybe someone could build on it and improve it. Enjoy.

Here are some screenshots of the results.

Failed Regex Validation
image 

Failed Minimum String Length Validation
image 

Failed Remote Password Strength Validation
image

Failed Compare to Password Field Validation
image


Download from Skydrive

Visual Studio Achievements app for iPhone

mzl.fkogmsgw.170x170-75A friend of mine liked the idea of the VSA app that I wrote for Android and decided to write an iOS version. It uses the exact same web API that the android version uses so it has the same features like the Leaderboard, viewing achievement details, user details, and marking users as a “favorite”. He also created the 9guy logo you see on the right for the iOS app.

The app will be available for free in iTunes once it passes the Apple approval process.

Now we just have to wait for the Channel9 Team to make the Visual Studio Achievements available to the public.

album[4]

Update: The app has been approved by apple and should appear in the app store any time now.

Update 2: You can now get the iOS version of Visual Studio Achievements in iTunes