[SOLVED] assert failed

sammyz

Well-known member
Dec 15, 2011
825
190
0
Visit site
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:

sammyz

Well-known member
Dec 15, 2011
825
190
0
Visit site
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.
 

ThatGuyLurkin

Well-known member
Jun 4, 2012
2,155
665
0
Visit site
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
 

sammyz

Well-known member
Dec 15, 2011
825
190
0
Visit site
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.....
 

drewwalton19216801

Well-known member
Dec 27, 2010
2,476
2,803
0
Visit site
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:

gyanos422

Member
Mar 6, 2011
11
0
0
Visit site
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?
 

sammyz

Well-known member
Dec 15, 2011
825
190
0
Visit site
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
 

sammyz

Well-known member
Dec 15, 2011
825
190
0
Visit site
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
 

DailyRich

Member
Aug 10, 2012
6
0
0
Visit site
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.
 

koeylondon

Well-known member
Aug 21, 2012
226
2
0
Visit site
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.
 

sammyz

Well-known member
Dec 15, 2011
825
190
0
Visit site
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.
 

EarthnFire78

YAY!!! ME :)
Jan 1, 2012
964
232
0
Visit site
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.
 

sammyz

Well-known member
Dec 15, 2011
825
190
0
Visit site
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.
 

Catfish81

New member
Nov 26, 2012
1
0
0
Visit site
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!
 

Tony Usi

New member
Dec 4, 2012
2
0
0
Visit site
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...
 

Stvpagn

New member
Dec 16, 2012
4
0
0
Visit site
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.
 

Trending Posts

Forum statistics

Threads
943,011
Messages
6,916,883
Members
3,158,774
Latest member
Xd3dp1gX