yashsingh1/xdaforums huggingface dataset:
[Desire Android Development] andycted:
How did you manage to strace ? I always get a permission denied with the one I have.

[EDIT] nevermind, got it
[Desire Android Development] eViL D::
k900 is on the right track. I said this in my previous posts. The framework is totally different. It's not going to be a matter of swapping out files. Actual changes are going to have to be made.
[Desire Android Development] andycted:
Pardon my obvious ignorance, but instead of taking the framework and modifying it, wouldn't it be enough to adapt the kernel to work with the DHD framework, libs and apk ?
[Desire Android Development] willumpie82:
Hi, very nice initiative to combine al the dev experience on this forum to solve this issue

I have little experience with embedded linux (no android dev), but would like to contribute with the following ideas

can we hook something to the camera driver that cats the initialisation of the desire HD camera driver (you probably would need the original phone) and compare this to the initialisation of the desire 5MP camera.

another option, probably somone tried this already, replace the d'HD cam driver and app with the one from the desire.
[Desire Android Development] erto90:
ouch understood wrong,sorry:p no strace done

is someone need,i'll post a logcat while launching vignette.. ask me
[Desire Android Development] erto90:
this is a logcat launching vignette

coming
[Desire Android Development] eViL D::
Ahh, Ignorance is bliss. Can you kindly point me to Desire HD source?
[Desire Android Development] andycted:
Appreciate the sarcasm, but I was more suggesting modifying the existing Desire kernel in order to make it work with DHD framework, possibly getting pointers on what doesn't work from tracing and logging. Sorry if I've wasted your time with the suggestion.
[Desire Android Development] tobi01001:
Just wondering why you guys do not just write a simple App that tries to access the Cam from the android framework / sdk. Then you can catch the exception ( if any) and work towards step by step.

This way you probably don't have the overhead in the logs..!

/edit: you could even debug the code. Of course just as long as you are on java level and as long as source code is available...
[Desire Android Development] Beaverman20:
that was actually a somewhat good idea :D tho i don't know if it is possible :(
[Desire Android Development] Jeffdeaf:
The first thing that popped into my mind while reading this is this:

New phone, new camera, new options, new software?

Why is everybody looking for what's missing when you have a bunch of new attributes.

There is nothing missing. Something was added.
[Desire Android Development] Dragooon123:
So you're saying that because something was added, things screwed up? I beg to differ but that logic does not prevail, because if something was added, the old software would simply not care about it. They'd just pass and would be ignored since those values would not be called. I believe something was changed which screwed things up.
[Desire Android Development] Jeffdeaf:
Combination of both i guess..

B/c,

the new software is looking for features it cannot find on the hardware.. will it work or fail, what do you think?
[Desire Android Development] andycted:
I think he either doesn't have a clue on what we're trying to do, or he's trying his hand at a very convoluted form of philosophy in the most wrong place ever

Edit: maybe I understood what you mean now actually. So it's the first case, we've already tried that way, right from the start,I can assure you that it's a lot more complicated. (WE being probably a wrong pronoun, since I'm only monkeying around, some other people are trying a lot harder)

Sent from videotext, using the remote
[Desire Android Development] Jeffdeaf:
" by default, the Desire camera sets itself to the max 5mp resolution on startup - if the HD rom is trying to set the camera to 8mp on launch "

Would this not mean that even BEFORE the apk's and software is loaded to run the camera, the camera set itself to 5 MP which would prevent the software from doing it's thing, no? This could explain the wierd camera errors in logcat.

and what about this:

10-11 04:47:29.274: WARN/HTCCamera(1817): $$$$$$$$$$$$$$$$$$$$$$$$$$$$$ surfaceChanged $$$$$$$$$$$$$$$$$$$$$$$$$$$ w=480 h=800

Do you realise that the pixel density on HTC Desire HD is SMALLER then that of regular desire?

Or am I completely clueless. Just trying to grasp some for you devs.
[Desire Android Development] andycted:
same happens for Z camera files

That line is the exact same you get in both devices (of course because they have the same resolution).

Pixel density shouldn't be an issue
[Desire Android Development] tickmaster:
Desire, Desire HD and Desire Z has same resolution 480x800. At least on HTC.com
[Desire Android Development] peppe.desire:
hi....excuse me for my ignorance but i want make you a question: is possible to edit a full working desire rom and insert into it all new features of the desireHD rom (this is new sense, new notify bar, new appearance ecc)???? i think that if this is possible you have solved the camera problem form the start. thanks
[Desire Android Development] andycted:
Porting everything from the DHD to the Desire, except for the camera, I think would be a very big task and could probably present more problems than just one (albeit quite important) like the camera. You would be basically doing pretty much a similar thing: trying to make applications work on a framework/libs on top of a kernel on top of a hardware - all of which aren't born together

No

Any suggestion ?
[Desire Android Development] Dragooon123:
I actually thought about that, but then realised in a minute that de-compiling frameworks/libraries to fit the new features of Sense 2.0 would be a mammoth task, not to mention almost impossible. If we replace the files then we are pretty much doing nothing.
[Desire Android Development] Jeffdeaf:
By the way...

Does pixel density have anything to do with orientation?
[Desire Android Development] Beaverman20:
that was the point i was trying to make :P as in STOP YELLING AT THEM :P

nope... pixel density, or PPI even DPI in some cases are how many pixels per square inch, no matter if it's vertical or horizontal :D the desire has 230, the desire "HD" has 200... thereby having the same amount of pixels, but being bigger :D
[Desire Android Development] Jeffdeaf:
Aight.. so when we port Desire HD to Desire we have bigger pixels on a smaller screen.

How will the camera handle this?
[Desire Android Development] dezborders:
So was my 8MP default resolution on startup idea was dismissed/disproved?
[Desire Android Development] K900:
Not yet. Smali is a hard thing, you know

Sent from my HDfied HTC Desire
[Desire Android Development] Beaverman20:
it won't care... pixels just reuire an "off" or an "on" signal... in both cases it need to control 384000 pixels, no matter how big they are...

the only diffrence is that the Interface will seem slightly scaled down, due to the fact that maybe 200 pixels were 1 inch on the Desire HD, is only 0.83 inches on the desire... :D
[Desire Android Development] azars:
Hi all,

Can't wait to try this out when it's done, is the only issue the cam?

What happens when we use the apk from the old desire and place it in the new zip?

Cheers,

Stu
[Desire Android Development] K900:
Wish it was that simple...

Sent from my HDfied HTC Desire
[Desire Android Development] dezborders:
No worries, just wish I could help out more...

I used to be a COBOL dev many years ago and found oh so few devs bothered to check the return code after a call... so if HTC lib says 8mp please but the dev did not check for success then the code issues multiple subsequent requests assuming cam initialized ok in first call... resulting in misleading log entries that don't mention the initial problem... u get my drift?

P.s. what's smali?
[Desire Android Development] Jeffdeaf:
That makes sense...

thank you for explaining! =D

I do feel theres something to that MP / resolution thing ....
[Desire Android Development] K900:
Screen resolution => same.

Cam resolution => drivers

Sent from my HDfied HTC Desire
[Desire Android Development] Jeffdeaf:
what does this line exactly do?

"10-11 04:47:29.144: VERBOSE/HTCCamera(1817): Initial Display Orientation: 0"

and why is it generating a error at the end?
[Desire Android Development] andycted:
Not too much :D hehe

.super Ljava/lang/Object;

.method public static main([Ljava/lang/String;)V

.registers 2

sget-object v0, Ljava/lang/System;->out:Ljava/io/PrintStream;

const-string	v1, "Hello World!"

invoke-virtual {v0, v1}, Ljava/io/PrintStream;->println(Ljava/lang/String;)V

return-void .end method

(just kidding)

Anyway, to clarify what has happened so far and avoid repetitions in posting (by the way, I'm not a dev, I'm monkeying around):

* Replace Desire camera apk in new HD rom -> No go

* As above + the main 4 libs for the camera -> No go

* Only the main 4 libs for the camera -> No go

* Replaced Desire Z camera apk in new HD rom -> No go

* As above + libs -> no go

* Replaced Only desire Z libs -> no go

* Mixed the two libs and apk -> no go

* Replaced stuff from HD/Z rom INTO normal Desire rom -> No go (in order to see if something worked and what didn't)

* Tried with other camera applications and the above combinations -> no go

* LogCat -> didn't offer a lot of information

* Took a normal Desire LogCat and compared to the one in the HD rom when opening the camera. You can see the comparison a few posts back, but doesn't say much

* *** Lots of tries in between (I think mainly done by the OP) ***

* The combination of files you see in the first post -> No go, but the camera application doesn't crash. Shows a black screen and doesn't work however

Also:

- Desire and DHD have the same resolution

- Pixel Density shouldn't have anything to do with anything

- The 8MPixel startup for the HD camera could be a problem, however I think that since a similar behaviour has been demonstrated with the Z camera (5MPixel), it could well not be the culprit...
[Desire Android Development] dezborders:
Sorry double post
[Desire Android Development] R.ik:
Has anyone tried running the desire HD camera app on a stock HTC ROM so far?
[Desire Android Development] K900:
Eek... Why?

Sent from my HDfied HTC Desire
[Desire Android Development] andycted:
Thank you, you just proved that my post above is useless when people don't read, but just write...

Sent from videotext, using the remote
[Desire Android Development] K900:
I understand what you mean, I just don't see much sense in backporting

Sent from my HDfied HTC Desire
[Desire Android Development] andycted:
Me neither but I've tried anyway to get some pointers and took the time to recap what has been tried in order to avoid what has just happened. (The usual Guy randomly posting without reading)

Sent from videotext, using the remote
[Desire Android Development] Mekrel:
The guy meant placing the Desire HD camera files into the standard Desire ROM which wasn't in your list.

Either way, I'm sure that wouldn't work, but maybe he wanted the new camera UI on the normal Desire. :)
[Desire Android Development] andycted:
Do we speak a different kind of English? See mid-list, it's there, marked with a big "INTO" ...

Sent from videotext, using the remote
[Desire Android Development] rolfd:
Can I just remind everyone that this thread was created to try and port the Desire cam to the HD rom.

It is NOT for asking for an ETA, not for asking where to find a ROM, not for asking questions about progress, not for telling the dev's to hurry up.... I'm sure you get the idea.

Please only post here if you have something positive to contribute to the thread, or something that is directly related to the cam port.

I'll try to keep an eye on this thread and will delete any off-topic posts to try and ensure the thread is kept clean and free for people to compare ideas etc. In the meantime if you see any OT posts then feel free to PM me or use the report a post button.

Thanks
[Desire Android Development] dezborders:
Excuse me if this has already been done...

1. Is it possible to unpack both the Stock Desire Radio and HD Radio images then copy ONLY the camera driver from HD radio to Stock radio and re-pack?

2. If step 1 is possible, then someone could save/export Camera user-prefs at 5MP on a Stock Desire ROM and copy the prefs file into an HD ported ROM?

Probably technically unsound, but hopefully all suggestions taken on face value. ;)
[Desire Android Development] ephumuris:
Would you be willing to flash a hacked/modified radio to your device that hasn't been tested? I'm not willing, there is a lot of things i will try however this is not one of them.

I like my Desire to be working and not a fancy paperweight lol.
[Desire Android Development] dezborders:
Would flashing a radio with only 1 file changed brick the Desire? (And if if did would re-flashing the stock radio un-brick it?)

I don't fancy a paperweight either but just want to offer suggestions on an area I don't think has been discussed so far. ;)
[Desire Android Development] Mekrel:
Apologies, my bad but there's no need to be sarcastic now is there? I wasn't derogatory towards you in my post, so have a little decorum.
[Desire Android Development] andycted:
I've never seen the 'interior' of a radio, but to the best of my knowledge no one here has the skills (if it's even possible) to decompile radio drivers, because otherwise we would have already seen it as it would have solved many other similar situations. Take for example those desperate for porting android to old devices, they have been stuck without camera for a similar problem for more than a year.

One other problem is that you can 'test' radios without bricking the device, which could also explain the above...

To the best of my little knowledge, it would be more important to have the kernel source for the HD and compare what happens there.
[Desire Android Development] iemand12:
I agree, that's a very risky thing to do, even if you just want to port the camera files there might be problems
[Desire Android Development] dezborders:
I wasn't suggesting decompiling radio drivers, and I also have not seen what files are inside them. I had hoped there would be a seperate driver file in the radio for each piece of hardware, and that only the camera one(s) could be transplanted into a stock Desire radio.

If I was (a) confident that the camera driver was the only changed file and (b) that I could revert to a stock radio if the modded radio didn't work I might even be willing to be a ginea pig for the team.
[Desire Android Development] ephumuris:
The thing is it COULD brick the Desire. It's just the possibility. I think if you flash a bad radio then that's it you're doomed. I have never known of a way of reflashing a radio after a brick from radio.

I think the radio boots first on the phone so if you flash a bad radio you can't enter hboot, recovery etc
[Desire Android Development] dezborders:
No worries, my lack of knowledge of linux and android OS structure is obviously showing!
[Desire Android Development] dezborders:
Oh, I assumed HBOOT was the first action on power-on.

Well in that case I withdraw my previous offer of being a potential radio-mod guinea pig! LOL
[Desire Android Development] ephumuris:
Haha yeah that's exactly why nobody is willing to mess with radio updates, you should never interrupt a radio update. The only way i know of fixing a radio bricked device is to send to HTC :eek:
[Desire Android Development] iemand12:
I am quite curious about the files in the radio image, because we don't need to modify the radio, just maybe compare the 2 radios, maybe that could give us a clue as to what is causing the problems, but nothing i use can decompile it, not even magicISO :eek:
[Desire Android Development] andycted:
My best bet is that, at the current state of things, the radio hasn't much to offer besides not being able to even "open it", since we are taking pretty much the old desire radio and trying to fit it into the new HD stuff. Kernel, libs and framework/dalvik stuff, when working together could provide the solution. Actually the kernel could even be left alone...

Sent from videotext, using the remote
[Desire Android Development] rolfd:
I made THIS post 2 hours ago, and I've just deleted 4 off-topic posts since.

Please keep this on topic.
[Desire Android Development] Shaizer:
Yeh that's the Geohot, what they mean by FAIL is that he released an unfinished buggy hack - if you try it you can end up with your App store and other things missing =S Anyways that's off topic. Camera on the desire has always been something linked to the radio - and messing around with that could end up with a pile of bricked desires :O I think when the actual Desire HD is released and rooted, there could be a way around the issue.
[Desire Android Development] Dragooon123:
But is it possible to de-compile and study the radio? This might help us identify where things are going wrong.
[Desire Android Development] divvet:
we are trying to port the htc camera to essentially another type of rom correct?

e.g sense to AOSP or sense to sense hd.

now it has already been achieved where the sense camera app has been ported to an AOSP rom on the Nexus 1.

wouldnt the best way to proceed be to look at the nexus 1 port,

see which files have been ported across, and which files were edited?

then wouldnt you be able to determine exactly what files/changes you need to get the camera working as essentially the nexus and desire are the same device?

sorry if this completely misses the point but ive had a few pints....

edit

i dont think the radio has any relevance in this as the rom links to a set of drivers on in the radio image. if the radio is a different version, the only difference would be is the drivers contained inside. the files them selfs shouldnt change. if they did when you switch between radios on the desire, if there was a difference in how they were structured, certain features would not work correctly?
[Desire Android Development] Beaverman20:
Yes it's an image file, but not an iso file in that regard, it may have the extension, but i do not think you can do like that ;)

I support this idea too :D
[Desire Android Development] jungoed:
Prolly need a custom radio
[Desire Android Development] divvet:
Again i really dont think the radio needs to even be considered in this.

As i said the drivers are the same... its the software communicating with the drivers thats at fault.
[Desire Android Development] Dragooon123:
If both the device's drivers are same, then how can the software communicating with the driver be at fault?
[Desire Android Development] andycted:
First: you can't develop/patch a radio and easily test it

Second: the problem is that the camera is deeply linked to some libraries, which are part of a framework where everything else is linked and at the same time is talking to the kernel. So you can't easily take one piece of one puzzle and fitting in the other.

Sent from videotext, using the remote
[Desire Android Development] divvet:
Edit - Misread your post.

ok i think your missing the point. i didnt say the drivers for the Desire and Desire HD were the same, i said the Desire drivers dont change from rom to rom so why would you need to edit the radio image?.

The software is what causes the issues.

e.g

Missing files

Application Calls pointing to the wrong location.

This is why we need to identify which system files the camera depends on, and porting these to the Sense HD rom.

I was just saying the camera drivers shouldnt be even looked at because they wouldnt have changed. Its only the system files that change from rom to rom.
[Desire Android Development] millab:
Yes, there is nothing wrong with our current radio. Basically when we are trying to run an HD ROM:

Our radio remains unchanged (same drivers we have always used, and definitely the right ones for our device)

ROM is from another device (so looking for different camera driver in the radio)

Kernel is from Desire HD (so looking for wrong drivers in the radio)
[Desire Android Development] TieT:
There is nothing wrong with the radio !

Its a fault in the software that calls the drivers.

reading this line

10-11 04:47:32.289: WARN/HTCCamera(1817): Unknown orientation !!!

Im thinking more in the direction of the g-sensor software, or the connection between the camera software and the g-sensor sofware.
[Desire Android Development] Beaverman20:
here is the huge thing, if we make our own radio, we would have to make our own drivers forvitually everyting. it is so much easier just chaging the kernel to fit the radio... rember that you don't flash the DHD radio when you flash the rom...

the radio already contains every single driver that our desire can run. so we don't need anything BUT the original desire radio, and a modded kernel to search for the drivers in the desire radio instead of the DHD radio...

and person above me, that is a warning, not a error, but as said before this happens with it working too ;)
[Desire Android Development] dergago:
Is there already a working port?

Can you link it?
[Desire Android Development] hamdir:
he meant we should direct our efforts to the desire nexus one ports like opendesire and cyanogen both which have stock android cameras working (with better 720p recording by the way) we should see how it was done on those ports
[Desire Android Development] thebishops:
Has anyone thought of looking at how the HD-2 Android ports work. There's versions that have the HTC (Desire) camera app and the Android camera app. Might give clues as to how to get the android camera app to work.
[Desire Android Development] andycted:
To the best of my knowledge:

The nexus one camera fits snugly into an aosp rom and since aosp framework is completely open, porting this stuff (the entire aosp framework, rom and camera) to another device is a lot easier than what we would like to happen here.

The htc camera fitted inside an aosp rom has been quite a feat, since you can see here in the desire section there are no aosp roms with htc sense camera. All the same, fitting that camera into something which you compile from zero (aosp framework) should be a lot easier than fitting it into a proprietary framework like htc sense, where you have to decompile stuff.

Sent from videotext, using the remote
[Desire Android Development] hamdir:
will the job get easier once we have the Desire HD kernel source (from HTC)?
[Desire Android Development] LazyFunker:
From what I've red, Yes.
[Desire Android Development] TieT:
K thx bro ;)
[Desire Android Development] andycted:
maybe, but by that time it could well be that htc has given the old desire the new sense...or that the world has ended in 2012.

Sent from videotext, using the remote
[Desire Android Development] Jeffdeaf:
Guys isn't this what your looking for? This is generating the "unknown orientation" error....
[Desire Android Development] K900:
Very, very improbable. It's in the camera app, but the problems are in the libs or radio, because no other app that uses camera works (QR readers, Google Goggles etc.)

Sent from my HDfied HTC Desire
[Desire Android Development] iemand12:
The orientation argument has been brought up twice now, first by me, why doesn't anybody read the previous posts, and everytime someone mentions orientation or radio, someone else comes and says no, without a 100% certainty, and before you know it were back to square one with absolutely no progress!
[Desire Android Development] LBTaylor1984:
tbh while i agre libs and radio are the likely problems, i think making sure the camera app is working fully maybe a good way to go as possibly the camera app isn't working correctly and all other apps cannot work with it. from what i read there is no image preview which suggest the camera and the phone have no idea what way round they are and causing the phone to display nothing.

I could be completely wrong, just my view on things.