Fixing “installation aborted status 7” on Android

I recently wanted to upgrade the recovery and rom of my Samsung Galaxy Mini (S5570), when I ran into a problem:
Any ROM I tried to install, failed the installation reporting codes and “installation aborted status 7”.

I thought this was something to do with the updater-script, this is the script used by any rom or package to properly install itself, I thought about this because the installation failed as soon as I ran it..

In my case, my updater-script contains the following, in the firsts lines of the file:

ui_print("@Checking Device ID");
ui_print(" ");
ui_print(" ");

assert(getprop("ro.product.device") == "tass" || getprop("") == "tass" || 
       getprop("ro.product.device") == "GT-S5570" || getprop("") == "GT-S5570");

ui_print("SAMSUNG GALAXY MINI S5570");


And I thought to delete them! and skip the check.

When I deleted it, I used the adb sideload function to push the rom into the device and it installed smoothly!