Hi all, I download the android-2.1_r2 tag from git://android.git.kernel.org/ and make the generic product. After all build done, I run the following command to launch emulator. $ ./out/host/linux-x86/bin/emulator -system out/target/product/generic/ system.img -kernel prebuilt/android-arm/kernel/kernel-qemu
Emulator boot well and camera application start fine with stub camera. But when I change preview to camcode mode(use the slide button on screen), an error message shows. "The application Camera (process com.android.camera) has stopped unexpectedly. Please try again." Below is the message from logcat, -------------------------------------------------------------------- # I/ActivityManager( 55): Starting activity: Intent { act=android.media.action.VIDEO_CAMERA flg=0x6000000 cmp=com.android.camera/.VideoCamera } V/camera ( 275): stopPreview D/CameraService( 31): stopPreview (pid 275) D/CameraService( 31): stopPreview(), hardware stopped OK D/CameraService( 31): stopPreview (pid 275) D/CameraService( 31): stopPreview(), hardware stopped OK D/LocationManager( 275): removeUpdates: listener = com.android.camera.camera$locationliste...@43bdb328 D/LocationManager( 275): removeUpdates: listener = com.android.camera.camera$locationliste...@43bdb428 V/videocamera( 275): startPreview D/CameraService( 31): Client::connect E (pid 275, client 0xdec8) D/CameraService( 31): Connect to the same client D/CameraService( 31): setParameters(preview-size=176x144;preview- format=yuv422sp;picture-size=213x350;picture-format=jpeg;preview-frame- rate=15) D/CameraHardwareStub( 31): initHeapLocked: preview size=176x144 D/CameraService( 31): lock from pid 275 (mClientPid 275) D/CameraService( 31): getParameters(picture-format=jpeg;picture- size=213x350;preview-format=yuv422sp;preview-frame-rate=15;preview- size=176x144) D/CameraService( 31): setParameters(preview-size=352x288;preview- format=yuv422sp;picture-size=213x350;picture-format=jpeg;preview-frame- rate=20) D/CameraHardwareStub( 31): initHeapLocked: preview size=352x288 D/Camera ( 275): app passed NULL surface D/CameraService( 31): setPreviewDisplay(0x0) (pid 275) D/CameraService( 31): clearing old preview surface 0xec98 D/CameraService( 31): startPreview (pid 275) D/CameraService( 31): startCameraMode(0) (pid 275) D/CameraService( 31): mSurface is not set yet. D/CameraService( 31): startPreviewMode (pid 275) D/CameraService( 31): setPreviewDisplay(0xeaf0) (pid 275) D/CameraService( 31): unlock from pid 275 (mClientPid 275) D/CameraService( 31): clear mCameraClient (pid 275) I/ActivityManager( 55): Displayed activity com.android.camera/.VideoCamera: 913 ms (total 913 ms) V/videocamera( 275): initializeRecorder E/audio_input( 31): unsupported parameter: x-pvmf/media-input-node/ cap-config-interface;valtype=key_specific_value E/audio_input( 31): VerifyAndSetParameter failed D/CameraService( 31): Client::connect E (pid 31, client 0x11ca4) D/CameraService( 31): Connect to the new client (pid 31, client 0x11ca4) E/CameraInput( 31): Unsupported parameter(x-pvmf/media-input-node/ cap-config-interface;valtype=key_specific_value) E/CameraInput( 31): VerifiyAndSetParameter failed on parameter #0 D/AuthorDriver( 31): setParamVideoEncodingBitrate() 360000 W/AuthorDriver( 31): Use default video fps range [5 20] W/AuthorDriver( 31): Use default video width range [176 352] W/AuthorDriver( 31): Use default video height range [144 288] W/AuthorDriver( 31): Use default video bps range [192000 420000] I/MediaRecorderJNI( 275): prepare: surface=0x2e35f0 (id=4) D/CameraService( 31): setPreviewDisplay(0x194b0) (pid 31) E/PVOMXEncNode( 31): PVMFOMXEncNode-Video_H263::DoPrepare(): Cannot get component OMX.PV.h263enc handle, try another component if available E/PVOMXEncNode( 31): PVMFOMXEncNode-Audio_AMRNB::DoPrepare(): Got Component OMX.PV.amrencnb handle D/CameraService( 31): setPreviewDisplay(0x194b0) (pid 31) D/CameraInput( 31): Intended mFrameWidth=352, mFrameHeight=288 D/CameraService( 31): getParameters(picture-format=jpeg;picture- size=213x350;preview-format=yuv422sp;preview-frame-rate=20;preview- size=352x288) D/CameraService( 31): setParameters(picture-format=jpeg;picture- size=213x350;preview-format=yuv422sp;preview-frame-rate=20;preview- size=352x288) D/CameraHardwareStub( 31): initHeapLocked: preview size=352x288 D/CameraService( 31): getParameters(picture-format=jpeg;picture- size=213x350;preview-format=yuv422sp;preview-frame-rate=20;preview- size=352x288) D/CameraInput( 31): Actual mFrameWidth=352, mFrameHeight=288 D/CameraService( 31): startPreview (pid 31) D/CameraService( 31): startCameraMode(0) (pid 31) D/CameraService( 31): startPreviewMode (pid 31) E/AuthorDriver( 31): Command 13 completed with error -17 E/MediaRecorder( 275): prepare failed: -17 E/videocamera( 275): prepare failed for null V/videocamera( 275): Releasing media recorder. E/CameraInput( 31): Unsupported parameter(x-pvmf/media-input-node/ cap-config-interface;valtype=key_specific_value) E/CameraInput( 31): VerifiyAndSetParameter failed on parameter #0 E/audio_input( 31): unsupported parameter: x-pvmf/media-input-node/ cap-config-interface;valtype=key_specific_value E/audio_input( 31): VerifyAndSetParameter failed D/CameraService( 31): unlock from pid 31 (mClientPid 31) D/CameraService( 31): clear mCameraClient (pid 31) D/CameraService( 31): Client::disconnect() E (pid 31 client 0x0) D/CameraService( 31): camera is unlocked (mClientPid = 0), don't tear down hardware D/AndroidRuntime( 275): Shutting down VM W/dalvikvm( 275): threadid=3: thread exiting with uncaught exception (group=0x4001b188) E/AndroidRuntime( 275): Uncaught handler: thread main exiting due to uncaught exception E/AndroidRuntime( 275): java.lang.RuntimeException: java.io.IOException: prepare failed. E/AndroidRuntime( 275): at com.android.camera.VideoCamera.initializeRecorder(VideoCamera.java: 935) E/AndroidRuntime( 275): at com.android.camera.VideoCamera.access $200(VideoCamera.java:84) E/AndroidRuntime( 275): at com.android.camera.VideoCamera $MainHandler.handleMessage(VideoCamera.java:182) E/AndroidRuntime( 275): at android.os.Handler.dispatchMessage(Handler.java:99) E/AndroidRuntime( 275): at android.os.Looper.loop(Looper.java:123) E/AndroidRuntime( 275): at android.app.ActivityThread.main(ActivityThread.java:4363) E/AndroidRuntime( 275): at java.lang.reflect.Method.invokeNative(Native Method) E/AndroidRuntime( 275): at java.lang.reflect.Method.invoke(Method.java:521) E/AndroidRuntime( 275): at com.android.internal.os.ZygoteInit $MethodAndArgsCaller.run(ZygoteInit.java:860) E/AndroidRuntime( 275): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618) E/AndroidRuntime( 275): at dalvik.system.NativeStart.main(Native Method) E/AndroidRuntime( 275): Caused by: java.io.IOException: prepare failed. E/AndroidRuntime( 275): at android.media.MediaRecorder._prepare(Native Method) E/AndroidRuntime( 275): at android.media.MediaRecorder.prepare(MediaRecorder.java:467) E/AndroidRuntime( 275): at com.android.camera.VideoCamera.initializeRecorder(VideoCamera.java: 931) E/AndroidRuntime( 275): ... 10 more I/Process ( 55): Sending signal. PID: 275 SIG: 3 I/dalvikvm( 275): threadid=7: reacting to signal 3 E/dalvikvm( 275): Unable to open stack trace file '/data/anr/ traces.txt': Permission denied E/ActivityThread( 55): Failed to find provider info for android.server.checkin E/Checkin ( 55): Error reporting crash: java.lang.IllegalArgumentException: Unknown URL content://android.server.checkin/crashes W/ActivityManager( 55): Launch timeout has expired, giving up wake lock! W/ActivityManager( 55): Activity idle timeout for HistoryRecord{43d24c78 com.android.camera/.VideoCamera} -------------------------------------------------------------------- What make below error?? E/AuthorDriver( 31): Command 13 completed with error -17 E/MediaRecorder( 275): prepare failed: -17 E/videocamera( 275): prepare failed for null Thanks for any helps!! -- unsubscribe: android-porting+unsubscr...@googlegroups.com website: http://groups.google.com/group/android-porting