yashsingh1/xdaforums huggingface dataset:
[Desire Android Development] BlueVD:
I've just spent the last hour reding docs on the Dalvik VM... I've also taken a look at the framework and it would most certainly need some work (that's where I get the Surrious interrupts from). However I seem to be stuck as I don't know if there's any way to reverse engenieer the dex file and then recompile it. And just hex editting is out of the question (since the DEX file isn't as easy an neat as opcodes). :(

Anybody have any sugestion?

[EDIT]

And yes, this seems to be the last mod needed to get the cam working (at least for market cam apps, not sure the default HD cam app will run nor the old cam app since the HD one has a fix for 8mp and the old one requires the old framework...)
[Desire Android Development] ownhere:
Thank you.

google search for 'baksmali', which be able to decompile .dex to .smali.
[Desire Android Development] hamdir:
blueVD thanks for all your hard work, just few thoughts on what you said

regarding the old cam app, well the Enomthers patch allows the standard htc desire cam to install on a nexus AOSP rom, surely his work can help enabling it on our own hardware (i've attached the patch file just in case)

another thing, is what your doing specific to HD roms? can't we run it on Z roms? you said the HD cam is fixed at 8MP but the Z cam is 5MP

to be honest i think porting the cam to Z roms is much more suitable for our device, better keyboard size, better font size and 5MP cam, some people are saying its smoother too and we have the kernel source
[Desire Android Development] perettigiuliano:
ownhere u r gr8!

great suggestion!

Don't you bluevd?
[Desire Android Development] BlueVD:
The camera app depends on the framework. If I'm right we *might* be able to use both cams (though the one from the HD Sense will need some tinkering).

Porting the cam from Desire to the nexus is not exactly the same as porting the HDSense cam (different cases, different problems)[EDIT]It does seem to be related to libs and binaries too, but I wouldn't stake my cam on them being compatible with the SenseHD. Unfortunately we reached this conclusion the hard way =)[/EDIT]

As to the general idea, I'm not doing anything to the HD cam or the Desie Z. I'm just trying to make the camera interface work (to be able to use it with apps like Barcode scanner). If or when this gets done, anybody can have a go at getting whatever app to work as the main cam app. And it's not a problem of kernel source...

Thanks a lot.
[Desire Android Development] ephumuris:
Yeah baksmali will do the job. Once recompiled just insert the .dex back into the .apk, don't extract and re-zip/apk it.
[Desire Android Development] perettigiuliano:
Are you meaning to put it back using winrar or stuff like that?
[Desire Android Development] Beaverman20:
Yes he is.
[Desire Android Development] HC4Life:
So after that, camera can be installed separatelly as apk file?
[Desire Android Development] BlueVD:
Here's a quick vid of the camera working... Sorry for the quality, I've done it using a laptop cam and it was enoying trying to adjust the lid at the propper angle...

You can see the Personalize menu at the start (just to proove it's SenseHD) and the skin is metallic :)

the console command was awb_camera

[YOUTUBE]ztPACtOgMaI[/YOUTUBE]
[Desire Android Development] BlueVD:
Nope... The cam works now but that program is a native binary (executable). The apps use the Dalvik VM (and thus the framework) to access the camera. Right now I'm working on the framework to fix up some stuff and then it's done :)
[Desire Android Development] K900:
No. That was raw streaming, but we still need someone to fix the framework

Sent from my HDfied HTC Desire
[Desire Android Development] BlueVD:
Nope... The cam works now but that program is a native binary (executable). The apps use the Dalvik VM (and thus the framework) to access the camera. Right now I'm working on the framework to fix up some stuff and then it's done :)

[EDIT]

Sorry, double posted due to my crappy net conn. Hopefully, by tomorrow I will have the framework too and then, update.zip :)
[Desire Android Development] BlueVD:
If the framework is the same, it would work. I'll take a look tonigh to see if this is the case.
[Desire Android Development] pack21:
@BlueVD,

We appreciate your work in this project, and all HD2 people have the eyes in your work.

Here are some regards, from HD2 people.

xdaforums.com/showthread.php?t=814058

Thanks, one more time.

:D
[Desire Android Development] BlueVD:
Look at the sigs... No donations needed. I'm in it for fun and to learn the inner works of android. Please, keep the thread CLEAN. You can thank all the people involved in it when there will be a release =)
[Desire Android Development] NeoPhyTe.x360:
Interesting ...

Good work
[Desire Android Development] pulser_g2:
To re-iterate what BlueVD said, please DO NOT post random thanks or spam in this thread please. Such posts have been removed.

It's a development thread, for the developers to discuss solutions and fixes in. Posting thanks and other "useless" posts is just making it harder for them to find what they need and get the job done.

Please take any thanks posts, user questions, and random chat over to http://xdaforums.com/showthread.php?t=814188

Any further non-development posts will be deleted without notice. Repeat offenders will be warned by PM.

@Devs, keep up the good work :)
[Desire Android Development] K900:
Whatever BlueVD releases, it will never be an apk, cause this is about the kernel. By the way, BlueVD, why don't you upload the source somewhere, so other devs can help you and GPL is preserved?

Sent from my HDfied HTC Desire
[Desire Android Development] ephumuris:
I thought it was about the framework not the kernel?

Eph.
[Desire Android Development] Frozen-GPU:
I guess the framework has to be changed to implement the right kernel ?!

But nice work from BlueVD. You have to be ill to get good solutions on problems I guess :D
[Desire Android Development] BlueVD:
Well, first of all, I've already released the libs and binaries in a previous post (the one with the screenshot, not the video). Right now I'm working on the framework. And it is GPL since most of the things I've done is to recompile allready published source code. What I did modify are some files needed to build the Androis Os (taken from nexus one and adapted for the bravo board), not the kernel and I'll publish them soon. Just so that you know, I'm not keeping anything under "wraps". All the work I've done so far is with the help of google, readme files and comments on xda. Guess than in short it's something in the borderlines of RTFM. The framework is the toughest sob but with the subtle hint from ownhere I'm making some advances here also. I don't want to give false hope, but a release should come soon. It's moving slowly because of my job and the sleep depravation :) not to mention my old laptop running a dozen tasks and a VM. :)

Keep you posted on my progress.

PS: video recording might not be able to record sound in the first release (since there's somewhat of a rush to get the photo capabilities). The audio part of the framework will take some serious modding.
[Desire Android Development] BlueVD:
Ok folks, another status update: had 3 frameworks so far, 2 fc'd and one didn't do anything at all. Right now I'm having one of my servers reinstalled in order to compile android to produce a custom framework. This one will be compiled with all the required stuff in it so it should work. As to sound recording in the video, chances are we're getting it too! It will take a few more hours to get the framework compiled, but please bear with me.
[Desire Android Development] Araz Fazal:
Instead of modifying code wouldn't it be possible to take the original camera app on the original desire ROM and statically compile all the dependencies into camera app enabling it to run on its own in a compartmentalised state?
[Desire Android Development] BlueVD:
Not really. Because then you'd have to get the cam app to run native binaries to go over the framework. And by doing this you'd only fix that app, all other apps still wouldn't work since they depend on the framework.
[Desire Android Development] HC4Life:
Hi,

And after u finish to compile framework we can flash it as an update.zip file via recovery?
[Desire Android Development] fllash:
Out of curiosity, will the sound recording (should it be present) still use the low quality AMR codec? If so, what kind of magic tricks would need to be done in order to change it?

Josh.
[Desire Android Development] NeoPhyTe.x360:
And why dont you put here your libs, and your stuff, to try us all different alternatives to make it work, trying to modify each one what we know of framework?
[Desire Android Development] IamMartin:
Flaming Removed

Back on topic though, would we be seeing an improvement in 720p frame rates once porting the Desire HD's is complete?
[Desire Android Development] ivicask:
He did post hes "Stuff", its in previous post from the one with video.

HERES LINK for BlueVD files

http://wbss.ro/android/

Contains the files:

libcamera.so

liboemcamera.so

awb_camera

sc_camera

mmcamera_test

And perettigiuliano , super huge font saying DONT SPAM THIS THREAD WITH THANKS and so.. is not enough for you?

Admins cant check everything 0/24, im sure he will delete yours and other posts when he checks this thread later.
[Desire Android Development] K900:
People probably meant the sources, not binaries

Sent from my HDfied HTC Desire
[Desire Android Development] capychimp:
what do you rewrite in the framework? my guess is you need to make the framework understand about the desire only has one cam, and bnot dual cam like the hd ;) which robocik and i talked about some days ago, but none of us are able to rewrtie for that, but just curious if it's that your onto in the framework (for the own ego to know if we knew what to work on or not lol)
[Desire Android Development] capychimp:
no idea if Z does was just my first thought cause its a big diff on the devices but who knows, at least someone knows somethign
[Desire Android Development] Dragooon123:
Both don't got a front facing camera AFAIK.
[Desire Android Development] capychimp:
desire HD has a front cam acording to the specs of my carrier, but they might be wrong i don't know, was just a thought :)
[Desire Android Development] BlueVD:
Well that would be useless, wouldn't it? It's the sourcecode for android and I'd have to be darn stupid to post it once again since google took care of that. People can get their source code from there. And as a refference, all mods were done on the nexus files that came with it since desire shares most of the hardware. Geez folks, if you would know a bit of programming you would know that. And since you don't know programming why the heck do you ask for them? Sorry if I sound harsh, but these past few days I barely got 2 hours of sleep per night and all I'm chewing at is the camera, even at work. Have patience, redoing the framework takes some time. Trust me when I say that I'm doing everything humanly possible to get the fix as soon as possible. And if any dev wants to get the files I moded, he can PM me.

And stop posting friggin comments that have nothing to do with devel stuff! Makes it hard for me and the other devs keep track of stuff.

PS: let me make this clear, the existing framework is compiled with different drivers so to say. And the only way to change that is to modify it. I'm compiling a new one to get all the right values for the cam part and patch the existing one since the framework for a nexus would be incompatible with the one needed by SenseHD. If it were as easy as fooling around with a hex editor I would have done it already. And keep in mind that this is my first clash ever with android code. Besides doing the work I also need to learn a lot of stuff on the go! These being said I hope I won't have to read any more mindless posts. And yeah, if any other dev wants to do this step in my place, do tell. I'd be more than happy to give you all I have (and that is sidenotes! Cause the code is already available online). This way I'd finally be able to take a good night sleep :)

[EDIT]: there's no front camera on the Desire Hd/Z. But HTC added the code for one. All I can presume is that they have one with SenseUI2 but no news of that phone leaked yet. Though it would seem sloppy of HTC to make such a silly mistake :)

Ive jusr noticed that the user asking for the sourcecode was neophyte. Mate, all I did was copy the vision files that came with the official source of android, comment out some lines related to the colors of the trackball and pull the proprietary files out of my desire. That's how the libs got done. All of this know-how came from xda forums. Like I said, there's no special voodoo I'm doing. As for the files, I'll get them online if you think it helps (but it doesn't since they only help with the making of the libs and those are already done and working).
[Desire Android Development] NeoPhyTe.x360:
I only said libs, no sc, because i wasn't see in your prev posts, don't worry friend. Thanks!
[Desire Android Development] BlueVD:
Ok, here are the files needed to build the libs and the framework with the correct interrupts. Hope you guys will be happy with them (like I said before I just copied the whole nexus one files and named them/modified them to suit bravo).

http://wbss.ro/android/device_htc.tar.gz

Prerequisites:

1) A linux machine with a x64 distro (I recommend ubuntu 10.10, even if Canonical said it's not all that stable. Also Mandriva 64 bit should do. I run these 2 distros and both seem to work) OR a windows machine that has a case sensitive FS/Partition (I never herd of such a thing, so I recommend linux)

2) 6GB free space

3) a lot of time :)

Steps:

1) get the android source (see http://source.android.com/source/download.html )

2) download the file I provided above and extract it into ~/devices/htc (~ represents the root of the sourcecode folder for android)

3) just build the thing. (make -j2 TARGET_PRODUCT=htc_bravo)

At the end of the build you'll find the libs and whatever else you would require... Happy compiling time to you all.
[Desire Android Development] NeoPhyTe.x360:
So how do you are going to compile a new framework, if only in internet there is a AOSP source (without sense, there aren't any sense framework source code to compile a fresh framework)?

If you like a framework which I modified last weeks... tell me on MP. (I changed only related to camera, and face detection, etc)

This night if I can I'll try with your files, to try to make it work.
[Desire Android Development] BlueVD:
Whatever work I finish and it doesn't FC, segfault or harm the phone in any way will end up in http://wbss.ro/android

So if anything pops up there, you can use it...

And to all the folks out there waiting for the fix: sorry if I'm taking to long. I'm used to reverse engineer & patch Windows PE Binaries. Not linux elfs, Dalvik VM binaries and such. And the lack of sleep + to many coffees + stress @ work make be a bit jumpy :)

That's how I usually behave so don't worry, and if I hurt your feelings, well it's not on purpose.
[Desire Android Development] BlueVD:
OK people, I will keep my english plain:

WHEN a flashable zip will be ready I will say it in BOLD that you can flash it via recovery. Until then, NO, THERE IS NO FLASHABLE ZIP.

And I'm not yelling, just pointing out what should be obvious.

And now, a requst for someone that has a HTC Leo with gauner1986's HD Rom:

BACKUP the files you will replace first!!! Otherwise you'll have to extract them from your ROM to put them back!

Download the following file http://wbss.ro/android/Bravo_Sensehd_workingCameraLibsAndBinaries.zip and upload the *.so files (via ADB with the phone in recovery) to /system/lib

After that upload the rest of the files (the ones without extension) to /system/bin

Reboot the phone, open your favorite console and run as root (and landscape mode, that it keep the phone upright):

awb_camera

I need to know if it outputs some text (like camera calibration status, etc). If it does, you should see a camera viewport in the upper left corner of the display. If you don't, just swipe your finger across the display and you should see some flicker in the upper left corner. If it does, good news: owners of LEO will get the camera fix as soon as the Desire one gets it.

PS: I've got a seminar coming this weekend... Hopefully, I'll finish the fix by tomorrow evening, if not, it's up till monday :(
[Desire Android Development] mackj020:
ok had to try. Since not at home I tried on current build, Mdeejays Desire Hd, used terminal to copy files. Restarted phone ran, "awb_camera." I did get text output for camera calibration. However, right after "take a picture" text, phone restarted itself. On my way home now to test with gauner1986's HD build and adb.

Edit: tried in landscape and portrait, attached screenshot
[Desire Android Development] BlueVD:
I talked to gauner1986 and his rom is based on the dump from DesireHD. I've specified that peole using his rom should test the libs :) But it's good to know that apparently something failed on Mdeejays rom. Hopefully it will work on gauner1986's rom.
[Desire Android Development] TML1504:
also tried it on mdeejay's HD 3.6 with hastarin 7.6 and all the actual libs etc., same result as mackj020!

but thumbs up, and many thanks for your ongoing efforts!!!

best regards,

markus
[Desire Android Development] mackj020:
Tested as stated, on gauner1986's HD build with leo, and same results. Phone restarts at "take a picture."
[Desire Android Development] BlueVD:
Yup, I just finished looking at your kernel config. It needs some work. I'll get to it today after I finish some more work on the framework.
[Desire Android Development] ownhere:
Thanks for your source code sharing.

But, after check all of the files, can not found source code for make different.

Those files in Bravo_Generic_filesRequiredForAndroidCompilation.tar.gz is totally same as Kali- or CM bravo device directory.

Files in Bravo_Sensehd_workingCameraLibsAndBinaries.zip:

awb_camera,cam_ins_spmo,libcamera.so,mmcamera_test,mm-venc-omx-test same as Froyo WWE 2.09 RUU

liboemcamera.so,lsc_camera is uniqued, but I don't know whereis different from source.
[Desire Android Development] BlueVD:
I did tell you people I didn't do anything that hasn't been done already =)

The files required to recompile the Android platform were copied from the vision source that come with the repo, and just renamed and replaced all the vision refferences to bravo. I guess someone already did that (I do have another copy to change the liblights not to include the Vision trackball colored lighs, but it breaks the build at some point, can't figure out who's refering to those structs).

As to the libs, yeah, some of them are the same since they have been compiled from the official froyo build. liboemcamera (the one that does the cam magic and makes it work) is different because of the original one I pulled (when building android you require proprietary files in order to build new ones, see extract-files.sh for rfference). For the life of me, I can't remember from what ROM I pulled it (I've tested around 4 or 5 of them). I'll put the one in my source tree online if that helps.
[Desire Android Development] NeoPhyTe.x360:
Same results with your files, that I had in my last tries with sense 1.0 files, black screen, same log, problem of sensor.
[Desire Android Development] mdeejay:
same results with my HD/Z/Glacier/G builds
[Desire Android Development] BlueVD:
Whe compiling Android source code, it generates new libs using the old ones. Didn't have time to check and see how it does this. I've pulled the required files from 4 or 5 different roms. If my memory serves me right, the libs that worked were extracted from a cyanogen rom. Anyway, I've managed to pinpoint the problem. It's linked to libcameraservice.so (see the following two logcats, the first beeing from awb_camera and second from barcode scanner). The native binaries don't use the media framework and that's why they work. But dalvik apps do. You'll notice in the logs that the error is at creating an overlay. I don't have my laptop handy, but the file is located in the framework/media folder from the android source trunk. Tomorrow I'll skip my seminar lunch break and use the time to post more details (exactly how I built the damn libs and exactly the file that has the problem with creating the overlay).

In the mean time, maybe someone can check the source behind libcameraservice.so

Cheers!

http://pastebin.com/9ZVamdVR

http://pastebin.com/XPz525sg
[Desire Android Development] NeoPhyTe.x360:
My test's with your files, when I do a awb_camera, it says only 1 sensor found, directly.
[Desire Android Development] liamstears:
We have working libs so I dont see why you should waste your time explaining how, you should just concentrate on getting the rest to work then once its all working if people still wanna know then share :-D

Just my 2cents
[Desire Android Development] BlueVD:
I agree with you, but there's a catch: some devs have more experience that I do (actually, I have nearly none). For them, finding out how the libs were built would help in figuring out the rest of the problem. That's why they ask for the files. Plus, Android is GPL'ed, whitch means I *HAVE* to share anything I do :)

However, like NeoPhyTe.x360 pointed out, there's nothing that I did up so far that was special. I just got lucky and found one liboemcamera.so that when recompiled, worked on the SenseHD. Shoot me in the leg if I know why the old libs didn't work. And why newly recompiled libs don't work either unless you have a specific liboemcamera.so (actually, I think that it matters what build flags you use, because recompiling a new file from an old one would require debugging information attached to the file). Up 'till now I never saw a build system that requires already compiled files. And still I can't quite grasp the whole process. Bun untill I'm finished with the last problem (libcameraservice) I don't give one cent on how the heck I got that libcamera working (maybe it was beginners luck :) )

When I'm done I'll replicate my whole build trunk on a new server and give devs access to it (getting a new server at work in about one week, and again, I'll use most of its resources for my own devious ends, being the CIO is great :) ).

Anyway, right now I'm on a lunch break from my seminar so I need to use this time to tinker (remotely) with my build and the cameraservice libs.

Wish me luck :)
[Desire Android Development] NeoPhyTe.x360:
Don't worry about I say, I was only saying, that you explain what build u are using/ and correct libs, to try help/do tries while you are trying it too, because u don't have time, and better if we do all work between all, and not you all work. I wasn't complaining friend, and I don't want to shoot you either hahaha
[Desire Android Development] ownhere:
I'm sorry, but to my knowledge, liboemcamera.so seems to be a vendor proprietary file, it will not compile with the AOSP, AOSP just extract this file from phone, and then packaged into ota packages.

Maybe I am wrong.
[Desire Android Development] dennis.l:
I have no idea about compatibility.. but I just found this from the Nexus 1 forums. they have a flashable zip that has the HTC camera and the support files needed all together.

Would something like this help?

http://xdaforums.com/showpost.php?p=5313888&postcount=3
[Desire Android Development] robbo990:
No - this is for AOSP Roms not Sense HD
[Desire Android Development] MrDroopy:
The Desire HD kernel source (HTC Desire HD - Froyo - 2.6.32) is available.

http://developer.htc.com/
[Desire Android Development] kfasheldon:
http://www.drakaz.com/forum/viewtopic.php?id=154

Not sure if this will help but this guy and team have been working on open source camera driver, I think for Galaxy but it does mean they have some knowledge of the camera drivers that may point us in a general direction, worth getting in touch.