yashsingh1/xdaforums huggingface dataset:
[Click Android Development] magisterrivus:
As i understand it, the libmm-test cannot access the physical memory where the thumbnail is buffered. But we somehow need access to that buffer to save the raw bit-map of the image/thumbnail to convert it to jpeg.

I'm not that fit with C/C++, maybe i am totally wrong. But could you send me a link to the source code you are using? And if possible your current development environment setup so i can compile on my own for testing.
[Click Android Development] bull500:
Thumbnails

Doesn't Thumbnail refer to small icon size picture that shows up in the gallery?

What if adjust the thumbnail resolution to a smaller scale helps?
[Click Android Development] :
I reinforce this thought. Looking at code and subsequent errors, it does seem that the whole problem is creating the thumbnails. And seriously, a 2055x2055 thumbnail? That makes no sense.
[Click Android Development] Opustenooo:
Yeah that sounds logical to me too. What is the size of thumbnails in stock 1.6? Maybe problem is just in way too large thumbnails?

Probably size should be 255 x 255 not 2055x2055.
[Click Android Development] marxo:
Maybe someone could compile this:

https://review.source.android.com/#patch,sidebyside,1776,1,libcamera/QualcommCameraHardware.cpp

Here the thumbnail is defined as a 512x384 image.
[Click Android Development] magisterrivus:
Any progress with the camera?

I'm currently trying to build CM on my own. After endless hours of downloading the source, it's taking forever to compile :eek:
[Click Android Development] arco68:
If you are running linux in virtualbox, make sure you have added more than 1 cpu to the system settings. I ran with only 1 cpu at first, and it took forever to compile. I have a quad core, so I added 3 in the settings to make it use 3 of the cores, and now it's much faster.
[Click Android Development] magisterrivus:
If only i had a Dual/Quadcore. I'm stucked with a SINGLE-Core @1,7GHz :o. Anyways, i'll let him compile overnight.
[Click Android Development] jigsaw956:
install linux in hard ... it will be much better :)
[Click Android Development] arco68:
Ah yes, then it's going to take a while. I think I was around 1,5-2 hours with compiling on 1 core on a 2.8GHz. With 3 cores it takes about half an hour. :)
[Click Android Development] aarat:
I am not sure about android but I do have a iphone aswell on which the thumbnails are the actual pictures.
[Click Android Development] :
From what I understand of iOS, they're not really thumbnails. They're just zoomed out pictures.

edit: Also, even it your theory were true, if the camera has a resolution of 2048x14xx why would it create a thumbnail of 2055x2055 (bigger than camera resolution)? Makes no sense.
[Click Android Development] KalimochoAz:
Of course it has no sense, this is why I post it to you in black letters. Still looking at what is failing in there. I will post it here as soon as I have the clue. Revising all the code is taking me a lot of time.
[Click Android Development] Muskelbaer:
wow now someone cooked an 2.2 rom with camera

maybe it can be help http://xdaforums.com/showthread.php?t=872668
[Click Android Development] dom_b:
You think? Its not working yet. Its just a first step.
[Click Android Development] TheSSJ:
At least it's a step in the right direction...a little more optimism!:D:D:D
[Click Android Development] dom_b:
I'm very optimistic! Just wish people would read!
[Click Android Development] manilu001:
any news about this section?
[Click Android Development] vura:
bump bump bump
[Click Android Development] mister_r:
Bump indeed!
[Click Android Development] dom_b:
search search search

read read read

read this...

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

and this...

http://translate.google.co.uk/trans...tp://www.htcmania.com/showthread.php?t=152653
[Click Android Development] sunitknandi:
please bump kalim instead and notify arco68 to continue with the camera project.
[Click Android Development] dom_b:
Latest code:

https://github.com/KalimochoAz
[Click Android Development] cn.fyodor:
Hi, seg

That's an interesting querying function. I'll try it later. Thanks. :-)

I've traced the EGLConfigChooser function in source GLSurfaceView.java, found that if the (8,8,8,8,0,4) was set, num_config would __always__ be return as 0. It's only software business, not hardware. I doubt why other devices(Sapphire or Dream) could start the camera successfully and Tattoo couldn't. I also noticed that the last argument(stencil size, here 4) of setEGLConfigChooser was set to 0, num_config would be return as 2. Therefore, 'No configs match configSpec' issue disappeared.

Regards,
[Click Android Development] aarat:
Awesome work Fyodor... !! You and ixkdf are superman of Tattoo Development ;).. we know you can do it !!

Cheers!!

Edit : Forgot to say thanks to seg...
[Click Android Development] toushiro:
do you mean thaf we won't be able to use camera?
[Click Android Development] .dot:
I think/hope he means the opposite
[Click Android Development] TheSSJ:
Maybe you guys should ONLY contribute if you have some useful information. Please don't fill this thread with thank you posts.
[Click Android Development] Albenejean:
Hi fyodor.

Have you tried the setEGLConfigChooser(bool needDepth) function, which seems more generic than the others?

see here:

developer.android.com/reference/android/opengl/GLSurfaceView.html#setEGLConfigChooser%28boolean%29
[Click Android Development] dront78:
Here is my cent - HTC use rgb 16,0,16 black color to show camera on window context in win mobile and probably on latest palm. May be they did something like that on android
[Click Android Development] cn.fyodor:
Thank you, guys. I can confirm the setEGLConfigChooser issue shouldn't be the key problem to keep the camera from working. I'll work on the camera issue again as possible as I can.
[Click Android Development] ralle.gade:
What about sharing the libs u have modified from dream? So we all can try and sort this mess out :-) bro
[Click Android Development] spartm:
hi cn.fyodor,

I tried compiling the kernel source but got the following errors:

CC kernel/sched.o
In file included from kernel/sched_bfs.c:309,
from kernel/sched.c:4:
kernel/sched_stats.h: In function 'show_schedstat':
kernel/sched_stats.h:30: error: 'struct rq' has no member named 'yld_both_empty'
kernel/sched_stats.h:31: error: 'struct rq' has no member named 'yld_act_empty'
kernel/sched_stats.h:31: error: 'struct rq' has no member named 'yld_exp_empty'
In file included from kernel/sched.c:4:
kernel/sched_bfs.c: In function 'scheduler_tick':
kernel/sched_bfs.c:2221: warning: unused variable 'cpu'
kernel/sched_bfs.c: In function 'preempt_count_equals':
kernel/sched_bfs.c:6447: error: implicit declaration of function 'rcu_preempt_depth'
kernel/sched_bfs.c: At top level:
kernel/sched_bfs.c:6452: error: conflicting types for '__might_sleep'
include/linux/kernel.h:126: note: previous declaration of '__might_sleep' was here
kernel/sched_bfs.c:6478: error: conflicting types for '__might_sleep'
include/linux/kernel.h:126: note: previous declaration of '__might_sleep' was here
make[1]: *** [kernel/sched.o] Error 1
make: *** [kernel] Error 2
[Click Android Development] cn.fyodor:
Hi, spartm

These errors should not come up if you didn't set CONFIG_SCHEDSTATS and CONFIG_DEBUG_SPINLOCK_SLEEP. Did you compile the kernel with my .config file?
[Click Android Development] obasio:
-sorry----------
[Click Android Development] obasio:
Hello guys!

I had replaced many lines of code from libcamera.so (hex-code importet from v.1.6) & libqcamera.so (hex-code importet from lib-mm-qcamera-tgt.so /1.6)

pushed them into my device and rebootet.. everything fine..

camera takes a lil bit longer (arround 2-3 seconds) to switch from camera to camcorder.. and always the same damn copybit error, anyone an idea how to solve this problem, without compile the whole kernel?

-current rom: pencake 1.06 with copyit.msmk7.so from cn.fyodor 0.71.

and with sleek camera.apk i get an green screen :D
[Click Android Development] cn.fyodor:
Awesome work! dude. :D

I'll upload a copybit-fixed alpha ROM for devs in my ROM release thread several minutes later. You may replace copybit.msm7k.so with that one and then test your libcamera again. Please note the interface for libcamera changed from /dev/msm_camera/msm_control0(stock ROM or pancake) to /dev/msm_camera/control0(my v0.7.2.x series ROMs).

EDIT: Would you like to share the lines you replaced with us? Thanks.
[Click Android Development] pinguinjkeke:
fyodor, if kernel issues with camera are fixed, what are we need to take photos or videos?
[Click Android Development] obasio:
Replaced the whole /system/lib/hw/ folder with your files, copybit error don´t come anymore :)

the only problem is now a error in lib surfaceflinger..

i´m think the problem is in libqcamera.so / libcameraclient.so

need to import these lines correct from libqcamera (my modded one)

(open libqcamera in hex-editor an go to lines between)

2DA4 - 65E2

to libcameraclient.so..

but its not easy to find the correct lines Oo
[Click Android Development] obasio:
hrhr.. i´m think when i can fix the problem with libcameraservice.so

maybe it can work :)

i´m very close to fix it -- after studying many crapy hex code :p

there are minimal differences between libcameraservice.so 1.6 and libcameraservice 2.1..

my other 2 files seems to be "hacked" correctly, the only error is a hardware teardown, cause of a invalid cameraservice, when i use THE ORGINAL files i´ve receive many more errors
[Click Android Development] cn.fyodor:
Camera app calls the framework libcameraserver library, which will calls the libcamera.so and libqcamera.so or something like that. The latter two libs then trap in to camera driver in the kernel and back to userspace. That's the raw process of camera working. (correct me if I'm wrong)

So if the kernel is ready, we should test the libcamera with ioctl function(libcamera2 used it) to communicate with the kernel until camera works.

A bit strange. My copybit fix relied on the kernel implementation, not the single copybit.msm7k.so library. If you just copied the libs, copybit couldn't be fixed, I think.

Really hard work to hack with the hex codes, hah. Nice work, go, dude. If you have any problems, just feel free to let me know. I'm hoping for the surprise. :)
[Click Android Development] spartm:
I used the msm7225_defconfig and they were already set in there. I did a diff b/w yours and the msm7225 one and there were lots of differences. Anyway I pulled the source again and just did a make and it built fine.

I flashed it to my Tattoo and in the morning battery was flat... :(

...anyway I'll have a play around with it a bit more.
[Click Android Development] dakdroid:
You should take a look at why this emptied your battery that fast. I doubt it would empty the battery only by a looping function (would it?), maybe the cam was active already...
[Click Android Development] spartm:
hmmm.. i did try to start the camera and I think I read somewhere that the camera process doesn't shutdown properly in this rom...?

that could explain why my battery ran out.
[Click Android Development] toushiro:
sorry using HCDR.rom data's folder doesn't contain anything for a reason I ignore... if you could give me some other instruction, I could try.
[Click Android Development] obasio:
hi!

i need the camera files stored in:

/sys/devices/virtual/msm_camera <- this folder is empty in pancake

/sys/android_camera <- contains only the file "sensor"

/system/lib/ <- anything with camera and htc

thx!
[Click Android Development] _david_94:
Here's sensor from /sys/android_camera: http://www.megaupload.com/?d=MG6QYWLE

msm_camera is weird:

"power" folder contains a file called "wakeup":

http://www.megaupload.com/?d=JRQDVU5O

And here are contents of /system/lib/ (there was also a folder called bluez-plugin but I don't think it has anything to do with the camera. If you need it ask me):

http://www.megaupload.com/?d=U041X1BK

I'm using fydor's ROM (see signature).
[Click Android Development] obasio:
thx i will test it!

can you look at /sys/class/ ?
[Click Android Development] _david_94:
msm_camera just contains a "link" to msm_camera0 that contains /power/wakeup I uploaded just now
[Click Android Development] obasio:
same error.. maybe anywhere a camera class file?
[Click Android Development] _david_94:
What could it look like? Are where could I look for it?
[Click Android Development] obasio:
hey! sorry 4 late reply, couse holidays over!

found the missing file :)

/com.android.camera_preferences.xml

camera app starts, i can see the camera icon, after 2-3 sec FC, couse i need the correct prefs.. so hurry up :D i have a reaaaaaly gooood feeling :D

edit:

/data/data/com.android.camera/shared_prefs/com.android.camera_preferences.xml

can anyone with 1.6 upload this file?
[Click Android Development] zzndroid:
here it is (from the original HTC 1.6 Rom).

Thank you guys for your work :)
[Click Android Development] glob30:
Here is the file content from an HCDR Rom (enhanced 1.6 version)

<?xml version='1.0' encoding='utf-8' standalone='yes' ?>

<map>

<string name="pref_camera_contrast">5</string>

<string name="pref_capture_resolution_contact">CONTACT_STYLE</string>

<string name="counter_imagefolder">100</string>

<boolean name="pref_camera_auto_focus" value="true" />

<string name="pref_camera_iso">_auto</string>

<string name="pref_camera_shaprness">10</string>

<string name="pref_capture_format_image">jpeg</string>

<string name="pref_camera_capture_quality">_super</string>

<string name="pref_camera_white_balance">auto</string>

<boolean name="pref_camera_geo_tagging" value="false" />

<boolean name="pref_camera_record_with_audio" value="true" />

<boolean name="pref_play_shutter_sound" value="false" />

<string name="pref_camera_effect">none</string>

<string name="pref_camera_brightness">4</string>

<string name="pref_camera_self_timer">none</string>

<string name="pref_camera_saturation">5</string>

<string name="pref_capture_resolution_photo">THREE_MEGA</string>

<string name="camera_capture_mode">camra_capture_mode_photo</string>

<string name="counter_image">1</string>

<boolean name="pref_camera_timestamp" value="false" />

<string name="pref_capture_resolution_video">QVGA</string>

<boolean name="pref_camera_review_duration" value="true" />

<boolean name="pref_grid" value="false" />

<string name="pref_capture_format_video">mpeg4</string>

<boolean name="pref_camera_image_ratio" value="false" />

<string name="pref_camera_metering_mode">_center_area</string>

<string name="pref_camera_recording_limit">unlimited</string>

<string name="pref_flicker_adjustment">_auto</string>

<string name="pref_camera_storage_location">main_memory</string>

</map>

Hope it can help.
[Click Android Development] francians:
seems the camera can't be unlocked..

I/dalvikvm( 1390): Could not find method android.hardware.Camera.unlock, referen

ced from method com.android.camera.CameraThread.start_video_recording

maybe just because is not locked or because of a missing class.

just a strange thing..

shuldn't be: com.android.HARDWARE.Camera ?
[Click Android Development] obasio:
or maybe an issue with

I/dalvikvm( 1390): Could not find method android.app.KeyguardManager.keyguardIsS
howing, referenced from method com.android.camera.HTCCamera.onResume
[Click Android Development] obasio:
can anyone with 1.6 post me the files from /system/xbin/ ?
[Click Android Development] cn.fyodor:
time to reverse engineering frameworks

Hi,

HTC might implement the Donut framework to work properly with its libcamera library. That's one of reasons why we ported this or that but always no joy. Actually, I've ported the camera driver interfaces for Wildfire kernel to Tattoo kernel and used those camera libs on Tattoo, the camera couldn't work either. Since Wildfire has the AF enabled camera with 5MP and the drivers for both are much different, I came back and sticked to HTC stock kernel, which at least drived the hardware correctly. It's very hard to port the libcamera and the kernel without knowing framework implementation.

Therefore, just a thought, if we wanna hex-edit the libcamera, you should also do some reverse-engineering work for frameworks on HTC Donut ROM.

Good luck
[Click Android Development] baltahakki:
well im not so bad with programming.. and my tattoo is in guarrantee so i dont wanna rish it and get in with those mod things but in 2-3 months i believe i will lol

err i install GPhoneManager app and looking files from file explorer and theres no 'xbin' folder but 'bin' folder in 'system' actually.. but i think its app's failure maybe theyre hidden or sys files so.. can u just explain me howto see and copy those files? if you tell me, i can give u the whole original vodafon's files so you can examine it.. an app.. or a way.. i dunno if it helps tho..
[Click Android Development] Jack Hair:
@baltahakki

Androzip shows all hidden files.

@obasio

Here you go
[Click Android Development] fredericlb:
Just like baltahakki i can't find any /system/xbin folder even if i browse my phone with androzip or the terminal emulator (ls /system/* or .* )
[Click Android Development] Jack Hair:
Hmm perhaps it depends on the ROM you use. I'm using HCDR 1.4 atm. Not sure though I'm still learning about Android myself.
[Click Android Development] fredericlb:
I have an out of the box HTC tattoo from bouygues telecom (france) so I do not use any custom Rom
[Click Android Development] panwato:
i found Pulse Mini TMO source code.rar, and yes, it's 2.1

Source code Pulse 2.1:p

But i don't know what to do with this...
[Click Android Development] JoOoSs:
Sorry bug. :/
[Click Android Development] madsurfer1:
I think that pulse mini and htc tattoo have the same camera, if so, this is great news, its just a matter of porting the pulse rom to the tattoo.

I do hope some dev picks this up and make magic happen
[Click Android Development] dawn2k:
It seems they have a different camera. Pulse has auto-focus.
[Click Android Development] madsurfer1:
I has under the impression that tattoo had also auto-focus:

http://www.letsgomobile.org/en/cellular/2033/htctattoo/
[Click Android Development] francians:
Is fixed focus..
[Click Android Development] madsurfer1:
Ok didnt knew that, anyways it would be so cool if the drivers were compatible, I wanna ofer a tatto for my wife, and i would like it to have froyo
[Click Android Development] _david_94:
What, you mean buy a Tattoo? No no no don't do that!
[Click Android Development] HCDR.Jacob:
Get a wildfire
[Click Android Development] madsurfer1:
YeaH I know, wildfire is much better, but my wife only likes the tattoo for some stupid reason :s
[Click Android Development] toushiro:
you got a wildfire? LOL lucky, I have not enough money to buy:(

just wanna know if it can take good pics and if it has an autofocus?
[Click Android Development] HCDR.Jacob:
I don't have one xD
[Click Android Development] toushiro:
LOL haven't seen quote XD and when I read it I tough immediatly that you have one :)

have to pay attention before I write something ^^
[Click Android Development] _david_94:
This is getting pretty OT
[Click Android Development] HCDR.Jacob:
It really is. Anybody managed to fix camera while we've been having a pointless discussion? xD
[Click Android Development] Jekkaman:
Did any one check this tutorial

http://xdaforums.com/showthread.php?p=7191267#post7191267

Might be helpfull.
[Click Android Development] batusaix911:
My 2 cents

Ok, I dunno if this is of any help but the lower end samsung galaxy .. which costs about 13K INR also has the same camera specs as a Tattoo .. 3.2 MP with no autofocus.

Maybe we could get the drivers from that phone and help fix the Tattoo's problem?

Btw, that phone has Eclair as well ...
[Click Android Development] dawn2k:
Can you please tell what phone you are talking about? Galaxy 5 has 2MP camera, and Galaxy 3 has autofocus.
[Click Android Development] batusaix911:
Honestly, I have no clue .. My friend bought the phone and told me there was no autofocus. If that is indeed the case, I will post ASAP.
[Click Android Development] Aaroneke:
I hope this topic doesn't die...

All i can add to it, what if the i2c address/frequency/timing is wrong, cam seems to be loading fine, but it may use an other settings to do so. I can't find any usefull information about the "msm_i2c.0;error 63c8

(i'm not a dev,....just trying to help)
[Click Android Development] cn.fyodor:
I've enabled the debug(LOGD) message of libcamera.so library. If someone needs this library, check out attachements.

Currently, I only get a black frame without any preview pictures while starting Camera app. logcat and dmesg from kernel seem good and don't contain any fatal errors. I upload them here and hope it will help you debug camera issue.

PS, please take setEGLConfigChooser(5,6,5,0,0,0) for Camera app as am example.
[Click Android Development] Jekkaman:
fyodor if you check your dmsg in from line 342 you'll see this:

<6>[ 215.033447] msm_camera: send adsp command = 2

<3>[ 215.033599] adsp: module VFETASK not enabled before write

<6>[ 215.033935] msm_camera: msm_ioctl_config: cmd 5 DONE

<6>[ 215.034118] msm_camera: msm_ioctl_config: cmd 6

<6>[ 215.034484] msm_camera: msm_get_stats: timeout -1

I think it's supposed to be something like:

adsp: module VFETASK has been registered

If you check this post:

http://xdaforums.com/showpost.php?p=7686021&postcount=62

You'll see that's related to camera problems, can it be it?

Sorry if my help is useless just trying out.

Keep up the good work buddy :)
[Click Android Development] cn.fyodor:
My fault. Can't believe i missed the VFE error. Certainly it was an issue related with camera driver. I'll dive into the kernel to find the low level reason. Thanks for your info.
[Click Android Development] ser1993:
with that we can solve our problems??...
[Click Android Development] Jekkaman:
I'm not aware of the entire functioning of the hardware and kernel but by looking here:

http://androidhtc.git.sourceforge.n...in;h=22d3bcc91299c5af563d18cb345cfbf25ee23c34

I can see the function returning the error i told you before:

static struct msm_adsp_module *find_adsp_module_by_name(

@@ -301,7 +300,8 @@ int msm_adsp_write(struct msm_adsp_module *module, unsigned dsp_queue_addr,

if (module->state != ADSP_STATE_ENABLED) {

spin_unlock_irqrestore(&adsp_cmd_lock, flags);

-	pr_err("adsp: module %s not enabled before write\n", module->name);

+	pr_err("adsp: module %s not enabled before write\n",

+	module->name);

return -ENODEV;

}

dsp_q_addr = adsp_get_queue_offset(info, dsp_queue_addr);

@@ -803,8 +803,8 @@ static int msm_adsp_probe(struct platform_device *pdev)

int rc, i;

And what is weird is that this code referes to the audio part:

" msm: adsp: kernel side dsp drivers for audio, packet verification"

I don't see how that interferes with the camera, unless the driver is loaded in case you want to switch to video recording and the driver is already loaded.
[Click Android Development] cn.fyodor:
This patch did nothing useful.

I just got a black frame. If I switched to video recording, the system freezed very quickly. Anyway, thanks, man. :)

[REQUEST]I need a tester to send me camera logcat from DONUT and dmesg from camera debug enabled kernel. If you're running my v0.6.4.2 ROM, a boot.img for it has been attached here. Thanks.

EDIT: upload the wrong attachment(boot.img). Please check there
[Click Android Development] salva.tejero:
how can i flash this boot.img?
[Click Android Development] Jekkaman:
via adb flash_image boot /sdcard/boot.img if you have the file on the sdcard.
[Click Android Development] salva.tejero:
thank you, i'm going to try it
[Click Android Development] cn.fyodor:
Thanks, man. Here is the original boot.img extracted from my v0.6.4.2 ROM. If something goes wrong, flash it back please.
[Click Android Development] salva.tejero:
ten minutes please
[Click Android Development] salva.tejero:
how can i make a dmesg?

Sorry camera app works fine
[Click Android Development] Aaroneke:
adb shell

dmesg
[Click Android Development] salva.tejero:
Hello that are dmesg logs
[Click Android Development] NForce25:
What could this patch possibly do? It changes absolutely nothing