7

Whenever I try to flash a ROM on my ASUS Transformer Prime (tf201), I get the following error:

assert failed: getprop("ro.product.device") == "tf201" || getprop("ro.build.product") == "tf201"

I've got around it by opening the ZIP file of the ROM, navigating to /META-INF/com/google/android/updater-script and just removing this check. The ROM installs fine then.

But still I'm left with the question: why isn't my device recognized as a tf201, while it obviously is? Is it because I formatted the system partition in a format frenzy?

  • I had the same thing on a Vodacom branded Galaxy Tab4 10.1, I believe they either did it by mistake when changing another model's ROM and forgetting to update the device id, or intentionally to make the flashing or custom ROM installation a bit harder. – David d C e Freitas Mar 2 at 19:20
  • I had the same problem, because my device was unrooted after a factory reset and TWRP didn't have permission to read /system/build.prop. – user173283 Jul 27 at 23:24
4

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
3

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.

  • 5
    Beware: While removing that check in this specific context is fine, you shouldn't do that light-hearted; the check is there for a good reason. If you do so, you must be absolutely sure the ROM is compatible with your device. If it's not, you might get into serious trouble and even (soft-) brick your device. // @Vineeth: Not a critique, your answer is perfectly fine in the context. I would include that warning nevertheless for those "quick-readers" ;) – Izzy Feb 8 '14 at 18:29
  • 2
    Also, to complement @Izzy's comment, you should not be just updating the updater-script and re-packing it back into the archive, because that zip file is signed upon generation of the initial update.zip. And because of the change in the zip file as result, the SHA256 checksums will not match, will spell disaster. The SHA256 checksum is reported and contained within the zip file itself, if recovery was to check it will flag up, possibly throwing up an error message or refusing to process it. – t0mm13b Mar 4 '14 at 19:36
  • For me, updating the recovery to the latest version solved this issue. I think this should be the first course of action before modifying the setup script. – Arthur.V Oct 5 '18 at 11:40
  • This solved the problem for me, I DEFINITELY had a 'matisselte' (TAB4 10.1 SM-T535) device, but I think the network operator (Vodacom) who branded it made a mistake and set the variable to be matissewifi which it definitely was not. I made the first line of the /META-INF/com/google/android/updater-script file to match my model, and I installed the correct ROM (matisselte), and it worked. – David d C e Freitas Mar 2 at 19:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.