andreasgal / B2G

Boot to Gecko aims to create a complete, standalone operating system for the open web.
https://wiki.mozilla.org/B2G
909 stars 158 forks source link

Emulator can't start with E/AndroidRuntime( 33): JNI_CreateJavaVM failed #259

Closed johnstone closed 12 years ago

johnstone commented 12 years ago

There is another error i met after i rebuild the b2g code when i executed the emulator, it can't get into the b2g screen seems like keep waiting

and I watch the logcat

D/AndroidRuntime( 33): D/AndroidRuntime( 33): >>>>>> AndroidRuntime START com.android.internal.os.ZygoteInit <<<<<< D/AndroidRuntime( 33): CheckJNI is ON E/AndroidRuntime( 33): JNI_CreateJavaVM failed I/Netd ( 57): Netd 1.0 starting I/ ( 56): ServiceManager: 0xad50 D/AudioHardwareInterface( 56): setMode(NORMAL) I/CameraService( 56): CameraService started (pid=56) I/AudioFlinger( 56): AudioFlinger's thread 0xc658 ready to run D/AndroidRuntime( 67): D/AndroidRuntime( 67): >>>>>> AndroidRuntime START com.android.internal.os.ZygoteInit <<<<<< D/AndroidRuntime( 67): CheckJNI is ON E/AndroidRuntime( 67): JNI_CreateJavaVM failed I/ServiceManager( 28): service 'media.audio_flinger' died I/ServiceManager( 28): service 'media.audio_policy' died I/ServiceManager( 28): service 'media.player' died I/ServiceManager( 28): service 'media.camera' died I/Netd ( 69): Netd 1.0 starting I/ ( 68): ServiceManager: 0xad50 D/AudioHardwareInterface( 68): setMode(NORMAL) I/CameraService( 68): CameraService started (pid=68) I/AudioFlinger( 68): AudioFlinger's thread 0xc658 ready to run

it just in the infinite loop

shianyow commented 12 years ago

I didn't encounter such issue on latest build. There shouldn't be Android as well as JVM related messages in the log.

What is your procedure to build it? Maybe try to clean everything and rebuild again?

johnstone commented 12 years ago

I just find out that if the procedure is make sync; make gonk; make config-qemu; make gonk; make; then launch the emulator will get the problem as #258

and if make sync; make config-qemu; make gonk; make; then it will get the problem like this

Zepheus commented 12 years ago

This has to do with an incorrect init.rc file.

When doing 'make gonk' there's a check for qemu which performs a cp of init.gonk.rc to the gonk/out/root folder. Manually copying from gonk/system/rootdir/init.rc.gonk to init.rc in the out folder should make it run, but isn't the best workaround.