yashsingh1/xdaforums huggingface dataset:
[Desire Android Development] BlueVD:
If I'm not mistaking, there's not much of a difference in the overall drivers added (just the selections done at compile time). It's just that the kernel has to many modifications for the default Desire modules to work with it. I'm thinking of trying to recompile the modules with the new kernel source and see what happens (most likely they'll need some mods on them, hope it won't be a great deal of them though).
[Desire Android Development] hamdir:
i noticed additional modules to the video msm section

and now based on your error log, i'm checking the differences in the htc_acoustic files so far there are a few differences even stuff missing in the vision kernel

i'm starting to think the issue is related to video capture
[Desire Android Development] hamdir:
ok i did that where does it throw the log file?
[Desire Android Development] BlueVD:
It should print just a few lines on the screen =)

Or you could run

lsmod > /mnt/sdcard/lsmod.txt

to throw everything on the sd...

Now messing with the driveres, I found some major changes aded to the vision kernel (one of them being a struct called enum_frontcam) and other stuff related to camera settings and options.

Looks like HTC did quite some improvements related to the camera drivers/app

And thinking of the 1K lines of code I'm seeing changed I think it will take a few days to get even to the first test modules =/
[Desire Android Development] hamdir:
all i got is this

bcm4329 210454 0 - Live 0xbf000000

and yes i was starting to feel the same while looking through the changes and additions, its a big task, we need more kernel devs like you onboard :)
[Desire Android Development] casca:
here goes nothing...

is this it?
[Desire Android Development] hamdir:
there is something puzzling me here, if we have Z/HD Roms running on the desire kernal like RCMixHD, i understand why the new sense camera apps won't work since they are calling unsupported modules and features in the new kernel

but third party apps or at least the standard desire htc camera should work, since the ROM is running the desire kernel

for the desire htc camera running on the desire kernel to fail it means there is something in the HD/Z lib files in the ROM and not the kernel that are calling unavailable updates in the kernel

i still think this easier solved by finding what library is calling those unsupported features for the least to run the old htc camera and third party apps, am i missing something here? fixing the kernel is too big of a task
[Desire Android Development] millab:
No, i have to correct you here.

The kernel we have in the HD roms is the HD Kernel. This is because the new Sense will not work with our old Desire kernel.

What we are now looking at is recompiling the HD kernel with parts from the old desire kernel to get the camera functioning.
[Desire Android Development] hamdir:
i'm not sure your right, RCMixHD is running on the desire UVOC v3 kernel
[Desire Android Development] ephumuris:
Maybe thats the problem.

Eph.
[Desire Android Development] NeoPhyTe.x360:
The kernel in the HD roms for our Desire is the same as works with sense 1.0.
[Desire Android Development] hamdir:
and so we should figure out what file is making the unwanted calls for the camera, much easier then converting the kernel, i don't know maybe if i keep scanning through the Z kernel can help, blueVD DMESG dump can help too http://pastebin.com/nkcaj9kF
[Desire Android Development] BlueVD:
To clear a few thoughts:

The kernel is from Desire HD, not from Desire Z. But most likely they use the same codebase.

Now for the camera and possible reasons it doesn't work, the old libs from the original Desire ROM aren't compatible with the new kernel. That's why you can try all you like, they'll never work. As to why the default drivers from HD don't work: I believe that the HTC developers didn't include the drivers for the old camera modules (seems logical that you wouldn't include something you don't need especially since it is for a mobile device where you think of space and memory optimization). When doing a make menuconfig for the desire z kernel I've noticed a lot of camera drivers weren't included. Right now I'm getting the Android toolchain to try and recompile the camera modules and see if this gets the cam working. Hopefully, it will =)
[Desire Android Development] hamdir:
blueVD the current DesireHD roms in the desire android development section are all using the Desire sense 1.0 kernel not the HD kernel, either way can't wait for your results!
[Desire Android Development] Dragooon123:
Are you talking about the kernel used in HD ROMs or the new kernel released be HTC? The new kernel released by HTC is Desire Z's according to them unless you have proof otherwise, and the kernel used in HD ROMs is the same one used in normal Desire ROMs since richardtrip's kernel works on both of them. I doubt if HD's kernel is used as is then anything will work.
[Desire Android Development] BlueVD:
So you're basically saying I wasted half a day (and still going at it) in order to realize I was wrong all along? =)

Anyway, since I got most of the stuff compiling I'll waste another 5-10 mins... Praying it works...
[Desire Android Development] hamdir:
why wasted your idea might still work, classic desire (bravo) kernel compiled with the new modules from the vision kernel, isn't that what you are doing? if so what your doing should be the better solution

the other idea was since we are already using the desire kernel, can't we hunt the lib file calling the unwanted modules using the vision source files and your error log?

waiting anxiously :)
[Desire Android Development] eViL D::
There are actually more drivers in the source, it just depends on what you're selecting in the config. qsd8x50 vs msm7x30, etc.

You're going to need to edit the makefile & kconfig or edit the files accordingly to compile for bravo.
[Desire Android Development] BlueVD:
Right now I'm going dizzy with compiles...

Doing 2 sets:

desire modules with desire z kernel

and desire z with desire kernel. I can tell you this is one heck of a job... I can't tell you how happy I am not being a Google/HTC programmer =)

Even if it fails, it will definitely prove the problem is from the framework/other part...

But still, I'm preying it works (nearly 10 hours since fiddling with this... my boss would kil me if he would realise what I'm doing :) )
[Desire Android Development] hamdir:
Can you please point us to that thread?
[Desire Android Development] rolfd:
Thread cleaned up. AGAIN.
[Desire Android Development] BlueVD:
Just woke up and heading to the office. The desire kernel with desire z modules are a no go. I just have a little work to do to get the desire z kernel to compile with the desire libs.

Today I'll have a go at the framework.jar too to see if there's something in there that screws things up. Maybe in the emd a combo between custom modules and a custom framework jar will work.
[Desire Android Development] hamdir:
Seems our friend didn't have luck yet, blueVD where are you man?

I found this in the Leo forums it's kernel related and seem to solve the previously unavailable 5MP mode in HD2 desire sense roms, what caught my attention is this info

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

maybe such a file specific to the new sense is missing in the desire kernel its worth comparing whats going on in this location in the kernel /sys/android_camera/
[Desire Android Development] Frozen-GPU:
Someone tested copying the file from /sys/android_camera from a ROM like LeeDroid over the files in the RCMixHD ROM?

I wanted to do this a few minutes ago, but sadly the newest ROM (v10) has no HTCCamera.apk and I hadn't got much time, so I switched back via Nandbackup to LeeDroid for now... Maybe I will test it later...

Simply grab the file included in /sys/android_camera from a ROM with working camera using RootExplorer and copy it to your sdcard, then flash RCMixHD v04 or smaller (because of the missing HTCCamera.apk in newer versions) and copy and overwrite the file from sdcard to /sys/android_camera.

Don't forget to do a nandbackup first :p
[Desire Android Development] ukmaddnes1:
If you could upload the file from /sys/android_camera as your using LeeDroid that would be helpful, stop people from having to flash to LeeDroid to find the file. Then I add it in and give it a go :)
[Desire Android Development] kiepas96:
here you go leedroid 2.2 sys/android_camera

http://www.mediafire.com/?numni3gowu1gr6g
[Desire Android Development] ukmaddnes1:
Got permission denied when trying to push via ADB. Also the file in the folder already is exactly the same :(
[Desire Android Development] Frozen-GPU:
Is your phone S-OFF? If it is, you could try with RootExplorer instead.

Uhm... do the files have the exact MD5 checksum? Or is it just the filesize which is the same? In addition to the file in /sys/android_camera you could replace the file from /sys/android_camera_awb_cal, too.
[Desire Android Development] robocik:
I have uploaded some original files from 1.32.207.1 build, HTCCamera.apk too.

you can find them here.
[Desire Android Development] liljom:
I replaced the HTCCamera.apk in the AuraxTSense 7.9 with the uploaded HD Cam.apk, and it show the preview for a sec, and FCed

the logcat is attached
[Desire Android Development] andycted:
D/mm-camera-ctrlcmd( 159): config_proc_CAMERA_STOP_SNAPSHOT: received CAMERA_STOP_SNAPSHOT!, ctrl->state = 25

D/mm-camera-ctrlcmd( 159): config_proc_CAMERA_STOP_SNAPSHOT: invalid state 25

Is this the main problem ? Or the result of this ?

E/JavaBinder( 221): !!! FAILED BINDER TRANSACTION !!!

Which then cleans the libs ?

D/QualcommCameraHardware( 159): dlclose(libqcamera)
[Desire Android Development] NeoPhyTe.x360:
Look at this:

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

Although I think not is the kernel.
[Desire Android Development] rover.prince:
Did u look the link. I tweeted u on Twitter. I am eagerly wishing for cam to work.
[Desire Android Development] Diamondback2009:
This is because the cam can't find the skin utils in the old firmware.

Look at the errors at the end of logcat.
[Desire Android Development] NeoPhyTe.x360:
Yeah I saw, thanks. But I think this is not the problem, because we use sense 1 kernels, and them have all drivers inside.
[Desire Android Development] HC4Life:
The people of HD2 forum did it. The camera works with a patch, but only in old versions.

Why not we can use the same patch?

Thanx ;)
[Desire Android Development] K900:
If noone builds that patch by tomorrow evening, I'll try it myself

Sent from my HDfied HTC Desire
[Desire Android Development] liljom:
POST LINK!
[Desire Android Development] hamdir:
Sigh...no one solved anything, they figured out in the HD2 forum how to enable 5 megapixels mode in OLD sense roms (it wasn't working before) that's it!

We are trying to see if this new info can help solve the HD cam problem
[Desire Android Development] HC4Life:
http://xdaforums.com/showthread.php?t=810461
[Desire Android Development] rolfd:
Thread cleaned.
[Desire Android Development] hamdir:
can some upload the file system/build.prop from RCmixHD
[Desire Android Development] ephumuris:
Here.

http://db.tt/vgHvGXZ
[Desire Android Development] eViL D::
The HD2 guys HAVE the camera already working, it just wasn't taking 5mp pix. That problem is totally different than what this thread is trying to accomplish, which is just getting the camera to work. I'm almost positive it's going to take framework changes and not kernel changes to get this working as we already have the camera drivers, it's just a matter of getting them hooked in the framework.
[Desire Android Development] hamdir:
Thanks can you upload /sys/android_camera and /sys/android_camera_awb_cal

Thc again
[Desire Android Development] jeandujardin01:
the build from RCmixHD is already modified so here the stock one from Desire Z dump

http://www.mediafire.com/download.php?cdjkxt65438thk3

wonder where BluVD at ?
[Desire Android Development] liljom:
Quote from the 5MP camera fix for HD2 thread:

"Is it possible to use camera driver from Desire (bravo) in Desire HD (ace) with camera fix?

On all desire HD rom versions camera do not work but on Desire roms work fine.

Just thinking...?!"
[Desire Android Development] liljom:
here you go:

http://www.multiupload.com/DLULDLP3AX
[Desire Android Development] BlueVD:
Hello folks,

I've been down with a cold and this kind of kept me in bed over the weekend. Anyway, this gave me time to tinker with the camera on the desire. Here's some food for thought: tue camera does get initialize (dmesg shows it clearly). To problem is not woth the drivers or kernel. I've decompiled some of the camera binaries and the framework.jar since the problem is mostly from one of these. As a sidenote, I kept noticing a lot of errors related to the audio part (hd has major diffs when it comes to audio) and I'm also trying to see if this is related in any way to the cam. Cheers!
[Desire Android Development] hamdir:
welcome back blueVD and hope you get well soon, you are our only hope :D

i think it's pretty clear now the issue isn't related to the Kernel, we are running our own device kernel with its own driver already

i think neo should add this to his first post, the only thing a the kernel source can do is help us hunt down the new functions being called

i think the audio errors are related to the video recording features
[Desire Android Development] ownhere:
I checked bravo and vision kernel source, found some different point:

bravo camera sensor:s5k3e2fx

vision camera sensor:s5k4e1fx

ace camera sensor:s5k3h1gx

config S5K3E2FX
bool "Sensor s5k3e2fx (Samsung 5M)"
depends on MSM_CAMERA
---help---
Samsung 5M with Autofocus

config S5K4E1GX
bool "Sensor s5k4e1gx (Samsung 5M)"
depends on MSM_CAMERA
default n
---help---
Samsung 5M with Autofocus

config S5K6AAFX
bool "Sensor s5k6aafx (Samsung 1.3M)"
depends on MSM_CAMERA
default n
---help---
Samsung 1.3M without Autofocus

config OV8810
bool "Sensor ov8810"
depends on MSM_CAMERA
default n
---help---
OmniVision 8M Bayer Sensor

config OV9665
bool "Sensor ov9665"
depends on MSM_CAMERA
default n
---help---
OmniVision 3M YUV Sensor

config S5K3H1GX
bool "Sensor s5k3h1gx"
depends on MSM_CAMERA
default n
---help---
Samsung 8M 3H1 MIPI AF Sensor

And I found liboemcamera.so is related with camera sensor, I can found string 's5k4e1fx' in DesireZ/DesireHD ROM's /system/lib/liboemcamera.so, so I think we can hexedit this file for camera working. Replace all 's5k4e1fx' with 's5k3e2fx'.
[Desire Android Development] liamstears:
Anyone tried this yet?
[Desire Android Development] crazyknallchopf:
can`t see anyting if i open with hexeditor :-(
[Desire Android Development] ivicask:
[/code]

And I found liboemcamera.so is related with camera sensor, I can found string 's5k4e1fx' in DesireZ/DesireHD ROM's /system/lib/liboemcamera.so, so I think we can hexedit this file for camera working. Replace all 's5k4e1fx' with 's5k3e2fx'.[/QUOTE]

From which source you took liboemcamera.so? I took one from RCMixHD_v08, but inside here isnt any 's5k4e1fx' , only similar ones like "s5k4e1gx". Did you make typo e->g ?
[Desire Android Development] hamdir:
if you are using an HD ROM try to look and replace "s5k3h1gx" instead
[Desire Android Development] ivicask:
Yea i figured that out now. After trying with moded file, on some camera app from market its no longer crashing, now its just frezzes. Ill look in other camera related files for those s5k3h1gx->s5k3e2fx and gona check logcat.
[Desire Android Development] robocik:
check the libcamera_client.so
[Desire Android Development] hamdir:
and don't forget to try to the old htc camera
[Desire Android Development] m0narx:
I I tried all of the above... Camera still not working.

But no FC... just frezzes)) Also i tried old binaries(awb_camera, cam_ins_spmo, lsc_camera, mmcamera_test) - but it was useless.

Sorry for my english
[Desire Android Development] ivicask:
I dont think old camera would work, because Framework is different but will try.

Anyways.

I'm getting few errors like this when trying to start CameraZoom from market.

W/CameraSwitch( 1686): open main camera

W/CameraSwitch( 1686): no file - can't switch camera

Looks like it still needs the orignal roms camera.apk to start any other market Camera.

Could anyone upload me Desire HD's camera.apk, from lastest version you can find?So i can try with it.
[Desire Android Development] mexxxico:
I'l find HTCCamera.apk on this link

rom.tat.tw/desire/RCMixHD/v08/Original/
[Desire Android Development] BlueVD:
Also tried to make the mods. Indeed, it looks as if the camera freezes, but in fact it *does* work. It gets stuck though in "calibration" (the following is the output I got from the camera binaries):

/system/bin/lsc_camera: Sensor_set_Calibration_status : Ongoing
/system/bin/awb_camera: Sensor_set_Calibration_status : AWB Ongoing

mmcamera_test doesn't produce any kind of output. However, considering all these 3 apps generate faults before editing liboemcamera.so I believe we're close. Al we need now is to find the other remaining fixes (also, logcat seemed different from other attempts, I'll post one as soon as possible). Also, when trying to recompile the liboemcamera.so and other shared objects, this is what I got from the compiler:

============================================
Checking build tools versions...
build/core/main.mk:72: ************************************************************
build/core/main.mk:73: You are attempting to build on a 32-bit system.
build/core/main.mk:74: Only 64-bit build environments are supported beyond froyo/2.2.
build/core/main.mk:75: ************************************************************

My laptops' proc is just 32bit... :(

[EDIT:]

Actually, only my linux distro is 32bit... Downloading and getting ready for reinstall (since the Win alternative seems impossible, android seems to require a case Sensitive filesystem, if anyone knows something like that in windows, do tell :) )
[Desire Android Development] robocik:
camera from the latest (1.32.207.1 build) is here

http://rom.tat.tw/desire/RCMixHD/v10/Original/
[Desire Android Development] kubino99:
This message is quite interesting :

E/ ( 2569): vfe: MSM_CAM_IOCTL_REGISTER_PMEM ioctl failed. rc = -1
E/ ( 2569): vfe_stats_buffer_init failed

Looks like problem is in function vfe_stats_buffer_init
[Desire Android Development] andycted:
I got audio errors right from the start (where I actually stopped) when trying copy-pasting libs. Do you think it's totally irrelevant and/or you should see them even when opening an application that can't make use of the camcorder ?
[Desire Android Development] ivicask:
No luck!

Mostly this error comes first

E/CameraThread( 1077): open the Camera in start_camer

W/CameraSwitch( 1077): open main camera

W/CameraSwitch( 1077): no file - can't NOswitch camera

And this is the list of files which also gives errors:

/system/lib/libc.so

/system/bin/linker

/system/lib/libcamera.so

Audio errors also:

E/AudioHardwareQSD( 1090): Cannot open /dev/audience_a1026 -1

Fail to open /system/etc/AdieHWCodec_WA.csv

Except changin camera sensor ID's maybe we need to also find audio hardware ID's and change the Desire HD's ones with Desire's..?
[Desire Android Development] ownhere:
DesireZ and DesireHd use the same liboemcamera.so.

BTW:the kernel of DesireZ's RUU is different from vision kernel source, RUU's kernel include all camera sensor driver(hexedit to view it), and vision kernel source include s5k4e1gx only.
[Desire Android Development] ownhere:
Maybe.

In vision kernel source, s5k4e1gx driver include a _register.c, it is different from s5k3e2fx.
[Desire Android Development] kubino99:
So in this case won't help hexediting liboemcamera.so, we need this lib with support for s5k3e2fx.
[Desire Android Development] HC4Life:
And if we grab all the files related with camera from LeeDrOiD rom or other rom with Sense and put in DesireHD rom?
[Desire Android Development] ctinsley:
Hey I've been watching this thread for a couple days now. Are any of the devs on here reaching out to Incredibledoes?? He is the one dev in the incredible community that is working on an HD port and has been hard at work trying to solve the camera issue. About 24 hours ago now he posted an image on his twitter account that he got from his HD sense rom, the lighting is all messed up but its a pic none the less. I'm wondering if you guys share knowledge that we'll be able to move both projects along.

Here is the pic

and the link to his twitter feed.
[Desire Android Development] Fightspit:
Here is the "fixed" pic ;)

By the way, the camera "partially" works !
[Desire Android Development] alexdiaz:
He is on to something...
[Desire Android Development] hamdir:
the incredible has a different camera sensor though, its 8MP, lets hope he will share his method

by the way he mentioned the photo was taken on the stock htc kernel
[Desire Android Development] hamdir:
dude you think we didn't try all ready?!!! read the first post and if you followed the thread you will see the issue is much more complex then this, we have our desire with its own kernel and own drivers unable to run its own camera and files, the issue is related to the framework and libraries within the HD Rom
[Desire Android Development] Frozen-GPU:
:D That was the first thing i did on RCMixHD v01 :D

That was how I found the right libs for HD Video Playback on Youtube for example.

But how everyone said: The Problem is more complex and driver related.

I hope someone will fix it soon, we are DAMN close guys :rolleyes:
[Desire Android Development] HC4Life:
And what about CameraGoogle.apk? Anybody tried?
[Desire Android Development] Deosneos:
Please stop asking nonsensical questions.
[Desire Android Development] jeandujardin01:
its not a question of camera app, we could try Barcode scanner, rom manager qr scanner or even road sms it always crash.
[Desire Android Development] elsparkio:
Slightly rude/arrogant. If you think its nonsensical keep that to yourself. People are just trying to achieve the same goal.
[Desire Android Development] hensk:
holly molly,m8

u did et,& what is wrong with your display

is it brocken or burn em with sorce code
[Desire Android Development] BlueVD:
There's nothing wrong... mmcamera_test and other native binaries seem to output raw data directly to the display and it "overlaps" with the ones generated by the dalvik apps... Thus the video data somehow interlaces... I was just attaching the pic to prove the cam works partially...

Right now I should hit the bunks, haven't slept in 2 days :p
[Desire Android Development] kiepas96:
hey guys, i just wanted to say that sanpei was that guy who fixed camera problems in kernel for mytouch 3g few months ago, maybe he can help
[Desire Android Development] HelderJr:
BlueVD congratulations on your hard work! It´s almost there :) May I ask a simple question? If you could get this to work on the HTC Desire, will it be possible to port this fix to the Android HD2? Or it´s something inner to this device?

Cheers!
[Desire Android Development] microang:
Yes it would because at teh moment we are using the desires libs as we have the same camera so if this gets sorted then so will ours. :)
[Desire Android Development] ownhere:
Good work!

I try compile bravo kernel with vision's s5k3e2fx.c, then

fastboot boot boot.img

It works with old senserom.

This may be used to help the newsense rom.
[Desire Android Development] BlueVD:
Well, this is device specific. But the basics should be the same (edit some sourcecode, add some stub functions, recompile everything). You only need someone with the hardware itself to do some tests in the end =)
[Desire Android Development] Pajorve:
Welcome at the home

Welcome again .... like this your health now ... hope well ... After all vc is important for all of us here in this discussion!

improvements and stays in peace!

:D
[Desire Android Development] pulser_g2:
Can I remind everyone that this is a development thread, not the place to thank those working on it, or say how excited you are.

couple of off topic posts removed.