[Huawei Ascend P1] ricardooliveiralobo:
Hello!

I tried to get some advice from the "Ask any question" thread but until now, no good solution to my problem.

I have the Huawei Ascend P1 with the stock firmware Gl-B229 (4.0.3) and I tried to use some alternative ROM, either CM 10.1 or 10.2.

I always get the same error when I try to use the camera "Can't connect to camera". I found out that even if I use the stock firmware updates CH-B704 (4.1.1) or even a previous version I have the same error.

I have a logcat of this issue using the CM 10.2 (with the other versions the logcat is similar)

logcat CM 10.2

E/audio_hw_primary( 179): start_output_stream(mode:0)
E/audio_hw_primary( 179): start_output_stream(mode:0)
E/CameraService( 179): CameraService::connect X (pid 22596) rejected (invalid cameraId 0).
E/CameraHolder(22596): fail to connect Camera
E/CameraHolder(22596): java.lang.RuntimeException: Fail to connect to camera service
E/CameraHolder(22596):	at android.hardware.Camera.native_setup(Native Method)
E/CameraHolder(22596):	at android.hardware.Camera.<init>(Camera.java:366)
E/CameraHolder(22596):	at android.hardware.Camera.open(Camera.java:322)
E/CameraHolder(22596):	at com.android.camera.CameraManager.cameraOpen(CameraManager.java:297)
E/CameraHolder(22596):	at com.android.camera.CameraHolder.open(CameraHolder.java:210)
E/CameraHolder(22596):	at com.android.camera.Util.openCamera(Util.java:434)
E/CameraHolder(22596):	at com.android.camera.PhotoModule$CameraStartUpThread.run(PhotoModule.java:301)
E/AndroidRuntime(23884): FATAL EXCEPTION: Timer-0
E/AndroidRuntime(23884): java.lang.NullPointerException
E/AndroidRuntime(23884):	at net.cactii.flash2.FlashDevice.setFlashMode(FlashDevice.java:141)
E/AndroidRuntime(23884):	at net.cactii.flash2.TorchService$2.run(TorchService.java:59)
E/AndroidRuntime(23884):	at java.util.Timer$TimerImpl.run(Timer.java:284)
E/AndroidRuntime(23907): FATAL EXCEPTION: main

logcat CH-B704 (4.1.1 - Stock firmware from Huawei)

E/CameraHal( 2700): (41e87bf0) hardware/ti/omap4xxx/camera/OMXCameraAdapter/OMXCameraAdapter.cpp:4908 processEvent - Error event received, data1 = 0x80001009, data2 = 0x 0
E/CameraHal( 2700): (41e7bf88) hardware/ti/omap4xxx/camera/OMXCameraAdapter/OMXCameraAdapter.cpp:4691 switchToState - Switching to state 0x1 has failed
E/CameraHal( 2700): (41e7bf88) hardware/ti/omap4xxx/camera/OMXCameraAdapter/OMXCameraAdapter.cpp:4727 fetchCapabiltiesForMode - Failed to switch to Loaded state, error: -2147483648
E/CameraHal( 2700): (41e7bf88) hardware/ti/omap4xxx/camera/BaseCameraAdapter.cpp:2686 CameraAdapter_Capabilities - supportedCameras= 0
E/CameraHal( 2700): (41e7bf88) hardware/ti/omap4xxx/camera/CameraProperties.cpp:111 loadProperties - camera busy. properties not loaded. num_cameras = 0
E/CameraHal( 2700): (41e7bf88) hardware/ti/omap4xxx/camera/CameraHal_Module.cpp:750 camera_get_number_of_cameras - Unable to create or initialize CameraProperties
E/CameraHolder( 2580): fail to connect Camera
E/CameraHolder( 2580): java.lang.RuntimeException: Fail to connect to camera service
E/CameraHolder( 2580):	at android.hardware.Camera.native_setup(Native Method)
E/CameraHolder( 2580):	at android.hardware.Camera.<init>(Camera.java:317)
E/CameraHolder( 2580):	at android.hardware.Camera.open(Camera.java:279)
E/CameraHolder( 2580):	at com.android.hwcamera.CameraHolder.open(CameraHolder.java:142)
E/CameraHolder( 2580):	at com.android.hwcamera.Util.openCamera(Util.java:594)
E/CameraHolder( 2580):	at com.android.hwcamera.Camera.openCameraDevice(Camera.java:3365)
E/CameraHolder( 2580):	at com.android.hwcamera.CameraAppImpl$OpenCameraHandler.handleMessage(CameraAppImpl.java:125)
E/CameraHolder( 2580):	at android.os.Handler.dispatchMessage(Handler.java:99)
E/CameraHolder( 2580):	at android.os.Looper.loop(Looper.java:137)
E/CameraHolder( 2580):	at android.os.HandlerThread.run(HandlerThread.java:60)
E/Camera ( 2580): camera hardware open failed!
E/CameraService( 2700): CameraService::connect X (pid 2580) rejected (invalid cameraId 0).
E/CameraService( 2700): connect detect 0 camera, so try to detect again

So far the only ROM that doens't have this problem is the one that came with the device, Gl-B229

I followed all the instructions given when installing the ROM's, either the CM based ones or the Stock ROM's, like it's explained on this thread:

http://xdaforums.com/showthread.php?t=2132043

I had no errors while installing the ROM's.

Well, at this point I almost lost all my hope of getting an updated version of Android working properly, so this is my last resort. If someone could help me, i'd be very grateful.

Thanks in advance.