# HP TouchPad Camera Fix for CM9 Official Nightly Builds Patch by Dorregaray!



## RolandDeschain79

The Ingenious Developer Dorregaray has fixed the Camera on the HP TouchPad running CyanogenMod9. With a Patch for the latest Nightly Build of CM9, you will be able to run the camera the way it was intended. Yes no more Blue Screens the Camera will work with the official Nightly builds! Just flash the zip file in CWM or TWRP to install this update over the latest Nightly Build.

The Video!





Download The Patch Here update-cm9-tenderloin-camera-preview15-for-official.zip!

Link 1:
http://goo.im/devs/D...or-official.zip

Link 2:
http://www.mediafire...ucggug93pym98c9

New* *Camera controls & rotation fix for official nightly since 20121209:*
*http://goo.im/devs/Dorregaray/cmtouchpad/update-cm9-20121209-camera-fix.zip*

Download Official Nightly Builds of CM9 for the HP TouchPad:
http://get.cm/?device=tenderloin

How to install the official nightly builds Camera patch .zip flie video:
[media]http://youtu.be/pwK8Q63fRG8

The RootzWiki ThreadRemember to Thank Dorregaray!)
http://rootzwiki.com...working-camera/

What is working:
- preview
- taking pictures
- video recording
- Skype

Changelog:
preview1
first release, taking pictures work, skype does not work, reboot required after closing the camera app to be able to take pictures again, blue screen

preview2
skype works, no reboot required after closing camera app, blue screen, regression stock camera app may not take pictures

preview3
fixed stock camera app in preview2

preview4
stock camera app controls fixed, broken skype

preview5
fixed skype in preview4

preview6
working video recording

preview7
added EXIF tag with date & time to the pictures
updated audio & video drivers, updated nfs kernel modules,
added touch pressure patch and magnetometer fix

preview8
rotation fixed in stock Camera app

preview9
recording resolution is 640x480 now

preview10
libcamera from source

preview11
no more 3:1 memory split, update for official nightly

preview12
no more blue screen

preview13
potential segfaults fixed

preview15
freeze & reboot issue fixed

3rd Party compatibility (alphabetical order):

Camera MX - rotated preview
Camera ZOOM MX - rotated preview
Cartoon Camera - rotated preview
Google Hangouts - working
ICS Camera - rotated preview (until first picture)
Line Camera - rotated preview
LOMO Camera - not working
Magic Hour Free - not working
Nemus Camera - rotated preview
Paper Camera - rotated preview
Pudding Camera - rotated preview
Skype - working
uCam Ultra Camera - video recording crashes


----------



## Colchiro

Ok, CM9's done, let's start on CM10...


----------



## Lothinator

uCam Ultra rotates the UI incorrectly although the preview is correct.

Also, trying to apply effects in the stock video camera always crashes...


----------



## Dorregaray

Lothinator said:


> Also, trying to apply effects in the stock video camera always crashes...


yes, the stock camera app wants to use 720x480 resolution when applying effects while our camera does not work with such resolution. this is also bug in the camera app but I can at least do something about it


----------



## craigsouthwick

I flashed this over cm-9-20121111-NIGHTLY-tenderloin.zip and I got the blue screen when rebooting. Haven't tested much but face unlock works and the system seems stable. Will probably flash this with 202021118 tonight.

Much respect and appreciation to Dorregaray. I bought the TP hoping it would be a good travel device. Games, movies, music, and Skype are the things I like to have available on the road. With everyone's work and with this development we are finally there.


----------



## Dorregaray

http://goo.im/devs/Dorregaray/update-cm9-tenderloin-camera-preview12-for-official.zip - the blue screen finally gone


----------



## jsffm

Works without bluescreen


----------



## RolandDeschain79

Dorregaray said:


> http://goo.im/devs/D...or-official.zip - the blue screen finally gone


Awesome work, thank you If you need anyone to test your CM10 Camera test2, I would be happy to volunteer.


----------



## Salvation27

Sign me up for CM10 camera test as well


----------



## Dorregaray

the problem with CM10 is that the proprietary lib (which works perfect on CM9) crashes during preview:


Code:


<br />
1-20 09:55:07.888   151  1765 F libc    : Fatal signal 11 (SIGSEGV) at 0x00008f28 (code=1), thread 1765 (Binder_1)<br />
11-20 09:55:07.988   147   147 I DEBUG   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***<br />
11-20 09:55:07.988   147   147 I DEBUG   : Build fingerprint: 'hp/hp_tenderloin/tenderloin:4.1.1/JR003C/228551:user/release-keys'<br />
11-20 09:55:07.988   147   147 I DEBUG   : pid: 151, tid: 1765, name: Binder_1  >>> /system/bin/mediaserver <<<<br />
11-20 09:55:07.988   147   147 I DEBUG   : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 00008f28<br />
11-20 09:55:08.018  1448  1448 D ContinousShot: status change to 0from 0<br />
11-20 09:55:08.058   147   147 I DEBUG   :	 r0 67787278  r1 67787dd8  r2 00008f28  r3 00000000<br />
11-20 09:55:08.058   147   147 I DEBUG   :	 r4 677841e4  r5 677490ec  r6 67786558  r7 00001230<br />
11-20 09:55:08.058   147   147 I DEBUG   :	 r8 2bbeff08  r9 00000000  sl 6770b255  fp 00100000<br />
11-20 09:55:08.058   147   147 I DEBUG   :	 ip 000002b0  sp 2c9f79f0  lr 6773033b  pc 6772d206  cpsr 00000030<br />
11-20 09:55:08.058   147   147 I DEBUG   :	 d0  01e0000002800000  d1  417e000000000000<br />
11-20 09:55:08.058   147   147 I DEBUG   :	 d2  01e0000001e00000  d3  417e000000000000<br />
11-20 09:55:08.058   147   147 I DEBUG   :	 d4  2c28000a01e00000  d5  84b90101170c7430<br />
11-20 09:55:08.058   147   147 I DEBUG   :	 d6  00095a00c283028c  d7  028000003f800000<br />
11-20 09:55:08.058   147   147 I DEBUG   :	 d8  0000000000000000  d9  0000000000000000<br />
11-20 09:55:08.058   147   147 I DEBUG   :	 d10 0000000000000000  d11 0000000000000000<br />
11-20 09:55:08.058   147   147 I DEBUG   :	 d12 0000000000000000  d13 0000000000000000<br />
11-20 09:55:08.058   147   147 I DEBUG   :	 d14 0000000000000000  d15 0000000000000000<br />
11-20 09:55:08.058   147   147 I DEBUG   :	 d16 417e000008000000  d17 3fe0000000000000<br />
11-20 09:55:08.058   147   147 I DEBUG   :	 d18 bfe0000000000000  d19 21081d771741700c<br />
11-20 09:55:08.058   147   147 I DEBUG   :	 d20 2405007162084108  d21 13c3789e1b84e0e0<br />
11-20 09:55:08.058   147   147 I DEBUG   :	 d22 0083a9514e82706e  d23 0780004000000000<br />
11-20 09:55:08.058   147   147 I DEBUG   :	 d24 0000000000000000  d25 0000000000000000<br />
11-20 09:55:08.058   147   147 I DEBUG   :	 d26 0000000000000000  d27 0000000000000000<br />
11-20 09:55:08.058   147   147 I DEBUG   :	 d28 0000000000000000  d29 0000000000000000<br />
11-20 09:55:08.058   147   147 I DEBUG   :	 d30 0000000000000000  d31 0000000000000000<br />
11-20 09:55:08.058   147   147 I DEBUG   :	 scr 60000010<br />
11-20 09:55:08.058   147   147 I DEBUG   :<br />
11-20 09:55:08.058   147   147 I DEBUG   : backtrace:<br />
11-20 09:55:08.058   147   147 I DEBUG   :	 #00  pc 0002d206  /system/lib/liboemcamera.so (vfe_cmd_sharpnessscale+33)<br />
11-20 09:55:08.058   147   147 I DEBUG   :	 #01  pc 00030337  /system/lib/liboemcamera.so (vfe_util_update_asf_5x5+30)<br />
11-20 09:55:08.058   147   147 I DEBUG   :	 #02  pc 000306d3  /system/lib/liboemcamera.so (vfe_util_sharpness_afilter+2)<br />
11-20 09:55:08.058   147   147 I DEBUG   :	 #03  pc 0002862b  /system/lib/liboemcamera.so (vfe_process_VFE_ID_SOF_ACK+62)<br />
11-20 09:55:08.058   147   147 I DEBUG   :	 #04  pc 00025703  /system/lib/liboemcamera.so (vfe_proc_vfe_msg+74)<br />
11-20 09:55:08.058   147   147 I DEBUG   :	 #05  pc 0000b609  /system/lib/liboemcamera.so (config_proc_vfe_event_message+12)<br />
11-20 09:55:08.058   147   147 I DEBUG   :	 #06  pc 0000b345  /system/lib/liboemcamera.so (cam_conf+240)<br />
11-20 09:55:08.058   147   147 I DEBUG   :	 #07  pc 000130f4  /system/lib/libc.so (__thread_entry+48)<br />
11-20 09:55:08.058   147   147 I DEBUG   :	 #08  pc 00012850  /system/lib/libc.so (pthread_create+180)<br />

I have found the same issue on different devices:
http://code.google.com/p/freexperia/issues/detail?id=1208
http://forum.xda-developers.com/showthread.php?t=1801983&page=40
but no solution


----------



## reaper88

This is awsome..Thanks


----------



## wbarter

First let me start by saying...this is nothing short of awesome!!! thanks Dorregary! When I tested my Tango(3rd party video chat app with fb integration) the video positioning should follow the accelerometer's Up/Down position and rotate with you...Im sure you already aware of this. Great work ...so thankful you stuck with it! Much appreciated!

Wayne


----------



## johnleo

Got it working partially. But the image seems to be narrowed down to 16:9 and becomes twisted. How does it happen this way?


----------



## modjo30

I don't understand what i'm doing wrong then, i installed the build from 18th November and my camera still just says, app stopped working if i try and start it up.
Was there something i missed, i don't get on the forum as much as i should really


----------



## Dorregaray

I have just released preview15: http://goo.im/devs/Dorregaray/update-cm9-tenderloin-camera-preview15-for-official.zip


----------



## Dorregaray

modjo30 said:


> I don't understand what i'm doing wrong then, i installed the build from 18th November and my camera still just says, app stopped working if i try and start it up.
> Was there something i missed, i don't get on the forum as much as i should really


have you install camera preview patch?


----------



## RolandDeschain79

Dorregaray said:


> I have just released preview15: http://goo.im/devs/D...or-official.zip


Great thank you very much! I've just got it installed and running now, I have updated the OP to have the latest info and links. Dorregaray Rules!


----------



## johnleo

Dorregaray said:


> I have just released preview15: http://goo.im/devs/D...or-official.zip


Thanks, Dorregaray. Hope this will solve my problem.


----------



## modjo30

Dorregaray said:


> have you install camera preview patch?


Ah now that is where i'm going wrong , i shall install it today, thank you so much


----------



## andrewy

Was the software merged into the CM9 nightly as well? I flashed the latest nightly, but the Play Store keeps force closing. All other gApps seem to be ok.


----------



## Dorregaray

andrewy said:


> Was the software merged into the CM9 nightly as well? I flashed the latest nightly, but the Play Store keeps force closing. All other gApps seem to be ok.


no it's not merged


----------



## JDYangachi

OK I don't know what's going on.

I have tried installing P11-P15 over nightlies 11/11, 11/18. 11/25.

I get "Camera error. Can't connect to the camera."

For whatever reason, the patch is not taking effect, and the following files clearly are not being updated.

system/app/Camera.apk
system/etc/media_profiles.xml
system/lib/hw/camera.msm8660.so
system/lib/libcameraservice.so
system/lib/libOmxVenc.so

I've tried using CWM and TWRP, wiped cache, all to no avail.

I've never before had any problems flashing ROMs or updates.
Prior to installing nightly 11/11, though, I had been using the RC0-alpha2.

Can I manually copy the files from the P15 zip into the appropriate directories on my TouchPad?
If so,

Where do the /META-INF files go?
What about boot.img?

Any help is appreciated.


----------



## nevertells

JDYangachi said:


> OK I don't know what's going on.
> 
> I have tried installing P11-P15 over nightlies 11/11, 11/18. 11/25.
> 
> I get "Camera error. Can't connect to the camera."
> 
> For whatever reason, the patch is not taking effect, and the following files clearly are not being updated.
> 
> system/app/Camera.apk
> system/etc/media_profiles.xml
> system/lib/hw/camera.msm8660.so
> system/lib/libcameraservice.so
> system/lib/libOmxVenc.so
> 
> I've tried using CWM and TWRP, wiped cache, all to no avail.
> 
> I've never before had any problems flashing ROMs or updates.
> Prior to installing nightly 11/11, though, I had been using the RC0-alpha2.
> 
> Can I manually copy the files from the P15 zip into the appropriate directories on my TouchPad?
> If so,
> 
> Where do the /META-INF files go?
> What about boot.img?
> 
> Any help is appreciated.


Whoa slick! Slow down a bit. You didn't explain much of anything about what you did to move from the very oldest version of CM9 to the latest version. Were you aware that all of the preview releases from Dorregaray are not all exactly the same? Some are the whole release, some are updates to those.	You might want to explain if you are an experienced flasher at this or a noob. It helps knowing one's experience level when explaining things to someone.

Did you make a backup before starting this whole process? That is the first and most important thing one should do.

I am using this camera update without problems and I am not aware of others having the problems you are having. I would suggest if you know how to uninstall Android and start fresh, do so now. A nice fresh/clean install will eliminate any issues you may have introduced with all this flashing you have been doing.

OH, and BTW, have you checked in WebOS to see if the camera works there. You may have a hardware problem.


----------



## Dorregaray

JDYangachi said:


> Can I manually copy the files from the P15 zip into the appropriate directories on my TouchPad?
> If so,
> Where do the /META-INF files go?
> What about boot.img?


the META-INF contains update script and files needed for update script to work. it goes nowhere on the device.
the boot.img is the kernel and replaces the /boot/uImage.CyanogenMod - see update script in META-INF for details


----------



## Nstirton

Wow, incredible that the camera is finally working! didnt think id see the day! great job dev! will this be added to the official nightlies in time? heres hoping the rotated view on Camera FX etc is fixed. keep up the great work!


----------



## JDYangachi

Dorregaray said:


> The first step is to check the system logs. There will be the reason why the camera driver is not being loaded. To do that use alogcat from google play or connect device to the pc and run adb logcat if you have android sdk installed or open the terminal app on the device and run su && logcat > /sdcard/logcat.txt then after while press vol-dn (or up) + c to stop logging and upload the logcat.txt from the device to pc to examine it.
> You can also boot to web-os and check if the camera is working there (the touchpad cameras are known unplug themselves sometimes).


Thanks, I guess I will try this. Camera had been working in webOS, but now seems not to be working.



> if system/lib/hw/camera.msm8660.so and system/lib/libOmxVenc.so exists on your device it means the update worked. the nightly is missing them


These files are not being written to the TouchPad for some reason.



> the META-INF contains update script and files needed for update script to work. it goes nowhere on the device.
> the boot.img is the kernel and replaces the /boot/uImage.CyanogenMod - see update script in META-INF for details


Thanks, I figured this out when I took a look at the files.


----------



## nevertells

JDYangachi said:


> Thanks, I guess I will try this. Camera had been working in webOS, but now seems not to be working.
> 
> These files are not being written to the TouchPad for some reason.
> 
> Thanks, I figured this out when I took a look at the files.


If your camera is not working in WebOS, then you have a hardware problem. As Dorregaray suggested, try pressing gently on either side of the camera to try to reseat it's connecter.


----------



## nevertells

Finally had the opportunity to test out Skype. Have to say it's fun using it on my TouchPad in Android. And now I'm a member of the fanclub waiting patiently for Dorregaray to move it into CM10. Thankyou again for your excellent work Tomasz.


----------



## ermacwins

Excellent work. Will this work on AOKP rom?


----------



## Dorregaray

ermacwins said:


> Excellent work. Will this work on AOKP rom?


that depends. if the AOKP has their own changes in the kernel this patch will remove them (as it replaces the kernel). you can try, but you may get endless boot animation or the system may work unstable/don't work at all.


----------



## nevertells

Unofficial CM10 with Working Camera:

http://rootzwiki.com/topic/37091-unofficial-cm10-with-working-camera/

http://forum.xda-developers.com/showthread.php?t=2025990


----------



## mtiberio

The aspect ratio of pictures I take is wrong. Anyone know how to adjust it?

oops only on the camera preview screen. ok once taken in the gallery...


----------



## nevertells

mtiberio said:


> The aspect ratio of pictures I take is wrong. Anyone know how to adjust it?
> 
> oops only on the camera preview screen. ok once taken in the gallery...


This will not be fixed in CM9. It has been fixed in CM10.


----------

