Tuesday, December 21, 2010

Android Nexus 1 Flashing - assert failed: write_raw_image("/tmp/boot.img", "boot") - solved

NOTE: I've since noticed that WiFi doesn't work with the method outlined below, however it does work with "fastboot boot boot.img" so further investigation is required. Some other users are saying that reflashing the hboot helps, but there are drawbacks to that as well.... Still if you are having this error and want to try gingerbread asap then the solution below is good:

It is a fun error isn't it, thousands of Nexus 1 users are happily flashing the latest ROMs onto their devices with no issues and when you try it you get something a little like this:

Installing update...
assert failed: write_raw_image("/tmp/boot.img", "boot")
E:Error in /sdcard/update.zip
(Status 7)
Installation aborted.


Same here, however there is light at the end of the tunnel. The problem is a lack of space to flash the new boot image, the cause could be one of two things:

1) You have some corrupted memory in the boot space, shrinking the size of the available boot partition and not allowing larger boot images to reside there.
2) This is a guess and I'd be interested in feedback: The Nexus 1 I use for custom ROMs is from the very very first Google seeding back in late 2009. I wonder if these devices had slightly smaller boot partitions.

Either way, there is a solution! The boot partition and the recovery partition are physically very similar, so after flashing the latest Gingerbread ROM (Gingerbread-Rooted-Gapps-v.06-signed.zip in this case, from the awesome XDA forums), I do this:

1) Extract boot.img from the ROMs zip file
2) Connect my N1 to my PC via USB
3) Boot the N1 into Fastboot by holding down the trackball when turning it on.
4) Flash the boot.img into the recovery partition:
"fastboot flash recovery boot.img" (fastboot is in the platform-tools directory of the SDK these days)

Now when I boot my Nexus 1 I hold down the trackball to get to Fastboot and then choose recovery mode, et voila Gingerbread launches.

If you need to get back to a real recovery mode you can either boot into Fastboot then boot a recovery image from your PC e.g. "fastboot boot recovery-RA-nexus-v2.0.0-CM.img"
Or reflash a recovery image, do your thing and then reflash the boot image.

I found this trick out at XDA Forums (where else?), here http://forum.xda-developers.com/showthread.php?t=731657

9 comments:

Unknown said...

You really geek me up there ;)

Anonymous said...

Greetings,

This is a message for the webmaster/admin here at geekyouup.blogspot.com.

May I use part of the information from your post above if I give a link back to your site?

Thanks,
Mark

Unknown said...

Hey Mark, sure, go for it.

Anonymous said...

Greetings,

Thanks for sharing the link - but unfortunately it seems to be down? Does anybody here at geekyouup.blogspot.com have a mirror or another source?


Cheers,
Harry

Unknown said...

Hi, which link are you referring to? the xda forums link seems to work fine.

Anonymous said...

Hello there,

I have a inquiry for the webmaster/admin here at geekyouup.blogspot.com.

Can I use part of the information from this blog post right above if I provide a link back to your site?

Thanks,
Jules

Anonymous said...

Hey - I am really glad to discover this. cool job!

Anonymous said...

Lots of excellent reading here, thanks! I had been researching on yahoo when I discovered your submit, I’m going to add your feed to Google Reader, I look forward to a lot more from you.

Anonymous said...

Man .. Excellent .. Wonderful .. I will bookmark your website and take the feeds additionallyI'm glad to seek out so many helpful info right here within the submit, we want develop extra strategies in this regard, thank you for sharing. . . . . .