yashsingh1/xdaforums huggingface dataset:
[Galaxy Ace S5830 Android Development] CallMeVentus:
You guys could try this:

http://github.com/EmoBoiix3/android_hardware_camera

But I don't know if it might work....I've not finished importing all the functions and not replace the prebuilt libs yet

This was sent from a Galaxy Ace. Problem?
[Galaxy Ace S5830 Android Development] chrcol:
great work guys I hope for all of us you get success. the camera is the only reason I havent tried the CM9 rom.
[Galaxy Ace S5830 Android Development] shailpancholi:
Why can't you use camera libs of w8 (Sony erricson)
[Galaxy Ace S5830 Android Development] oddeceed:
different sensors etc i think but im no DEV
[Galaxy Ace S5830 Android Development] SpaceCaker:
w8/x8 have 3.2 MP camera ;)

ace has 5 + LED
[Galaxy Ace S5830 Android Development] ElmirBuljubasic:
3.2 o 41.0 there is no diference!

Led can be fixed in future!

Ah you can ask nobodyatall for help! ...maybe XD
[Galaxy Ace S5830 Android Development] dragonnn:
X10 Mini Pro has working 5Mpx camera, but the sensor is different, but maybe it can help us http://xdaforums.com/showthread.php?t=1636501 .
[Galaxy Ace S5830 Android Development] madman:
all those giving links to other devices should read what coolya said.. samsung changed the libs in GB itself so libs need different kind of wrapper to get all functions just msm7k device won't do things working as different OEM

so we would need to do things from pretty much scratch by refering ramv78's HAL
[Galaxy Ace S5830 Android Development] diegonnc:
in short, this means stop posting links and let the devs do their thing :D
[Galaxy Ace S5830 Android Development] oddeceed:
im sure somebody will have already thought of this and i dont know how easy it would be but would comparing samsung gb roms with say htc and sony gb roms help reveal what samsung has changed to make it easier to compile new drivers for ics on our ace ?

p.s i hope that somebody understand what i am trying to say
[Galaxy Ace S5830 Android Development] SMillerNL:
That is actually not such a bad idea. I will try and do that tomorrow. Although I think it would be best to compare nexus s with the AOSP ics drivers.
[Galaxy Ace S5830 Android Development] :
This thread don't have any sense...

You don't have anything to share... I can say more: with that method, that you presented, it won't ever work.

I'm still trying to get sources from Samsung, also Marcin have working HAL, but we have only one problem left (and no idea how to fix them).

And about msm7x27 or libs from other devices - it's fully unuseful for us... Samsung really complicating everything and we cannot use libs created for any other device. We can just:

a) use Samsung binaries and modify HAL to get it working with that (almost done on GalaxyICS GitHub, if you want to try help with that, feel free)

b) rewrite binaries - impossible in practic

c) or just let spam Samsung about share they sources, people have power :-) Good trolling isn't bad, huh :-)?

There's no any other ways to get camera working, trust me.

Wysyłane z mojego GT-S5830 za pomocą Tapatalk 2
[Galaxy Ace S5830 Android Development] fame220:
How about this http://www.groubal.com/ics-compatible-openmax-il-compiled-for-armv6-from-qualcomm/
[Galaxy Ace S5830 Android Development] FMAranda:
I think they are just trying to help Maclaw.
[Galaxy Ace S5830 Android Development] ZenPluS:
GPU driver not Camera!
[Galaxy Ace S5830 Android Development] den191097:
It is not a GPU driver.

It is OpenMax Codec for camera.
[Galaxy Ace S5830 Android Development] den191097:
http://xdaforums.com/showpost.php?p=20281617&postcount=17

Maybe this can help.

(Its not driver itself)
[Galaxy Ace S5830 Android Development] djsky2011:
Not OpenMax, it's basically another petition and if Coolya says it's doable, then it's doable we just need determination and to work as a team. Maclaw says he has HAL working but stuck with errors so maybe we could get rapvm to look at the sources.

Coolya was also right about this... if we can get this working for Gingerbread it shouldn't be too hard to port to ICS https://github.com/CyanogenMod/android_device_samsung_cooper/blob/71c695a77d56e4e9b2e7982bf4eaf864c327e94a/libcamera/QualcommCameraHardware.cpp
[Galaxy Ace S5830 Android Development] ocovarr112:
I got partial camera working on my old OB, try this:

Copy the media_profiles.xml from system/etc/ from ZTE Blade, maybe that will solve the FC error...

If that donsnt help then try this:

camera.msm7x27.so - > camera.cooper.so
[Galaxy Ace S5830 Android Development] Lijop:
See people are there to help us we can do this step by step. Cmon guys. @lagloose try the above method and let us know.
[Galaxy Ace S5830 Android Development] ocovarr112:
stop replys that dosnt help this development.

If you wanna say: you will fail and you cant do that just keep it to yourself... just let the ppl try to make this working, I dont see the problem....

I think you should do this:

Use original libcams... you dont need to replace this.

Replace the camera.cooper.so on system/libs/hw/ and the media_profiles.xml on system/etc/ always use the same from one devices. I think you can try the hero ones or z blade. As Im seing maybe blade is the best option here.

If hal module loads with a .so file, then keep that and just replace the media_profiles.xml with different one til camera works.

Do no reflash the entire rom, just push that by adb:

- adb push media_profiles.xml /system/etc/ - don forget to mount system.
[Galaxy Ace S5830 Android Development] PedroJuuu:
@Wayland_Ace could help us. He got to run the camera without preview, right?

See it: http://xdaforums.com/showthread.php?p=25141548

Enviado desde mi Galaxy Ace
[Galaxy Ace S5830 Android Development] eagleeyetom:
How many times do I have to remind you to respect others?

XDA is based on cooperation and respect. Everyone who doesn't understand this way of conduct shouldn't be on this forum.

Rules are the same for Junior members, Recognized Developers or even Admins.

No flaming on my shift, otherwise you'll get earlier vacation.

Treat this as a serious warning.

Now get back to the development topic.
[Galaxy Ace S5830 Android Development] lagloose:
What do you mean by 'old OB' ?
[Galaxy Ace S5830 Android Development] madman:
Optimus Black
[Galaxy Ace S5830 Android Development] marcin1147:
Hi guys!

First:

Any OpenMAX petitions won't help us.

2. We got almost working HAL on our GitHub, it loads the camera driver but Camera app crashes with SIGFPE. Here is our logcat but i don't think that anyone can help us: http://wklej.org/id/759868/

3. Why normal methods doesn't works on Ace? Because of Samsung and his ****ty, closed source camera driver code.

4. We tried to apply MemoryHeap patch but without success.

5. Why camera works on Gio but not on Ace? We are using ZTE Blade camera drivers which has the same CPU and camera sensor. If anyone can find phone with the same CPU and camera sensor as Ace has - then we can fix it.
[Galaxy Ace S5830 Android Development] evil_penguin:
According to maclaw, the only phone with the same CPU and camera sensor as Ace is Samsung Galaxy Mini .
[Galaxy Ace S5830 Android Development] marcin1147:
No, Mini is 3Mpx when Ace is 5Mpx
[Galaxy Ace S5830 Android Development] evil_penguin:
ya that i know.

sensor might be same ?

well, i am just saying what maclaw said earlier.
[Galaxy Ace S5830 Android Development] evil_penguin:
ok.

Thanks for clearing this out.
[Galaxy Ace S5830 Android Development] Modulüs:
Wt bout HTC explorer and ZTE skate?
[Galaxy Ace S5830 Android Development] lagloose:
i've read in other threads that sometimes they could fix crashing by wiping cache and dalvik-cache (i don't know why this should help, but they said...) and/or by using a media_profiles.xml from GB Rom. Did you try that ? What about 3'rd party Camera App's ? AFAIK in I9001 Camera works with 3'rd party Apps but not with ICS Camera...
[Galaxy Ace S5830 Android Development] djsky2011:
Let's arrange a testing tonight with these suggestions, if Marcin can compile what they have working so far we could test it with swapping media_profiles.xml and see if third party camera app works
[Galaxy Ace S5830 Android Development] themountig:
Samsung has such totally different drivers - nope SAMSUNG Gio working with HTC Blade drivers . Surely no more impossible than Ace? Our esteemed devs are using exactly the same methods prescribed by Lagloose etc. then constantly saying Samsung is so different from all other makers - absolute Tosh. They all tweak the drivers but some kindly release their sources. If they didn't tweak they would all match and only difference would be resolution and just different drivers for CPU.
[Galaxy Ace S5830 Android Development] djsky2011:
U are right, which is why myself and coolya referred to this https://github.com/CyanogenMod/android_device_samsung_cooper/blob/71c695a77d56e4e9b2e7982bf4eaf864c327e94a/libcamera/QualcommCameraHardware.cpp
[Galaxy Ace S5830 Android Development] CallMeVentus:
Does an ARMv7 device count ? It's the Galaxy R I'm talking about - it will be receiving Official ICS

This was sent from a Galaxy Ace. Problem?
[Galaxy Ace S5830 Android Development] themountig:
And how can this or other things like camerahal be integrated into the Rom? I've played with libs and build.prop.but these parts are confusing. Obviously plenty contributers understand how this works and maybe I am alone in my confusion.:mad:
[Galaxy Ace S5830 Android Development] ZenPluS:
sorry guys, I have a noob-question...

why can't we use GB camera drivers on ics? are they closed source?

we can't adapt them to ics?
[Galaxy Ace S5830 Android Development] Daveee10:
I think this helps for you:

https://github.com/MiniCM/android_frameworks_base/commit/11768942859d3b29b0a4ae9682e93a6ed4fcfd3f

IMO with this, you can use the original libcamera with Evervolv camera hal...
[Galaxy Ace S5830 Android Development] rush25:
Check gio dev section a guy get cam working!!

Dont know is it real ir fake

Thread : http://xdaforums.com/showthread.php?t=1684120
[Galaxy Ace S5830 Android Development] ElmirBuljubasic:
Need to hack files!
[Galaxy Ace S5830 Android Development] K.A.:
Maclaw said he tested it and its fake and marcin even put up screenie proof..so..well..thats fake..
[Galaxy Ace S5830 Android Development] Koogly:
Guys I Am No Dev, But is HTC Wildfire s camera sensors same as Galaxy ace? Cause they both have 5MP and all the stuff

Here's a Working ICS CM9 relese for Wildfire s:-

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

Please Clarify this to me!
[Galaxy Ace S5830 Android Development] KcLKcL:
Same megapixels doesn't mean same sensors
[Galaxy Ace S5830 Android Development] Koogly:
So that Means its Not Possible with that on! Ok i get it.
[Galaxy Ace S5830 Android Development] lagloose:
Hey,

Tried some more things bu still no success...

Anyway, to my understanding....

When i boot up i get the following entries in logcat:

I/CameraService( 1856): CameraService started (pid=1856)

E/CameraHAL( 1856): CameraHAL_GetNum_Cameras:

D/CameraHAL( 1856): CameraHAL_GetNum_Cameras: loading libcamera at 0xb000e8a8

D/CameraHAL( 1856): CameraHAL_GetNum_Cameras: numCameras:1

and when i start camera i get the following:

I/ActivityManager( 325): START {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.android.camera/.Camera} from pid 968

D/memalloc( 325): /dev/pmem: Allocated buffer base:0x4a2f4000 size:614400 offset:4177920 fd:263

V/CameraHolder( 1775): open camera 0

D/CameraHAL( 1856): CameraHAL_GetNum_Cameras: loading libcamera at 0xb000e8a8

I/CameraService( 1856): Opening camera 0

D/CameraHAL( 1856): qcamera_device_open: name:0 device:0x13ab4 cameraId:0

D/CameraHAL( 1856): loading libcamera at 0xb000e8a8

V/QualcommCameraHardware( 1856): openCameraHardware: call createInstance

D/QualcommCameraHardware( 1856): createInstance: E

V/QualcommCameraHardware( 1856): Storing the current target type as 0

V/QualcommCameraHardware( 1856): constructor EX

V/QualcommCameraHardware( 1856): startCamera E

V/QualcommCameraHardware( 1856): loading liboemcamera at 0xb000ead8

V/QualcommCameraHardware( 1856): opening /dev/msm_camera/control0 fd: 15

I/QualcommCameraHardware( 1856): startCamera: camsensor name s5k4ecgx, flash 1

V/QualcommCameraHardware( 1856): startCamera X

V/QualcommCameraHardware( 1856): initDefaultParameters E

V/QualcommCameraHardware( 1856): native_set_parm: fd 15, type 1, length 32

IMO this shows to me that camera can be found or am i reading something wrong ?

What do you say ?
[Galaxy Ace S5830 Android Development] :
Nope, you're wrong. It isn't loading camera, only base functionality of libraries, which is needed to boot phone with it, unfortunally nothing more.

I had that a 3 month ago :-)

Wysyłane z mojego GT-S5830 za pomocą Tapatalk 2
[Galaxy Ace S5830 Android Development] lagloose:
@Maclaw, marcin

Did you already check out this: http://xdaforums.com/showthread.php?t=1448303 ?

especially because it obviously add's Overlay stub to libui...
[Galaxy Ace S5830 Android Development] lagloose:
One more possibillity...

I did a post in i9001 forums if they can help us, and here's an answer i got via PM:

Another chance ?
[Galaxy Ace S5830 Android Development] Lijop:
replace the gb with ics and see. there are some gb files which can be replaced. but not sure which one just try

---------- Post added at 04:45 PM ---------- Previous post was at 04:41 PM ----------

Here they have partial working cam on ideos.

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

---------- Post added at 04:52 PM ---------- Previous post was at 04:45 PM ----------

@lagloose zte skate which has the same spec just a little increase in ram has a working cam and the sources are on github. here are the links

http://www.modaco.com/topic/348745-ics-cm9-404-coldfusionx-for-the-zte-skate-rom-updated-3105/

https://github.com/ColdFusionX/android_device_zte_skate
[Galaxy Ace S5830 Android Development] lagloose:
Ok, seems to me, that there are different ways we could try.

I'm just updating my sources, but i won't have the time to try all possible solutions. For that reason we should organize a little bit...

Who has knowledge how to compile ICS, apply patches etc. and is willing to help us here ?

Please report back here and we should than decide who does what.
[Galaxy Ace S5830 Android Development] CallMeVentus:
I only know how to compile + simple debugging that's all

This was sent from a Galaxy Ace. Problem?
[Galaxy Ace S5830 Android Development] Lijop:
IMO djsky is the best bet. pm him and also emo can do his part also and if needed we can just start a new thread telling need helpers for compiling and testing.
[Galaxy Ace S5830 Android Development] djsky2011:
Not set up for compiling at the moment but could prob help with patches, BIG celebration going on this weekend in england for the queen so i'll be busy :D.

On a side note instead of doing new builds of ICS, we could just ask maclaw to list the methods he has tried as to eliminate us trying them again
[Galaxy Ace S5830 Android Development] Wayland_ACE:
You can take a look to my WIP on camera:

https://github.com/WaylandAce/libcamera - here is a camera.cooper.so and libcamera.so sources with some NATIVE ioctl calls (directly to /dev/msm_camera/* entries)

But some reason some of them is crashing by SIGFPE exceptions. For example native_set_dimension etc. Some works good.
[Galaxy Ace S5830 Android Development] marcin1147:
I fixed missing symbols 2 months ago.

Missing symbols isn't the problem - SIGFPE is the problem.

Wayland, lagloose, djsky: Any ideas?
[Galaxy Ace S5830 Android Development] themountig:
From study of others work - does floating point error arise because of absent config in dev/msm_camera/config ? Surely these shouldn't be blank. This must result in a divide by zero error. Forgive me if I'm talking balls btw. I only read can't dev.
[Galaxy Ace S5830 Android Development] marcin1147:
Hi devs!

I've just compiled camera HAL from i9001

Here is link: http://marcin.galaxyics.com/camera.zip

Time to test it! :D
[Galaxy Ace S5830 Android Development] Lijop:
Fingers crossed.
[Galaxy Ace S5830 Android Development] ZenPluS:
flashable zip?
[Galaxy Ace S5830 Android Development] lagloose:
Absolutely correct. My guess is also a division by zero but where.... libc is a basic library with atomic functions for the whole system. This can be anywhere. Anyone knows if there's a way to debug libs in Android ? (But i think you already had the same idea marcin, didn't you :))
[Galaxy Ace S5830 Android Development] marcin1147:
HAL from i9001 also throws SIGFPE

Yes, this can be anywhere. I don't know how to debug libs on Android ;(
[Galaxy Ace S5830 Android Development] lagloose:
First try with replaced libs...

service 'audio_flinger' doesn't restart after replacing libs and killing mediaserver. Tried to reboot: Bootloop at 'netd 1.0 starting'....
[Galaxy Ace S5830 Android Development] CallMeVentus:
That probably means the driver isn't compatible.....right ?

Otherwise it might be clashing with other drivers

This was sent from a Galaxy Ace. Problem?
[Galaxy Ace S5830 Android Development] marcin1147:
Sorry ;p libbinder.so is broken, remove it ;p
[Galaxy Ace S5830 Android Development] lagloose:
I'm on the road now. Will try later.
[Galaxy Ace S5830 Android Development] themountig:
Thanks kinda guessed. Thank God & CWM for Nandroid system backup lol.:)
[Galaxy Ace S5830 Android Development] djsky2011:
should we also rename camera.gio.so to camera.cooper.so?
[Galaxy Ace S5830 Android Development] marcin1147:
@up ofc
[Galaxy Ace S5830 Android Development] Wayland_ACE:
As I debug, SIGFPE exception was are thrown after ioctl calls. As I write before - after native_set_dimension calls:

struct msm_ctrl_cmd ctrlCmd;

ctrlCmd.timeout_ms = 5000;
ctrlCmd.type	= CAMERA_SET_PARM_DIMENSION;
ctrlCmd.length	= sizeof(value);
ctrlCmd.value	= (cam_ctrl_dimension_t *)value;
ctrlCmd.resp_fd = mCameraControlFd;

if(ioctl(mCameraControlFd, MSM_CAM_IOCTL_CTRL_COMMAND, &ctrlCmd) < 0) {
LOGV("native_set_dimension error: %s", strerror(errno));
return FALSE;
}

mCameraControlFd is a /dev/msm_camera/control0.

So by my opinion problem is from kernel side or wrong parameters. It will be good, if someone will compile kernel with debug info. (MSM_CAMERA & general debug).

Probably backporting kernel 3.0 will help, but not sure
[Galaxy Ace S5830 Android Development] djsky2011:
Not a bad idea, a kernel with better debugging capabilities could give us more insight into what the exact problem is. We are close but could take a bit of work
[Galaxy Ace S5830 Android Development] BRainXstorming:
i have no ideas what you devs are talking about but you make a good job .!

GO DEVS GO DEVS !!!

I am very sure that you solve the problem!

Dont give up! I believe in you!
[Galaxy Ace S5830 Android Development] InverseSandwich:
Two BBQs on one weekend! :D

You having a street party?
[Galaxy Ace S5830 Android Development] KcLKcL:
This may not help at all but, these HP Touchpad devs also experiencing SIGFPE problems

http://rootzwiki.com/topic/16347-dev-ics-camera-hd-video-hw-acceleration-fix/page__st__70

Wait, linking to other forums is allowed right?
[Galaxy Ace S5830 Android Development] Lijop:
@wayland still is the cam partially working for you ?

---------- Post added at 08:14 AM ---------- Previous post was at 08:10 AM ----------

for fixing the sigfpe error use this

http://review.cyanogenmod.com/#/c/10249/

This patch avoids a division-by-0 when the system is running

under emulation (the kernel driver reports pixclock as 0, for some reason.

Which results in a SIGFPE during the boot sequence.
[Galaxy Ace S5830 Android Development] marcin1147:
Won't help.
[Galaxy Ace S5830 Android Development] Lijop:
Why won't it help?
[Galaxy Ace S5830 Android Development] lagloose:
Couldn't do more tests yesterday.. Anyone tried 3'rd Party Camera or other media_profile.xml ?
[Galaxy Ace S5830 Android Development] Wayland_ACE:
It's possible to build bionic with DEBUG_BIONIC_LIBC flag. Probably it can help to find out where SIG(SENV|FPE) are throwns...

Marcin, can u build for developers special debug rom? (Kernel debug + bionic debug). I think it can help us
[Galaxy Ace S5830 Android Development] NiiSyth:
Ok I'm a n00b here who can just flash ROMs and edit bulid.prop;

but I can help with the testing....

That's the least I can help for porting ICS to our beloved ACE....:) :)
[Galaxy Ace S5830 Android Development] cjlallana:
I know quite a bit about C on OS's, and quite a bit of assembler, but I have never worked for Android. If you give me a source code to work on and a few weeks, I'll do whatever.
[Galaxy Ace S5830 Android Development] lagloose:
I need latest device config files for cooper. Marcin could you uplod to github?
[Galaxy Ace S5830 Android Development] themountig:
Tried files from preview working thread on Gio dev page. No luck but maybe it identifies better the libs involved with camera. Seems to be that Media_Policy.XML needs fixing for our specs. Is anyone able to do that?
[Galaxy Ace S5830 Android Development] lagloose:
Hmm, stiil facing:

E/HAL ( 145): load: module=/system/lib/hw/camera.cooper.so

E/HAL ( 145): Cannot load library: link_image[1965]: 145 could not load needed library 'libcamera.so' for 'camera.cooper.so' (reloc_library[1314]: 145 cannot locate '_ZN7android7Overlay5setFdEi'...

Command: strings -f *.so | grep _ZN7android7Overlay5setFdEi

gave me

libcamera.so: _ZN7android7Overlay5setFdEi

libui.so: _ZN7android7Overlay5setFdEi

so i put your libui.so to /system/lib. Bur afterwards i cannot restart mediaserver.

W/AudioSystem( 322): AudioPolicyService server died!

E/AudioService( 322): Media server died.

I/ServiceManager( 322): Waiting for service media.audio_flinger...

I/ServiceManager( 322): Waiting for service media.audio_flinger...

I/ServiceManager( 322): Waiting for service media.audio_flinger...

I/ServiceManager( 322): Waiting for service media.audio_flinger...

I/ServiceManager( 322): Waiting for service media.audio_flinger...

W/AudioSystem( 322): AudioFlinger not published, waiting...

I/ServiceManager( 322): Waiting for service media.audio_flinger...

I/ServiceManager( 322): Waiting for service media.audio_flinger...

I/ServiceManager( 322): Waiting for service media.audio_flinger...

I/ServiceManager( 322): Waiting for service media.audio_flinger...

I/ServiceManager( 322): Waiting for service media.audio_flinger...

W/AudioSystem( 322): AudioFlinger not published, waiting...

I/ServiceManager( 322): Waiting for service media.audio_flinger...

It does'nt make a difference if i use original libbinder.so or your new libbinder.so. I'm on Maclaws release from 13.05.2012 not on the latest nigtly. Is there any difference in the libs between this releases ?
[Galaxy Ace S5830 Android Development] Lijop:
@lagloose did you try the hal from rapmv78. he says with slight mod it should work on all qualcomm devices

http://xdaforums.com/showthread.php?t=1427030
[Galaxy Ace S5830 Android Development] lagloose:
Unfortunately this shouldn't work because Nexus One, HTC Desire etc. have armv7 architecture while we have armv6. So libs will probably not work...
[Galaxy Ace S5830 Android Development] Lijop:
ya i know that but a doubt does hal have anything to do with architecture ?? even though if it has something to do why dont we pull the libcamera.so and liboemcamera.so from his work and try ??
[Galaxy Ace S5830 Android Development] KcLKcL:
I think so, just like Windows 32 bit drivers won't work on 64 bit and Vice Versa. HAL, if I remember correctly is the base for (almost?) all hardware in Linux
[Galaxy Ace S5830 Android Development] Lijop:
These are the files from his rar files and qsd8k belongs to their mobo, think we can take the last two

boot-new.img

Camera.apk

camera.qsd8k.so

libcamera.so

liboemcamera.so

For debugging

am start -n com.android.camera/com.android.camera.Camera

it will help to debug camera. We can run process from adb shell and then connect with some debugger and check what is going on.

cam works like this:

Application(Camera.apk) -> Library(libcamera.so) -> HAL -> Kernel(zImage) -> Hardware(MSM7xxx)

The problem with the camera is probably caused by the kernel and/or HAL parts of schema (everyone knows this, just posting)

am not a dev just trying to help with what i can.:(