Emulator blank screen with Android 4.0.3

2,502 views
Skip to first unread message

Vik

unread,
Mar 29, 2012, 6:12:45 PM3/29/12
to Android Building
Hi All,

I have the following:
-Android 4.0.3 source
-Goldfish 2.6.29 kernel
-Latest android SDK

I was able to successfully build the kernel and get the zImage file in
arch/arm/boot/
and I was also able to build the android source by doing:
source build/envsetup.sh
lunch full-eng
make

After this I have system.img, userdata.img and ramdisk.img in out/
target/product/generic/

Now the problem I am facing is that my emulator will just give a blank
black screen when I run it with my kernel and *img files. Similar to:
http://groups.google.com/group/android-building/browse_thread/thread/7e8c3dce9bf0dc66/c80cdbe0a583138b
Following the inputs in this thread did not help.

a. I tried creating an avd and copied the kernel and *img to the $SDK/
system-images/android-15/armeabi-v7a/ and then run the emulator ->
blank screen.
b. Run emulator by using the options -kernel, -sysdir , -data etc. ->
blank screen.

One more thing I noticed is that my userdata.img is much smaller in
size compared to the one given in the SDK by default.
Am I missing something? Any help would be really appreciated.

Thanks,
V

Jean-Baptiste Queru

unread,
Mar 30, 2012, 11:33:16 AM3/30/12
to android-...@googlegroups.com
Does the emulator work without your modified kernel? (i.e., on an
unmodifed source tree: source build/envsetup.sh, lunch full-eng, make,
emulator)

The emulator built from source is known to not work on MacOS 10.7/XCode 4.

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.

Vik

unread,
Apr 1, 2012, 5:26:43 PM4/1/12
to Android Building
Thank you ! That works but now I see that I am unable to read the
generated traces. I get 'Cant read ELF header' errors
when I run tracedmdump on the generated traces :(
Any ideas what is the reason behind this ?

Regards,
Vik

On Mar 30, 8:33 am, Jean-Baptiste Queru <j...@android.com> wrote:
> Does the emulator work without your modified kernel? (i.e., on an
> unmodifed source tree: source build/envsetup.sh, lunch full-eng, make,
> emulator)
>
> The emulator built from source is known to not work on MacOS 10.7/XCode 4.
>
> JBQ
>
>
>
>
>
>
>
>
>
> On Thu, Mar 29, 2012 at 3:12 PM, Vik <vikrams...@gmail.com> wrote:
> > Hi All,
>
> > I have the following:
> > -Android 4.0.3 source
> > -Goldfish 2.6.29 kernel
> > -Latest android SDK
>
> > I was able to successfully build the kernel and get the zImage file in
> > arch/arm/boot/
> > and I was also able to build the android source by doing:
> > source build/envsetup.sh
> > lunch full-eng
> > make
>
> > After this I have system.img, userdata.img and ramdisk.img in out/
> > target/product/generic/
>
> > Now the problem I am facing is that my emulator will just give a blank
> > black screen when I run it with my kernel and *img files. Similar to:
> >http://groups.google.com/group/android-building/browse_thread/thread/...

Vik

unread,
Mar 31, 2012, 2:40:26 PM3/31/12
to Android Building
Hi,

Yes, I tried that and it works. Thanks for your help :). It used the
kernel:
prebuilt/android-arm/kernel/kernel-qemu-armv7

My goal is to generate profiles and traces for certain applications
using the emulator. I was able to get the trace files, but when I try
to read it with tracedmdump I get the following:
post-processing traces...
Static basic blocks: 320699, Dynamic basic blocks: 2
Static instructions: 1879552, Dynamic instructions: 2
Elapsed seconds: 152.06, simulated instructions/sec: 0.0
generating dexlist output...
generating dmtrace data...
Cannot read ELF header from './out/target/product/generic/symbols'
:
:
I see someone had this issue a month back:
http://groups.google.com/group/android-building/browse_thread/thread/d5d94c368486a933
but went unanswered.
Any clues on this front?

Regards,
V

On Mar 30, 8:33 am, Jean-Baptiste Queru <j...@android.com> wrote:
> Does the emulator work without your modified kernel? (i.e., on an
> unmodifed source tree: source build/envsetup.sh, lunch full-eng, make,
> emulator)
>
> The emulator built from source is known to not work on MacOS 10.7/XCode 4.
>
> JBQ
>
>
>
>
>
>
>
>
>
> On Thu, Mar 29, 2012 at 3:12 PM, Vik <vikrams...@gmail.com> wrote:
> > Hi All,
>
> > I have the following:
> > -Android 4.0.3 source
> > -Goldfish 2.6.29 kernel
> > -Latest android SDK
>
> > I was able to successfully build the kernel and get the zImage file in
> > arch/arm/boot/
> > and I was also able to build the android source by doing:
> > source build/envsetup.sh
> > lunch full-eng
> > make
>
> > After this I have system.img, userdata.img and ramdisk.img in out/
> > target/product/generic/
>
> > Now the problem I am facing is that my emulator will just give a blank
> > black screen when I run it with my kernel and *img files. Similar to:
> >http://groups.google.com/group/android-building/browse_thread/thread/...

Vik

unread,
Apr 3, 2012, 6:00:54 PM4/3/12
to Android Building
Hi JBQ,

Is there any solution to run my kernel built from source in Ubuntu
10.04 ?
Problem is that, the traces dumped by prebuilt kernel do not seem to
be correct
because for each 'event', the 'path' is just "",
instead of the actual file name such as "/init" or "/system/<FILE>"
etc.
So I might have to hack into the (hacked) kernel to check this out.

I am using Ubuntu 10.04 64 bit. I already switched 2 operating systems
to get till here :).
Is there any environment (except MAC OS) where it is known to work
correctly for Android ice cream sandwich?

Thanks,
V

On Mar 31, 11:40 am, Vik <vikrams...@gmail.com> wrote:
> Hi,
>
> Yes, I tried that and it works. Thanks for your help :). It used the
> kernel:
> prebuilt/android-arm/kernel/kernel-qemu-armv7
>
> My goal is to generate profiles and traces for certain applications
> using the emulator. I was able to get the trace files, but when I try
> to read it with tracedmdump I get the following:
> post-processing traces...
> Static basic blocks: 320699, Dynamic basic blocks: 2
> Static instructions: 1879552, Dynamic instructions: 2
> Elapsed seconds: 152.06, simulated instructions/sec: 0.0
> generating dexlist output...
> generating dmtrace data...
> Cannot read ELF header from './out/target/product/generic/symbols'
> :
> :
> I see someone had this issue a month back:http://groups.google.com/group/android-building/browse_thread/thread/...

Jean-Baptiste Queru

unread,
Apr 3, 2012, 6:04:45 PM4/3/12
to android-...@googlegroups.com
64-bit 10.04 is definitely the preferred environment.

The key here, for which I don't have an answer as I have no expertise
in that domain, is about building an emulator kernel.

If you figure it out, feel free to use the opportunity to contribute
to the documentation page about building kernels.

JBQ

Vik

unread,
Apr 18, 2012, 12:12:14 AM4/18/12
to Android Building
I know its been a couple weeks since this last post, but
for future reference, I am posting the solution.

Turns out the issue was with the kernel config.
I had done a make goldfish_defconfig!
But my android source is built for armv7-a. Once i built the kernel
after make goldfish_armv7_defoconfig it was able to boot with the
emulator-arm binary.

Thanks for your help!

Thanks,
Vikram
> >> using the emulator. I was able to get thetracefiles, but when I try

Ryan Xu

unread,
Apr 18, 2012, 8:56:07 AM4/18/12
to Android Building
Hi Vik,

I encountered the same problem. When I load the default emulator img,
no problem. But when I use command $emulator -kernel /route/to/my/own/
kernel/, the screen of emulator keeps black. Did you finally solve the
problem? Really appreciate your help!

Ryan

On Mar 30, 12:12 am, Vik <vikrams...@gmail.com> wrote:
> Hi All,
>
> I have the following:
> -Android 4.0.3 source
> -Goldfish 2.6.29 kernel
> -Latest android SDK
>
> I was able to successfully build the kernel and get the zImage file in
> arch/arm/boot/
> and I was also able to build the android source by doing:
> source build/envsetup.sh
> lunch full-eng
> make
>
> After this I have system.img, userdata.img and ramdisk.img in out/
> target/product/generic/
>
> Now the problem I am facing is that my emulator will just give a blank
> black screen when I run it with my kernel and *img files. Similar to:http://groups.google.com/group/android-building/browse_thread/thread/...

tera tellence

unread,
Apr 26, 2012, 3:53:44 AM4/26/12
to android-...@googlegroups.com
Hi Vik, Ryan

I have the same problem. I had downloaded the msm-kernel.

I had compiled it with just a "make" and used a kernel config by doing an "adb pull /proc/config.gz" from my another android emulator sources.
I guess this must be the issue. Do you have any idea how to compile this kernel?

thanks

Jean-Baptiste Queru

unread,
Apr 26, 2012, 9:58:46 AM4/26/12
to android-...@googlegroups.com
I'm pretty sure that you want kernel/goldfish when building for the
emulator, not kernel/msm.

JBQ

tera tellence

unread,
Apr 26, 2012, 11:07:33 AM4/26/12
to android-...@googlegroups.com
Yeah that was dumb.

I got it working.

I had to just do the make goldfish_defconfig :)

No more blank screens!

Vik

unread,
Apr 27, 2012, 3:23:20 PM4/27/12
to Android Building
My problem was that I was using goldfish_defconfig instead of
goldfish_armv7_defconfig (my build was for armv7-a).
Hope you have the kernel config right. Also, try running with
'emulator-arm' instead of 'emulator' (Assuming you are building for
ARM and your host is linux, these are in
out/host/linux-x86/bin/ ).

-V

rahul...@inoxapps.com

unread,
Nov 13, 2013, 2:09:09 AM11/13/13
to android-...@googlegroups.com

hi

My emulator faced the same problem and using the emulator command did not work for me.Moreover when using the kernel-qemu-armv7 that said bad no cpu definition was found,so shifted to x86/kernel-qemu and it runs but with the black screen.So that means that kernel is right but the some boot time stuff is not working well and i checked in the --verbose mode but no errors seem to occur,Please help me out
Reply all
Reply to author
Forward
0 new messages