Flashing a custom build

196 views
Skip to first unread message

Anil Gorthy

unread,
Apr 24, 2012, 1:45:20 PM4/24/12
to android-...@googlegroups.com
In trying to flash my Galaxy Nexus w/ custom code/image, I bricked the device and now it displays the Google text and unlock icon. Any key combinations doesn't get the device to reboot or start in recovery mode. Neither my Linux box nor the PC would recognize the device so, I can't execute the 'adb reboot bootloader' command.

What steps can I take to unbrick the device? I downloaded the Nexus Factory image for 4.0.2 (ICL53F) but since the device isn't recognized, I can't execute any steps.

Also, what are the correct sequence of steps when flashing a device? If I remember correctly, this is the sequence of commands I executed on my Ubuntu 11.10 64-bit to flash the device:

$ fastboot flash recovery recovery.img
$ fastboot flash boot boot.img 
$ fastboot flash userdata userdata.img
$ fastboot flash system system.img

Thanks in advance!

Jean-Baptiste Queru

unread,
Apr 24, 2012, 2:03:02 PM4/24/12
to android-...@googlegroups.com
I think your device is fine.

Turn it off (pull the battery if necessary), and keep both volume-up
and volume-down pressed while booting (yes, it's possible). That'll
get you straight into fastboot mode, and from there you should be able
to flash a factory image, then a custom build.

JBQ

> --
> You received this message because you are subscribed to the "Android
> Building" mailing list.
> To post to this group, send email to android-...@googlegroups.com
> To unsubscribe from this group, send email to
> android-buildi...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-building?hl=en

--
Jean-Baptiste M. "JBQ" Queru
Software Engineer, Android Open-Source Project, Google.

Questions sent directly to me that have no reason for being private
will likely get ignored or forwarded to a public forum with no further
warning.

Anil Gorthy

unread,
Apr 24, 2012, 2:08:42 PM4/24/12
to android-...@googlegroups.com
Thanks, JBQ. I was able to follow the steps you mentioned and could get the device to fastboot mode and could ensure that 'fastboot devices' command recognizes the device.

However, before I flash the device, would you please confirm the sequence?

$ fastboot flash recovery recovery.img
$ fastboot flash boot boot.img
$ fastboot flash userdata userdata.img
$ fastboot flash system system.img 

I am not sure which of the above *.img are necessary everytime I flash the device.

> To post to this group, send email to android-building@googlegroups.com


> To unsubscribe from this group, send email to


> For more options, visit this group at
> http://groups.google.com/group/android-building?hl=en

Jean-Baptiste Queru

unread,
Apr 24, 2012, 2:12:18 PM4/24/12
to android-...@googlegroups.com
Most probably, changes you do affect system.img. The other ones take a
negligible time to flash, in comparison, so I suggest you flash them
all.

The exact sequence doesn't matter, you can flash them in any order.
You can add "fastboot erase cache" for extra cleanliness.

Personally, when working on custom builds from source, I use "fastboot
flashall", or "fastboot -w flashall" when I want to wipe all data.

JBQ

>> > To post to this group, send email to android-...@googlegroups.com


>> > To unsubscribe from this group, send email to

>> > android-buildi...@googlegroups.com


>> > For more options, visit this group at
>> > http://groups.google.com/group/android-building?hl=en
>>
>> --
>> Jean-Baptiste M. "JBQ" Queru
>> Software Engineer, Android Open-Source Project, Google.
>>
>> Questions sent directly to me that have no reason for being private
>> will likely get ignored or forwarded to a public forum with no further
>> warning.
>

> --
> You received this message because you are subscribed to the "Android
> Building" mailing list.

> To post to this group, send email to android-...@googlegroups.com


> To unsubscribe from this group, send email to

> android-buildi...@googlegroups.com

Anil Gorthy

unread,
Apr 24, 2012, 2:28:36 PM4/24/12
to android-...@googlegroups.com
Got it, thanks! I was able to flash the device and after restarting, the phone is stuck at the Google text and unlock icon which initially led me to believe that the phone is bricked. How can I get past that screen?

>> > To post to this group, send email to android-building@googlegroups.com


>> > To unsubscribe from this group, send email to

>> > android-building+unsubscribe@googlegroups.com


>> > For more options, visit this group at
>> > http://groups.google.com/group/android-building?hl=en
>>
>> --
>> Jean-Baptiste M. "JBQ" Queru
>> Software Engineer, Android Open-Source Project, Google.
>>
>> Questions sent directly to me that have no reason for being private
>> will likely get ignored or forwarded to a public forum with no further
>> warning.
>
> --
> You received this message because you are subscribed to the "Android
> Building" mailing list.

> To post to this group, send email to android-building@googlegroups.com


> To unsubscribe from this group, send email to

> android-building+unsubscribe@googlegroups.com


> For more options, visit this group at
> http://groups.google.com/group/android-building?hl=en

Jean-Baptiste Queru

unread,
Apr 24, 2012, 2:40:31 PM4/24/12
to android-...@googlegroups.com
That's odd. Are you able to make and flash your own builds? It'd be
interesting to know if it responds to adb at that point, but that
can't be done on a retail build since adb is disabled by default (for
obvious security reasons).

JBQ

>> >> > android-...@googlegroups.com


>> >> > To unsubscribe from this group, send email to

>> >> > android-buildi...@googlegroups.com


>> >> > For more options, visit this group at
>> >> > http://groups.google.com/group/android-building?hl=en
>> >>
>> >> --
>> >> Jean-Baptiste M. "JBQ" Queru
>> >> Software Engineer, Android Open-Source Project, Google.
>> >>
>> >> Questions sent directly to me that have no reason for being private
>> >> will likely get ignored or forwarded to a public forum with no further
>> >> warning.
>> >
>> > --
>> > You received this message because you are subscribed to the "Android
>> > Building" mailing list.

>> > To post to this group, send email to android-...@googlegroups.com


>> > To unsubscribe from this group, send email to

>> > android-buildi...@googlegroups.com


>> > For more options, visit this group at
>> > http://groups.google.com/group/android-building?hl=en
>>
>> --
>> Jean-Baptiste M. "JBQ" Queru
>> Software Engineer, Android Open-Source Project, Google.
>>
>> Questions sent directly to me that have no reason for being private
>> will likely get ignored or forwarded to a public forum with no further
>> warning.
>
> --
> You received this message because you are subscribed to the "Android
> Building" mailing list.

> To post to this group, send email to android-...@googlegroups.com


> To unsubscribe from this group, send email to

> android-buildi...@googlegroups.com

Anil Gorthy

unread,
Apr 24, 2012, 2:48:56 PM4/24/12
to android-...@googlegroups.com
Yes, I used the userdata.img and system.img from /out/target/product/generic_x86 and recovery.img and boot.img from Nexus Factory image. 'adb devices' doesn't return anything when the Google text/unlock icon is shown. Pulling out the battery and restarting doesn't get past that screen either.


>> >> > To unsubscribe from this group, send email to


>> >> > For more options, visit this group at
>> >> > http://groups.google.com/group/android-building?hl=en
>> >>
>> >> --
>> >> Jean-Baptiste M. "JBQ" Queru
>> >> Software Engineer, Android Open-Source Project, Google.
>> >>
>> >> Questions sent directly to me that have no reason for being private
>> >> will likely get ignored or forwarded to a public forum with no further
>> >> warning.
>> >
>> > --
>> > You received this message because you are subscribed to the "Android
>> > Building" mailing list.

>> > To post to this group, send email to android-building@googlegroups.com


>> > To unsubscribe from this group, send email to


>> > For more options, visit this group at
>> > http://groups.google.com/group/android-building?hl=en
>>
>> --
>> Jean-Baptiste M. "JBQ" Queru
>> Software Engineer, Android Open-Source Project, Google.
>>
>> Questions sent directly to me that have no reason for being private
>> will likely get ignored or forwarded to a public forum with no further
>> warning.
>
> --
> You received this message because you are subscribed to the "Android
> Building" mailing list.

> To post to this group, send email to android-building@googlegroups.com


> To unsubscribe from this group, send email to


> For more options, visit this group at
> http://groups.google.com/group/android-building?hl=en

Jean-Baptiste Queru

unread,
Apr 24, 2012, 3:03:29 PM4/24/12
to android-...@googlegroups.com
Oh, that's not gonna work. generic_x86 is the build for the Intel
emulator, it won't work on any real device (and especially not one
built on an ARM CPU).

You'll find all the detailed information on this page:
http://source.android.com/source/building-devices.html and that'll
show you which build config to use, how to get to the bootloader,
where to download the proprietary binaries
https://developers.google.com/android/nexus/drivers and everything
else you should need.

JBQ

>> >> >> > android-...@googlegroups.com


>> >> >> > To unsubscribe from this group, send email to

>> >> >> > android-buildi...@googlegroups.com


>> >> >> > For more options, visit this group at
>> >> >> > http://groups.google.com/group/android-building?hl=en
>> >> >>
>> >> >> --
>> >> >> Jean-Baptiste M. "JBQ" Queru
>> >> >> Software Engineer, Android Open-Source Project, Google.
>> >> >>
>> >> >> Questions sent directly to me that have no reason for being private
>> >> >> will likely get ignored or forwarded to a public forum with no
>> >> >> further
>> >> >> warning.
>> >> >
>> >> > --
>> >> > You received this message because you are subscribed to the "Android
>> >> > Building" mailing list.
>> >> > To post to this group, send email to

>> >> > android-...@googlegroups.com


>> >> > To unsubscribe from this group, send email to

>> >> > android-buildi...@googlegroups.com


>> >> > For more options, visit this group at
>> >> > http://groups.google.com/group/android-building?hl=en
>> >>
>> >> --
>> >> Jean-Baptiste M. "JBQ" Queru
>> >> Software Engineer, Android Open-Source Project, Google.
>> >>
>> >> Questions sent directly to me that have no reason for being private
>> >> will likely get ignored or forwarded to a public forum with no further
>> >> warning.
>> >
>> > --
>> > You received this message because you are subscribed to the "Android
>> > Building" mailing list.

>> > To post to this group, send email to android-...@googlegroups.com


>> > To unsubscribe from this group, send email to

>> > android-buildi...@googlegroups.com


>> > For more options, visit this group at
>> > http://groups.google.com/group/android-building?hl=en
>>
>> --
>> Jean-Baptiste M. "JBQ" Queru
>> Software Engineer, Android Open-Source Project, Google.
>>
>> Questions sent directly to me that have no reason for being private
>> will likely get ignored or forwarded to a public forum with no further
>> warning.
>
> --
> You received this message because you are subscribed to the "Android
> Building" mailing list.

> To post to this group, send email to android-...@googlegroups.com


> To unsubscribe from this group, send email to

> android-buildi...@googlegroups.com

Anil Gorthy

unread,
Apr 24, 2012, 3:16:06 PM4/24/12
to android-...@googlegroups.com
Hmm...I don't see any *.img files in /generic folder which means that the build was not successful.

I'll build again and then try to flash the device.

Also, I couldn't find the ICL53F 4.0.2 binaries in the drivers page?


>> >> >> > To unsubscribe from this group, send email to


>> >> >> > For more options, visit this group at
>> >> >> > http://groups.google.com/group/android-building?hl=en
>> >> >>
>> >> >> --
>> >> >> Jean-Baptiste M. "JBQ" Queru
>> >> >> Software Engineer, Android Open-Source Project, Google.
>> >> >>
>> >> >> Questions sent directly to me that have no reason for being private
>> >> >> will likely get ignored or forwarded to a public forum with no
>> >> >> further
>> >> >> warning.
>> >> >
>> >> > --
>> >> > You received this message because you are subscribed to the "Android
>> >> > Building" mailing list.
>> >> > To post to this group, send email to


>> >> > To unsubscribe from this group, send email to


>> >> > For more options, visit this group at
>> >> > http://groups.google.com/group/android-building?hl=en
>> >>
>> >> --
>> >> Jean-Baptiste M. "JBQ" Queru
>> >> Software Engineer, Android Open-Source Project, Google.
>> >>
>> >> Questions sent directly to me that have no reason for being private
>> >> will likely get ignored or forwarded to a public forum with no further
>> >> warning.
>> >
>> > --
>> > You received this message because you are subscribed to the "Android
>> > Building" mailing list.

>> > To post to this group, send email to android-building@googlegroups.com


>> > To unsubscribe from this group, send email to


>> > For more options, visit this group at
>> > http://groups.google.com/group/android-building?hl=en
>>
>> --
>> Jean-Baptiste M. "JBQ" Queru
>> Software Engineer, Android Open-Source Project, Google.
>>
>> Questions sent directly to me that have no reason for being private
>> will likely get ignored or forwarded to a public forum with no further
>> warning.
>
> --
> You received this message because you are subscribed to the "Android
> Building" mailing list.

> To post to this group, send email to android-building@googlegroups.com


> To unsubscribe from this group, send email to


> For more options, visit this group at
> http://groups.google.com/group/android-building?hl=en

Jean-Baptiste Queru

unread,
Apr 24, 2012, 3:21:03 PM4/24/12
to android-...@googlegroups.com
The images are in out/target/product/maguro

Indeed, there are no 4.0.2 binaries, because 4.0.3 was already
available (and preparing and testing the binaries takes a lot of
effort).

JBQ

>> >> >> >> > android-...@googlegroups.com


>> >> >> >> > To unsubscribe from this group, send email to

>> >> >> >> > android-buildi...@googlegroups.com


>> >> >> >> > For more options, visit this group at
>> >> >> >> > http://groups.google.com/group/android-building?hl=en
>> >> >> >>
>> >> >> >> --
>> >> >> >> Jean-Baptiste M. "JBQ" Queru
>> >> >> >> Software Engineer, Android Open-Source Project, Google.
>> >> >> >>
>> >> >> >> Questions sent directly to me that have no reason for being
>> >> >> >> private
>> >> >> >> will likely get ignored or forwarded to a public forum with no
>> >> >> >> further
>> >> >> >> warning.
>> >> >> >
>> >> >> > --
>> >> >> > You received this message because you are subscribed to the
>> >> >> > "Android
>> >> >> > Building" mailing list.
>> >> >> > To post to this group, send email to

>> >> >> > android-...@googlegroups.com


>> >> >> > To unsubscribe from this group, send email to

>> >> >> > android-buildi...@googlegroups.com


>> >> >> > For more options, visit this group at
>> >> >> > http://groups.google.com/group/android-building?hl=en
>> >> >>
>> >> >> --
>> >> >> Jean-Baptiste M. "JBQ" Queru
>> >> >> Software Engineer, Android Open-Source Project, Google.
>> >> >>
>> >> >> Questions sent directly to me that have no reason for being private
>> >> >> will likely get ignored or forwarded to a public forum with no
>> >> >> further
>> >> >> warning.
>> >> >
>> >> > --
>> >> > You received this message because you are subscribed to the "Android
>> >> > Building" mailing list.
>> >> > To post to this group, send email to

>> >> > android-...@googlegroups.com


>> >> > To unsubscribe from this group, send email to

>> >> > android-buildi...@googlegroups.com


>> >> > For more options, visit this group at
>> >> > http://groups.google.com/group/android-building?hl=en
>> >>
>> >> --
>> >> Jean-Baptiste M. "JBQ" Queru
>> >> Software Engineer, Android Open-Source Project, Google.
>> >>
>> >> Questions sent directly to me that have no reason for being private
>> >> will likely get ignored or forwarded to a public forum with no further
>> >> warning.
>> >
>> > --
>> > You received this message because you are subscribed to the "Android
>> > Building" mailing list.

>> > To post to this group, send email to android-...@googlegroups.com


>> > To unsubscribe from this group, send email to

>> > android-buildi...@googlegroups.com


>> > For more options, visit this group at
>> > http://groups.google.com/group/android-building?hl=en
>>
>> --
>> Jean-Baptiste M. "JBQ" Queru
>> Software Engineer, Android Open-Source Project, Google.
>>
>> Questions sent directly to me that have no reason for being private
>> will likely get ignored or forwarded to a public forum with no further
>> warning.
>
> --
> You received this message because you are subscribed to the "Android
> Building" mailing list.

> To post to this group, send email to android-...@googlegroups.com


> To unsubscribe from this group, send email to

> android-buildi...@googlegroups.com

JF Dionne

unread,
Apr 24, 2012, 3:41:17 PM4/24/12
to android-...@googlegroups.com
Hi


It happened to me when I built a custom kernel.that wasn't for the source I had (i.e. a kernel for 4.0.1 that was put inside a 4.0.3 image). So make sure your boot.img (containing your kernel) is for the same target as your system.img 

Also did you extract the google driver's for galaxy nexus?

It could also happen if you added a driver to your source that is NOT  coming from aosp nor the google's driver nexus page.


Hope it helps

Anil Gorthy

unread,
Apr 29, 2012, 10:19:31 PM4/29/12
to android-...@googlegroups.com
Thanks much, JBQ. I just flashed the maguro device successfully!

Is it possible to flash the device with changes made to a single package (say, Gallery.apk)? I understand from Magnus (Baeck) that you can build a single APK but I'd like to know if I can flash the device w/ one APK change or as the command states, 'flashall', the only option?


>> >> >> >> > To unsubscribe from this group, send email to


>> >> >> >> > For more options, visit this group at
>> >> >> >> > http://groups.google.com/group/android-building?hl=en
>> >> >> >>
>> >> >> >> --
>> >> >> >> Jean-Baptiste M. "JBQ" Queru
>> >> >> >> Software Engineer, Android Open-Source Project, Google.
>> >> >> >>
>> >> >> >> Questions sent directly to me that have no reason for being
>> >> >> >> private
>> >> >> >> will likely get ignored or forwarded to a public forum with no
>> >> >> >> further
>> >> >> >> warning.
>> >> >> >
>> >> >> > --
>> >> >> > You received this message because you are subscribed to the
>> >> >> > "Android
>> >> >> > Building" mailing list.
>> >> >> > To post to this group, send email to


>> >> >> > To unsubscribe from this group, send email to


>> >> >> > For more options, visit this group at
>> >> >> > http://groups.google.com/group/android-building?hl=en
>> >> >>
>> >> >> --
>> >> >> Jean-Baptiste M. "JBQ" Queru
>> >> >> Software Engineer, Android Open-Source Project, Google.
>> >> >>
>> >> >> Questions sent directly to me that have no reason for being private
>> >> >> will likely get ignored or forwarded to a public forum with no
>> >> >> further
>> >> >> warning.
>> >> >
>> >> > --
>> >> > You received this message because you are subscribed to the "Android
>> >> > Building" mailing list.
>> >> > To post to this group, send email to


>> >> > To unsubscribe from this group, send email to


>> >> > For more options, visit this group at
>> >> > http://groups.google.com/group/android-building?hl=en
>> >>
>> >> --
>> >> Jean-Baptiste M. "JBQ" Queru
>> >> Software Engineer, Android Open-Source Project, Google.
>> >>
>> >> Questions sent directly to me that have no reason for being private
>> >> will likely get ignored or forwarded to a public forum with no further
>> >> warning.
>> >
>> > --
>> > You received this message because you are subscribed to the "Android
>> > Building" mailing list.

>> > To post to this group, send email to android-building@googlegroups.com


>> > To unsubscribe from this group, send email to


>> > For more options, visit this group at
>> > http://groups.google.com/group/android-building?hl=en
>>
>> --
>> Jean-Baptiste M. "JBQ" Queru
>> Software Engineer, Android Open-Source Project, Google.
>>
>> Questions sent directly to me that have no reason for being private
>> will likely get ignored or forwarded to a public forum with no further
>> warning.
>
> --
> You received this message because you are subscribed to the "Android
> Building" mailing list.

> To post to this group, send email to android-building@googlegroups.com


> To unsubscribe from this group, send email to


> For more options, visit this group at
> http://groups.google.com/group/android-building?hl=en

Jean-Francois Blanchard-Dionne

unread,
Apr 30, 2012, 11:07:30 AM4/30/12
to android-...@googlegroups.com

You can flash the system only. Don't have to flash everything.

Unless you make changes to stuff that might be kept in userdata.img, then you'll need to flash both images (or erase userdata)

JF

Jean-Baptiste Queru

unread,
Apr 30, 2012, 11:43:41 AM4/30/12
to android-...@googlegroups.com
Working at the partition level, you have to flash at least a whole
partition. You can use "fastboot flash system" to just flash that one,
though the difference isn't large as the other 2 partitions take very
little time to flash.

It's possible to work at the file level via adb. I don't remember the
exact details as I don't routinely do it, but at a high level this
boils down to:

adb stop # this stops the Android runtime, but keeps the kernel
running along with the basic system, including adb
adb sync # this updates the files on the device that have been rebuilt
on your machine
adb start # this restarts the Android runtime

I'll let other people chime in on the best way to build a single file
in a way that matches what adb sync expects.

JBQ
>> >> >> >> >> > android-...@googlegroups.com
>> >> >> >> >> > To unsubscribe from this group, send email to
>> >> >> >> >> > android-buildi...@googlegroups.com
>> >> >> >> >> > For more options, visit this group at
>> >> >> >> >> > http://groups.google.com/group/android-building?hl=en
>> >> >> >> >>
>> >> >> >> >> --
>> >> >> >> >> Jean-Baptiste M. "JBQ" Queru
>> >> >> >> >> Software Engineer, Android Open-Source Project, Google.
>> >> >> >> >>
>> >> >> >> >> Questions sent directly to me that have no reason for being
>> >> >> >> >> private
>> >> >> >> >> will likely get ignored or forwarded to a public forum with no
>> >> >> >> >> further
>> >> >> >> >> warning.
>> >> >> >> >
>> >> >> >> > --
>> >> >> >> > You received this message because you are subscribed to the
>> >> >> >> > "Android
>> >> >> >> > Building" mailing list.
>> >> >> >> > To post to this group, send email to
>> >> >> >> > android-...@googlegroups.com
>> >> >> >> > To unsubscribe from this group, send email to
>> >> >> >> > android-buildi...@googlegroups.com
>> >> >> >> > For more options, visit this group at
>> >> >> >> > http://groups.google.com/group/android-building?hl=en
>> >> >> >>
>> >> >> >> --
>> >> >> >> Jean-Baptiste M. "JBQ" Queru
>> >> >> >> Software Engineer, Android Open-Source Project, Google.
>> >> >> >>
>> >> >> >> Questions sent directly to me that have no reason for being
>> >> >> >> private
>> >> >> >> will likely get ignored or forwarded to a public forum with no
>> >> >> >> further
>> >> >> >> warning.
>> >> >> >
>> >> >> > --
>> >> >> > You received this message because you are subscribed to the
>> >> >> > "Android
>> >> >> > Building" mailing list.
>> >> >> > To post to this group, send email to
>> >> >> > android-...@googlegroups.com
>> >> >> > To unsubscribe from this group, send email to
>> >> >> > android-buildi...@googlegroups.com
>> >> >> > For more options, visit this group at
>> >> >> > http://groups.google.com/group/android-building?hl=en
>> >> >>
>> >> >> --
>> >> >> Jean-Baptiste M. "JBQ" Queru
>> >> >> Software Engineer, Android Open-Source Project, Google.
>> >> >>
>> >> >> Questions sent directly to me that have no reason for being private
>> >> >> will likely get ignored or forwarded to a public forum with no
>> >> >> further
>> >> >> warning.
>> >> >
>> >> > --
>> >> > You received this message because you are subscribed to the "Android
>> >> > Building" mailing list.
>> >> > To post to this group, send email to
>> >> > android-...@googlegroups.com
>> >> > To unsubscribe from this group, send email to
>> >> > android-buildi...@googlegroups.com
>> >> > For more options, visit this group at
>> >> > http://groups.google.com/group/android-building?hl=en
>> >>
>> >> --
>> >> Jean-Baptiste M. "JBQ" Queru
>> >> Software Engineer, Android Open-Source Project, Google.
>> >>
>> >> Questions sent directly to me that have no reason for being private
>> >> will likely get ignored or forwarded to a public forum with no further
>> >> warning.
>> >
>> > --
>> > You received this message because you are subscribed to the "Android
>> > Building" mailing list.
>> > To post to this group, send email to android-...@googlegroups.com
>> > To unsubscribe from this group, send email to
>> > android-buildi...@googlegroups.com
>> > For more options, visit this group at
>> > http://groups.google.com/group/android-building?hl=en
>>
>> --
>> Jean-Baptiste M. "JBQ" Queru
>> Software Engineer, Android Open-Source Project, Google.
>>
>> Questions sent directly to me that have no reason for being private
>> will likely get ignored or forwarded to a public forum with no further
>> warning.
>
> --
> You received this message because you are subscribed to the "Android
> Building" mailing list.
> To post to this group, send email to android-...@googlegroups.com
> To unsubscribe from this group, send email to
> android-buildi...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages