Yahoo Messenger front camera is working now! :-)

droidrx

Senior Member
Apr 11, 2011
253
258
0
Toronto
I was looking at how yahoo video plug-in uses the HTC front camera and found out that it calls “com.htc.hardware.twinCamDevice.FrontFacingCamera. getFrontFacingCamera();” to load it. So I baksmali-ed the com.motorola.hardware.frontcamera.jar and changed it to look like the HTC version so YM can use it.

ADB Method (YOU MUST BE ROOTED TO APPLY IT):

1. Extract YMFrontCamADB.zip
2. Connect your device in Debugging mode (Settings -> Applications -> Development -> USB Debugging)
3. Run YMFrontCam.bat and follow the instructions.
4. Close the process for YM plug-in.
5. Make a video call.

YMFrontCamCWM.zip and YMFrontCWMCamRemover.zip can be used for CWM un/installation


NON-ATRIX devices should use the ADB method as the CWM method is specific for Atrix only. If the ADB method doesn't work, download the com.htc.hardware.twinCamDevice.zip, extract com.htc.hardware.twinCamDevice.jar, copy it to your /system/framework and change the permission to 644



2011-05-31 - Updated to support more devices.

Gingerbread devices (using the standard 2.3 front camera API)
Motorola
Samsung
LG
Dell Streak and Streak 7 (Untested)
Huawei (Untested)
Other htc devices without the com.htc.hardware.twinCamDevice.jar (Untested)

Feel free to edit the source and make it work on your device :)

2011-05-31 - Updated YMFrontCamADB.zip script to fix mount command on other devices. The new script requires busybox (rooted devices should have it anyway)

2011-06-11 -Updated YMFrontCamADB.zip and com.htc.hardware.twinCamDevice.jar to fix the exception in integer "Parameters" values (samsung, dell, lg). Source code FrontFacingCamera.java.zip is updated as well. CWM method NOT updated.


2011-07-03 - After more than 2 months of hiding and distributing the APKs in secrecy, I’m now attaching them in here. I was advised not to post modifications for Google Market APKs here and so I did but as I can see in other threads, everything is allowed.

For a fix that does not need root and ADB stuffs, you can download the APK versions. First you have to uninstall the YM and YM plug-in from the market, install yahoo.im.apk (a must) and choose one among the plugins that suits best your need.

There are 4 versions of the plug-in I made. Some users reported that their devices got the wrong camera orientation (side-ways, or flipped image) and so I made 3 additional versions that add 90, 180 or 270 degrees clockwise to the orientation. It might or might not show the correct orientation on the android device but the transmitted image should be correct. Another thing is that, FFC and back cam doesn’t always have the same orientation so fixing the other might break the orientation of the other; so choose which cam you prefer to use.
 

Attachments

Last edited:

klub242

Senior Member
Mar 19, 2010
155
32
0
Awesome! Haven't tried it out yet because I'm not home, but sure hope it works. I wonder if it works with other apps... any chance of looking at Vtok and Ovoo?

EDIT: Confirmed, it works with Yahoo. I used the com.htc.hardware.twinCameDevice.zip method and not the CWM flash, but have no reason to imagine that the other method wouldn't work as well. THANK YOU THANK YOU!

Sent from my MB860 using XDA App
 
Last edited:

ceo.mtcl

Senior Member
Aug 20, 2008
2,411
487
0
St. Paul, MN
Doesn't seem to work. I used the cwm zip to apply the update. I can see the flip camera icon but it never switches to front camera.

Update: removed and applied again through cwm, works like charm! Thanks for sharing.

Sent from my MB860 using XDA Premium App
 
Last edited:

klub242

Senior Member
Mar 19, 2010
155
32
0
Doesn't seem to work. I used the cwm zip to apply the update. I can see the flip camera icon but it never switches to front camera.

Sent from my MB860 using XDA Premium App
Hmm, since it worked for me perfectly extracting the jar, maybe you should try it that way?
 

droidrx

Senior Member
Apr 11, 2011
253
258
0
Toronto
I wonder if it works with other apps... any chance of looking at Vtok and Ovoo?
I have a modified version of ooVoo that works with the atrix's front camera but I'm not sure if I can post it here or not.

I believe though that ooVoo will very soon release the version that supports the atrix and the front camera. Their code actually includes the loader class for the front camera but for some reason, it is not yet included in loader array. Maybe it is still under testing.


Sent from my MB860 using XDA App
 

droidrx

Senior Member
Apr 11, 2011
253
258
0
Toronto
What version are you using? I'm using the french 4.2.1 sbf (bell). Maybe it's just a versioning issue. I'll make one tonight (GMT - 5) that will actually load and use the motorola library to avoid versioning issues.

Sent from my MB860 using XDA App
 

exume

Senior Member
Feb 14, 2011
69
2
0
I remember seeing that Skype with video was out for the thunderbolt, any way we could make that work using a similar method?

Sent from my MB860 using XDA App
 

klub242

Senior Member
Mar 19, 2010
155
32
0
According to what a few other people have said, that app was coded with a lot of lines of code specific to that device... so it would practically be quicker to start from scratch.

Sent from my MB860 using XDA App
 

klub242

Senior Member
Mar 19, 2010
155
32
0
It's sure worth a try, I bet so. If not, the same method (renaming the default camera framework file to the htc version) would work. Try it.

Sent from my MB860 using XDA App