Android - When flashing a custom ROM, why do I get an error on getprop("ro.product.device")?

This could be caused by a variety of reasons, the primary reason being an incompatible recovery, where the appropriate variables aren't correctly set. Try using another recovery (example: TWRP) , and see if you're getting this error.

A temporary solution for this would be:

You could just open up the zip file, extract the

META-INF/com/google/android/updater-script

file, and remove the getprop lines, which look like:

getprop(xyz) == "xyzyxz");

lines from it. These lines are usually in the beginning of the updater-script file.

As you say that the ROM is "for" your device, this should cause no problems.

Then, just drag-drop back the updater-script file, back into the zip. Now, flashing wouldn't be causing any problems.

Note that:

Use programs like 7-zip, or WinRAR, while extracting the updater-script file. Use the Notepad++ text-editor, or alternatives like Geany, which support the Linux EOL formats.


Please make sure that your build.prop in the /SYSTEM folder is configured correctly and has the variable ro.product.device set, often time in custom ROMs the build.prop is not configured completely and some of these variables are necessary for certain functionality checks. You can open it up in a text editor and look for it and make sure it is set and there are no bad characters in there that might affect it being parsed properly.

Also check these variables and make sure they are set as well, it is good to have them:

  • ro.product.model=XXX
  • ro.product.brand=XXX
  • ro.product.name=XXX
  • ro.product.device=XXX
  • ro.product.board=XXX
  • ro.product.manufacturer=XXX