[SOLVED] assert failed

sammyz

Well-known member
Dec 15, 2011
825
190
0
You get this error or something similar:
Code:
assert failed: getprop("ro.product.device") == "thunderc" || getprop("ro.build.product") == "thunderc"

You do this with 7-Zip/WinRAR

Note: DO NOT EXTRACT ROM!
In the ROM go to:

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

1)Open updater-script with a script editor such as notepad/notepad++ (makes things 10x easier), or gedit if you use linux

2)Delete the first line of code (all the way up to the first semicolon you see) and delete the first semi-colon as well

Do not go past the first semiclon when deleteing and DO NOT forget to delete the first semicolon.

Cheers!

Now please stop posting this problem on everyone's ICS ROMs.....
Someone make this a sticky please :cool:
 
Last edited:
I don't understand. Why not just flash another recovery rather than waiting? xD


Sent from my LG-VM670 using Tapatalk 2
 
I don't understand. Why not just flash another recovery rather than waiting? xD


Sent from my LG-VM670 using Tapatalk 2

Waiting for what??? This is faster, takes less time, and you don't have to find a working recovery with these messed up assert scripts......BobZhome deletes them when he remembers to anyways...I delete them on all my ports....it's better for the dev to just delete them than to have 20 pages of assert fails...so I made this thread.
 
I mean waiting for it to be compatible.

But this helps me. I don't understand a thing about update scripts. :p

Sent from my LG-VM670 using Tapatalk 2
 
I mean waiting for it to be compatible.

But this helps me. I don't understand a thing about update scripts. :p

Sent from my LG-VM670 using Tapatalk 2

These ROMs are all compatible......it's just a stupid line in the updater script that I think is completely unnecessary.....
 
All it does is check to make sure you are flashing the rom on the correct device...

Sent from my Optimus M

That's certainly one of the things you can do with asserts but not the only thing it does.

Assert evaluates a condition (in this case a command, getprop). If the condition returns true (or returns an expected value) the script carries on. If the condition returns false (or returns an unexpected value) it throws an error.

For example, I can check to see if the file "/system/etc/dooderbutt" exists (and subsequently create it if it doesn't) like so:
Code:
assert(file_exists("/system/etc/dooderbutt") || create("/system/etc/dooderbutt"))
If the above assert command is unable to create the file for some reason, the script should throw an error because it was an unexpected result.
 
Last edited:
any way that I do this from the phone? For some reason my phone won't show up as usb storage on my laptop. It doesn't even charge when plugged in.. Now my girls phone (we both have ov's) works fine and both are rooted, with custom roms installed. Mine charges fine when using a wall charger but I can't get usb store or debugging to come on when connecting it to a pc.. Anyway, can I edit his file with an app since I can't transfer it back and forth?
 
any way that I do this from the phone? For some reason my phone won't show up as usb storage on my laptop. It doesn't even charge when plugged in.. Now my girls phone (we both have ov's) works fine and both are rooted, with custom roms installed. Mine charges fine when using a wall charger but I can't get usb store or debugging to come on when connecting it to a pc.. Anyway, can I edit his file with an app since I can't transfer it back and forth?

This wouldn't effect USB problems.....

Sent from VM670 on MetroPCS
 
That's certainly one of the things you can do with asserts but not the only thing it does.

Assert evaluates a condition (in this case a command, getprop). If the condition returns true (or returns an expected value) the script carries on. If the condition returns false (or returns an unexpected value) it throws an error.

For example, I can check to see if the file "/system/etc/dooderbutt" exists (and subsequently create it if it doesn't) like so:
Code:
assert(file_exists("/system/etc/dooderbutt") || create("/system/etc/dooderbutt"))
If the above assert command is unable to create the file for some reason, the script should throw an error because it was an unexpected result.

I only meant the first assert line, not all of them ;)

Sent from VM670 on MetroPCS
 
I extracted the file, made the edit, re-zipped it, and moved it to my SD card. Now I don't get the error, but all it does is go:

Installing update...
Installation aborted.

Doesn't even think about it, just goes right to the error. This is with signature verification and script assertion disabled; either of those on produces their respective invalid errors.
 
Note: You should NOT unzip the entire package. Use 7Zip or Winrar to extract ONLY the file you need, edit it, and replace it. If you unzip the whole thing, it will corrupt.
 
Note: You should NOT unzip the entire package. Use 7Zip or Winrar to extract ONLY the file you need, edit it, and replace it. If you unzip the whole thing, it will corrupt.

Forgot to add that...OP updated.

Sent from my Optimus S running VM670ZV5 on MetroPCS.
 
Should also add that try flashing in the recovery first before editing any file. CWM-Blue-Recovery does not need the file edited, as the build.prop was fixed over three months ago.
 
Should also add that try flashing in the recovery first before editing any file. CWM-Blue-Recovery does not need the file edited, as the build.prop was fixed over three months ago.

Same with CWM-Green :p
I don't think people want to flash another recovery when the deal of this is just removing one line in a script ;)

I am not going to add that for the sake that it would endorse one's recovery over another when both can flash ICS fine.

The main point of this thread was so people wouldn't have to flash another recovery, the other point was so that there wouldn't be over 200 posts of people complaining over a Status 7 assert failed error.

Sent from my Optimus S running VM670ZV5 on MetroPCS.
 
This method worked for flashing Paranoid Android 4.1.2 Jelly Bean v1.8 ROM onto a Samsung Galaxy Tab 10.1 3G tablet, online this is known as the P7500 model, and the ROMs are usually named "p4". The assert failure message says it cant ID the device as a p4 device so it quits.

I tried updating my CWM to the latest and this also failed. Only removing the line from the update script as described above worked.

Thanks for the fix!
 
Thank you so much, I flash camera 4.2 on my nexus s and it brick my phone, try to flash strawberry 4.1.2 but failed..i follow your direction of deleting script to the the last semi colon.....works fine....thank again...
 
You get this error or something similar:
Code:
assert failed: getprop("ro.product.device") == "thunderc" || getprop("ro.build.product") == "thunderc"

You do this with 7-Zip/WinRAR

Note: DO NOT EXTRACT ROM!
In the ROM go to:

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

1)Open updater-script with a script editor such as notepad/notepad++ (makes things 10x easier), or gedit if you use linux

2)Delete the first line of code (all the way up to the first semicolon you see) and delete the first semi-colon as well

Do not go past the first semiclon when deleteing and DO NOT forget to delete the first semicolon.

Cheers!

Now please stop posting this problem on everyone's ICS ROMs.....
Someone make this a sticky please :cool:

Hi I'm trying to find the updater-script inside my "cm-10-20121215-NIGHTLY-i9300", there isn't one.
I'd appreciate some assistance with this as I'm trying to get out of stock 4.1.1 since it keeps giving me a bootloop after applying an update.zip from my titanium back up of all my apps+data.
 

Forum statistics

Threads
955,078
Messages
6,963,692
Members
3,163,190
Latest member
Darryl Haley