views:

58

answers:

1

Hey everyone,

I've been modifying/editing parts of the Android platform, but have run into a problem when trying to test my edits. After making my changes to the platform source, I was able to successfully compile the source - thus creating system.img, ramdisk.img, and userdata.img.

When I go to test this in the emulator, the emulator just hangs on the "ANDROID_" screen, with the underscore blinking, but never seems to load. Any suggestions?

The command I used to run the emulator is as follows:

./emulator -system $HOME/android/platform/out/target/product/generic/system.img -ramdisk $HOME/android/platform/out/target/product/generic/ramdisk.img -data $HOME/android/platform/out/target/product/generic/userdata.img

Thanks,
Chris

+1  A: 

Hi, The first startup can take a while, especially on a slow machine but otherwise try running the adb logcat command to see the log output. That will help you determine what the problem could be.

Also if you like to skip supplying all the options to the emulator, i.e. -system and the other you can use the scripts supplied in the build folder. Run these commands from the open source project root folder:

source build/envsetup.sh
setpaths

The first one will run the envsetup script for Android that supplies a number of helpful commands. The second one sets up all the paths needed for Android platform development. Among them are the ANDROID_PRODUCT_OUT variable that informs the emulator where to look for the build images. It is set to the default folders that you have specified above. After running setpaths you can just start the emulator with your build by typing emulator on the command line.

BMB
Thanks for the tips. I tried running the adb logcat command, which did show me much more. It appears that the emulator is stuck in some sort of infinite boot loop.The loop starts with AndroidRuntime START <<<<<<<<<<<<<<And each iteration ends with I/ServiceManager( 25): service 'media.audio_flinger' diedI/ServiceManager( 25): service 'media.player' diedI/ServiceManager( 25): service 'media.camera' diedI/ServiceManager( 25): service 'media.audio_policy' died
Chrisc
Hmm, it could be that one of the critical services fails to start and because of that init will then try to restart the entire Android runtime. Depending on what machine you run on we have experienced some issues with audio in the emulator in which case the -noaudio option might help. Also, have you tried to do a build and just run the project "as is" without your changes. It is always good to know that the default system runs before trying out platform modifications.
BMB
Thanks BMB, it turned out that an error was occurring somewhere in my code. With further adjustments to my stuff, Android booted up successfully.
Chrisc