When you flash Android ROMs via Clockwork Mod (CWM), sometimes an error comes up, especially when trying to move from one custom ROM to another custom ROM or may be updates of the same ROM (unless it’s stock).

For instance, I have Sony Xperia S (LT26i) also known as nozomi (the codename used by developers). I flashed CM9. Due to some issues I had to reflash CM9, so I erased out everything (/system, /data, /cache) and when I try to flash the zip I downloaded I get an error similar to this:

Basically, there is no information /default.prop which specifies that the device on which I’m trying to flash the ROM is nozomi or LT26i. Earlier I used to flash the stock ROM to solve the issue, but later I came across some post on XDA Forums (don’t have the link) which said that you’ve to edit a script in the zip file and remove the check/assert.

The process is very simple. Just unzip the contents of the zip file you downloaded (for your device, not any other!) into a folder, go to the META-INF/com/google/android folder and open updater-script in a text editor. Remove the first line or first two lines whatever is appropriate and then zip the folder again; be sure to preserve the directory structure. The META-INF and any other folders must be in the root of the zip file.

The script modification technique works for me. Read the below notes before attempting it –

  • I’m not responsible for any damages if you edit the script and flash a ROM which does not belong to your device!
  • I’m also not responsible for any damage to your device if you flash a ROM / do anything 😛

This can be also fixed by executing this on adb shell –

setprop ro.product.device LT26i