yashsingh1/xdaforums huggingface dataset:
[Atrix 4G Themes and Apps] droidrx:
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.
[Atrix 4G Themes and Apps] klub242:
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!
[Atrix 4G Themes and Apps] ceo.mtcl:
Awesome, I'm trying it now.
[Atrix 4G Themes and Apps] ceo.mtcl:
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.
[Atrix 4G Themes and Apps] klub242:
Hmm, since it worked for me perfectly extracting the jar, maybe you should try it that way?
[Atrix 4G Themes and Apps] sfb14:
Worked like a charm!! Many thanks to this!!! Now i can slowly let go of my 4 :D
[Atrix 4G Themes and Apps] droidrx:
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.
[Atrix 4G Themes and Apps] droidrx:
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.
[Atrix 4G Themes and Apps] zir4:
Says unable to copy the file to system/framework
[Atrix 4G Themes and Apps] dtp777:
Thank you sooo much .You are amazing .I have been waiting for this for a loong time now.Tested it works gr8888
[Atrix 4G Themes and Apps] klub242:
You have to mount /system as read/write. If you don't know how, it should be easy to find out on google.
[Atrix 4G Themes and Apps] exume:
I remember seeing that Skype with video was out for the thunderbolt, any way we could make that work using a similar method?
[Atrix 4G Themes and Apps] klub242:
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.
[Atrix 4G Themes and Apps] Prax:
Do you believe that this will work with the Xoom as well seeing how they have the same camera drivers?
[Atrix 4G Themes and Apps] klub242:
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.
[Atrix 4G Themes and Apps] droidrx:
I've updated it and changed the code to simply load and use the existing driver from motorola. It should be easy now to port to other devices.
[Atrix 4G Themes and Apps] zir4:
Works perfect
[Atrix 4G Themes and Apps] droidrx:
I've never heard that skype has a video support. Maybe I should check for that.
[Atrix 4G Themes and Apps] Bloodgod:
thanks alot! I have been dying to use this feature on my atrix it works great!
[Atrix 4G Themes and Apps] rickriego:
not working for me..tried both ways. i am rooted..gb3.5...
[Atrix 4G Themes and Apps] droidrx:
Using adb on windows, run

adb logcat | find "HTCFrontFacingCamera"

It should show you the exception when it tries to load the camera.
[Atrix 4G Themes and Apps] rickriego:
Using adb on windows, run

adb logcat | find "HTCFrontFacingCamera"

It should show you the exception when it tries to load the camera.[/QUOTE]

i'll try..
[Atrix 4G Themes and Apps] ocakar:
@rickriego, did you have chance to try it on GB 3.5? is it working with ffc?
[Atrix 4G Themes and Apps] ocakar:
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.

where can i find the oovoo version that supports atrix front facing camera?
[Atrix 4G Themes and Apps] droidrx:
I installed GB 3.5 last night to test if this mod works and it was OK on my testing.

It should work unless some files got corrupted (either the framework files or this mod's files).
[Atrix 4G Themes and Apps] droidrx:
Updated the code to support more devices including Gingerbread devices, Samsung, LG, Dell, Huawei and those HTC devices not supported by YM front camera video call.
[Atrix 4G Themes and Apps] rickriego:
no..i gave up on trying as i dont even use yahoo hardly at all...
[Atrix 4G Themes and Apps] ocakar:
skype front facing camera

is the skype front facing camera possible on atrix?
[Atrix 4G Themes and Apps] baseballfanz:
Not at home near my Windows PC so I tried the CWM version on my Asus Transformer running 3.1 Honeycomb.

Did not work, tried it twice. Will try the ADB method when I get to my PC
[Atrix 4G Themes and Apps] baseballfanz:
Got it working by extracting the jar file and moving it to system/framework setting

permission to 644 as per your suggestion. The camera is sideway however.

This is on a Honeycomb Transformer running 3.1
[Atrix 4G Themes and Apps] shoktong:
:) seem to have some file path issues with the SGS2
[Atrix 4G Themes and Apps] droidrx:
I realized my ADB script is specific to Atrix. I updated the YMFrontCamADB.zip to get the partition and type mounted to /system and use the info in remounting it.
[Atrix 4G Themes and Apps] shoktong:
Its now working fine!

*any chance anyone can work out why my image comes out inverted with my wife's ipad2 or my bro's pc? :)
[Atrix 4G Themes and Apps] cttha:
verycool11111111111111111
[Atrix 4G Themes and Apps] mim2007sa:
Please help me. I am not much expert in adb. Is there a simple method to install the patch to work the front cam?
[Atrix 4G Themes and Apps] dooha:
not working on acer iconia a500
[Atrix 4G Themes and Apps] droidrx:
which part did not work? the adb script or the ym loading the jar file or the jar file loading the ffc?

do you see the 4 button dialog when you do a video call or just 3?
[Atrix 4G Themes and Apps] MrReynus:
I got the swap camera button to show when I make the call but the screen is black until I swap and thr back camera works fine. G2x
[Atrix 4G Themes and Apps] droidrx:
try to run

adb logcat | find "FrontFacingCamera"

on your pc while your device is connected in debugging mode and then make a video call with the FFC. You can post it here or send me the log.

Also, if you have an application that shows the system info. I'd like to know what is in the "manufacturer" and and the "model". If you don't have any, you can try this one I'm using https://market.android.com/details?id=com.electricsheep.asi (System -> BuildInfos)
[Atrix 4G Themes and Apps] jose makalolot:
I am also using g2x and got black screen when flipping the cam on YM.

tol, Here's the info I have on my phone:

Manufacturer: LGE

model: LG-P999

by the way, how to do the adb logcat so that I can attach it here? Sorry for being noobie.
[Atrix 4G Themes and Apps] droidrx:
Hi kabayan! :-)

Your phone must be connected to your PC and in debug mode before you execute the adb.

In the folder where you extracted YMFrontCamADB.zip, there is an adb.exe in there. You can open command prompt, cd to that directory and execute the whole command:

adb logcat | find "FrontFacingCamera"
[Atrix 4G Themes and Apps] jose makalolot:
Here's what I get...
[Atrix 4G Themes and Apps] droidrx:
Sorry, I have a bug in there :-D. Try to use this updated one

Let me know if it works so I can update the attachment in the first post.
[Atrix 4G Themes and Apps] jose makalolot:
here you go... chaching!!!
[Atrix 4G Themes and Apps] droidrx:
Did it install properly without any error? It looks like it is still using the old code in your log. The exception for "set" should not be there anymore.

Try to uninstall first (select 2 in YMFrontCam.bat) and then install (1). Also, try to clean the log buffer using "adb logcat -c" before the "adb logcat | ...".
[Atrix 4G Themes and Apps] jose makalolot:
it works now... maybe we can try it now... heheheheh

another thing: if I remember well, there was an option before for speaker (on/off). If I am using wired or bt headset the sound goes to the speakers of the phone.
[Atrix 4G Themes and Apps] droidrx:
i haven't seen that option as this is my first android phone. maybe that's a feature they have in older versions. the sound goes to the speaker first everytime I make a video call so i have to unplug and then plug my headset again.
[Atrix 4G Themes and Apps] jose makalolot:
Ok. I'll try that.

Update: it works for wired. I dont know how to do it with bt. Hehehehe.

By the way, is it normal for my video to flip when my phone is flipped?

"salamat kapatid!"

Sent from my Gingerbred powered Nokia 3210.
[Atrix 4G Themes and Apps] droidrx:
There are some cases in mine that the video orientation is wrong when I try to rotate the phone. Users of other devices also reported that their video has wrong orientation from the start and some even experienced application crash when they try to rotate the phone.

Maybe because it was not designed to be compatible for our phones in the first place and yahoo only tested it for EVO and myTouch4G.

For now, the best thing to do is "don't rotate or flip the phone while doing video call" :-D
[Atrix 4G Themes and Apps] Jbazt_katuforzs:
Will this be working on my mytouch4g kabayan? I'm currently on 2.3.3 sense 3.0. When the phone was on stocked ROM all is working fine. After flashing custom ym front video calling don't work anymore.
[Atrix 4G Themes and Apps] droidrx:
Hi kabayan :-)

For 2.3 and higher, it uses the standard FFC API so it should work regardless of the brand.
[Atrix 4G Themes and Apps] mr.BeBoT:
Pare, can you please post what you did to help user:baseballfanz fix his orientation.

He posted here that his was originally sideways then said it was working correctly a few posts after with a thanks to you.

http://xdaforums.com/showthread.php?t=1103994&page=4

I'll be glad to cross post the solution as others have asked him what needs to be done.

Salamat.
[Atrix 4G Themes and Apps] hakkinenvthh:
It works like a charm on my SS Galaxy S2 by adb batch. You can create a topic in the Adroid developpement or Android apps now. Thanks very much for your works!!! I hope we could have soon Video call by front camera with Skype too :D Best regards!
[Atrix 4G Themes and Apps] gejenn:
Im having a hard time using adb method,im using a Mytouch4g on evils's virtuous fusion rom sense 3.0,also tried using cwm still no go,any help on this?

thanks in advance mga repapips!!!!
[Atrix 4G Themes and Apps] hakkinenvthh:
You can simply copy the jar file to system/framework by Root explorer (mount r/w before copying), and then verify the permissions of file is 644 (maybe it's automatically 644), reboot your phone and rock it :D Hope this helps
[Atrix 4G Themes and Apps] jose makalolot:
Pare, there's a new one, a working one. Check few page back. Use root explorer to move the files.

Sent from my Calculator with Android.
[Atrix 4G Themes and Apps] gejenn:
I might have got it working now..havent checked yet,found out i didnt have java runtime on my pc,lol.ill give u an update if i have it running.
[Atrix 4G Themes and Apps] gejenn:
Got FFC working finally!only problem now is i cant see clearly the person on the other side.
[Atrix 4G Themes and Apps] jose makalolot:
Maybe the person on the other side has the issue? Or the internet is too slow for both of you?

Sent from my Calculator with Android.
[Atrix 4G Themes and Apps] gaarared:
Already try this in my galaxy s, my FFC also have sideways issue, how to solve this? thanks..
[Atrix 4G Themes and Apps] gajahwhite:
thanks for the trick..

work great with my SGS i9000 gb 2.3.4.. i'm using the CWM one.. :)
[Atrix 4G Themes and Apps] marseillesw:
Sorry to ask but what exactly is permission 644? Is that rw--r--r?
[Atrix 4G Themes and Apps] jose makalolot:
Yes.

Sent from my Calculator with Android.
[Atrix 4G Themes and Apps] marseillesw:
Cool thanks
[Atrix 4G Themes and Apps] ricnar456:
i tried in my samsung i9000 with last jar and copy to system/framework change permission to 644 and the video is all black when spin to front camera, only using the back camera is possible see video.

any suggestion?

thanks

ricnar
[Atrix 4G Themes and Apps] droidrx:
Try to run YM with ADB logging and attach the log here.

adb.exe logcat | find "FrontFacingCamera"

Review the previous posts on how to do it.
[Atrix 4G Themes and Apps] stoneheartjp13:
I second to this pre. How can i change the Permission to 644 exactly?
[Atrix 4G Themes and Apps] jose makalolot:
Open root explorer. Navigate to system/framework and locate this file discussed here. Long press the file then click permissions. Check all first column and all first row. Then okay. Make sure it is writable(r/w).

That's it.

Sent from my Calculator with Android.
[Atrix 4G Themes and Apps] gejenn:
Sir this is what im seeing on my screen,but with the person im vidchatting with, said that they can see me clearly.
[Atrix 4G Themes and Apps] stoneheartjp13:
I second to this too. :confused:

Looks like this happens to us using fusion sense 3.0.
[Atrix 4G Themes and Apps] droidrx:
Im not sure but it seems like there is a video codec incompatibility. Are the other video apps working OK?
[Atrix 4G Themes and Apps] stoneheartjp13:
i can use gtalk video chat with no problems.

but i like ym video a lot.:(
[Atrix 4G Themes and Apps] NextineX:
Won't work

I'm on a samsung galaxy Gt-I9000 running 2.2 froyo

Does not work, I get the flip camera button but when I use it, it just goes black:confused:
[Atrix 4G Themes and Apps] droidrx:
Can you please run adb logcat and attach your log output here

Here's a reference how to run it

http://xdaforums.com/showthread.php?p=14616668#post14616668
[Atrix 4G Themes and Apps] NextineX:
I don't get anything.

I CD'd to the directory with the adb (C:\Documents and Settings\Owner\Desktop\Root\YMFrontCamADB)

when I ran the command it just sat there blinking
[Atrix 4G Themes and Apps] NextineX:
This is what I've entered

C:\WINDOWS\system32>CD C:\Documents and Settings\Owner\Desktop\Root\YMFrontCamADB

C:\Documents and Settings\Owner\Desktop\Root\YMFrontCamADB>adb logcat | find "FrontFacingCamera"

And yes my phone is connected in debugging mode and I've rooted it
[Atrix 4G Themes and Apps] droidrx:
Have you run YM and try to flip the camera back and front?
[Atrix 4G Themes and Apps] NextineX:
Many times, the original camera works. But the face camera just gets a black screen and after about 10 seconds it says that there is no input and cancels the call.

I've tried a few uninstall/re-installs

Finally it responded. How exactly do I export the log? Or would I have to type it by hand?
[Atrix 4G Themes and Apps] droidrx:
You can right click the cmd title bar -> Edit -> Mark, highlight the text using mouse and press keyboard ENTER.

You can also redirect the output to a file

adb logcat | find "FrontFacingCamera" > output.log

In this case you will not see the output in the screen as it redirects the output to the file.
[Atrix 4G Themes and Apps] NextineX:
Sorry, my internet died:

C:\WINDOWS\system32>CD C:\YMFrontcamADB

C:\YMFrontCamADB>adb logcat | Find "FrontFacingCamera"

- waiting for device -

V/FrontFacingCamera( 7070): info: getFrontCamera begins

V/FrontFacingCamera( 7070): info: isSupported begins

V/FrontFacingCamera( 7070): info: ffcIndex 0 test (result = false)

V/FrontFacingCamera( 7070): exception: ffcIndex 1 test (java.io.FileNotFoundExc

ption: /system/framework/com.motorola.hardware.frontcamera.jar)

V/FrontFacingCamera( 7070): exception: ffcIndex 2 test (java.lang.ClassNotFound

xception: android.hardware.HtcFrontFacingCamera)

V/FrontFacingCamera( 7070): exception: ffcIndex 3 test (java.lang.ClassNotFound

xception: android.hardware.CameraSlave)

V/FrontFacingCamera( 7070): exception: ffcIndex 4 test (java.lang.ClassNotFound

xception: com.dell.android.hardwareCameraExtensions)

V/FrontFacingCamera( 7070): exception: ffcIndex 5 test (java.lang.NoSuchMethodE

ception: DualCameraSwitch)

V/FrontFacingCamera( 7070): info: ffcIndex 6 test (result = true)

V/FrontFacingCamera( 7070): info: isSupported ends (ffcIndex = 6)

V/FrontFacingCamera( 7070): exception: java.lang.ClassCastException: com.sec.an

roid.seccamera.SecCamera

V/FrontFacingCamera( 7070): info: getFrontCamera ends (camera is NULL)

V/FrontFacingCamera( 7070): info: getFrontCamera begins

V/FrontFacingCamera( 7070): info: isSupported begins

V/FrontFacingCamera( 7070): info: ffcIndex 0 test (result = false)

V/FrontFacingCamera( 7070): exception: ffcIndex 1 test (java.io.FileNotFoundExc

ption: /system/framework/com.motorola.hardware.frontcamera.jar)

V/FrontFacingCamera( 7070): exception: ffcIndex 2 test (java.lang.ClassNotFound

xception: android.hardware.HtcFrontFacingCamera)

V/FrontFacingCamera( 7070): exception: ffcIndex 3 test (java.lang.ClassNotFound

xception: android.hardware.CameraSlave)

V/FrontFacingCamera( 7070): exception: ffcIndex 4 test (java.lang.ClassNotFound

xception: com.dell.android.hardwareCameraExtensions)

V/FrontFacingCamera( 7070): exception: ffcIndex 5 test (java.lang.NoSuchMethodE

ception: DualCameraSwitch)

V/FrontFacingCamera( 7070): info: ffcIndex 6 test (result = true)

V/FrontFacingCamera( 7070): info: isSupported ends (ffcIndex = 6)

W/System.err( 7070): at com.htc.hardware.twinCamDevice.FrontFacingCamera.get

rontFacingCamera(FrontFacingCamera.java:194)

W/System.err( 7070): at com.htc.hardware.twinCamDevice.FrontFacingCamera$FFC

yClass.getFrontCamera(FrontFacingCamera.java:78)
[Atrix 4G Themes and Apps] droidrx:
Try this one. I removed the SecCamera code so it's now using ("camera-id", 2) to open the FFC. Let me know it it works so I can update the first post.
[Atrix 4G Themes and Apps] jose makalolot:
Kapatid, do you have a solution for fring also?

Sent from my Calculator with Android.
[Atrix 4G Themes and Apps] droidrx:
Isn’t the LG supported in fring? I checked the code and it seems like it supports LG-P990 and LG-P999. They use the function "Camera.Parameters.setCameraSensor" though instead of "camera-sensor". I don't know, maybe they are just the same. What error you get when you use it?
[Atrix 4G Themes and Apps] NextineX:
It works except for some reason I've been rotated clockwise O_o
[Atrix 4G Themes and Apps] jose makalolot:
It uses the back camera and has no options on how to flip or use the ffc.

Sent from my Calculator with Android.
[Atrix 4G Themes and Apps] droidrx:
edit: erased message
[Atrix 4G Themes and Apps] droidrx:
tol, try this one I modified. I incorporated the jar code for YM and made a minimal change to fring's code. It should support the same hardware list as the YM.

Let me know if it works or if not, please send me the logcat again. :-)
[Atrix 4G Themes and Apps] droidrx:
Please check your inbox, I PMed you for the fix.
[Atrix 4G Themes and Apps] jose makalolot:
It still uses the back camera. I will attach the logcat later.

Sent from my Calculator with Android.
[Atrix 4G Themes and Apps] nono240:
Just wanted to say "thank you". I'm a developer, and I needed a way to make the front camera works on Froyo - for most devices. You helped me so much. I'll contribute asap.
[Atrix 4G Themes and Apps] nono240:
Good job. Integrating your code into my manifest, do you know exactly the <uses-library> tags I should put in ? From your code, I spotted the followings :

com.sprint.hardware.twinCamDevice

com.htc.hardware.twinCamDevice

com.motorola.hardware.frontcamera

com.dell.android.hardwareCameraExtensions

com.sec.android.seccamera

android.hardware.CameraSlave

android.hardware.HtcFrontFacingCamera

Am I right ? Any missing ? Some advises ?
[Atrix 4G Themes and Apps] droidrx:
You only need to include com.motorola.hardware.frontcamera.FrontCamera in your manifest. Other than seccamera and motorola, all those others are already in the framework so you don't need to include them in your manifest.

For the seccamera, the FFCByClass failed :-D. The one that works for samsung is the FFCByParameter as you can see in this post http://xdaforums.com/showthread.php?t=1087769&page=9
[Atrix 4G Themes and Apps] nono240:
You mean "com.motorola.hardware.frontcamera" instead ?

I'm not only targeting HTC or Dell, so I think I still need to include those. Am I right ?

Of course, I'm tagging them as "not required".

Is the namings correct ? I'd like to be sure to not include any class name :

com.sprint.hardware.twinCamDevice

com.htc.hardware.twinCamDevice

com.motorola.hardware.frontcamera

com.dell.android.hardwareCameraExtensions

com.sec.android.seccamera

android.hardware.CameraSlave

android.hardware.HtcFrontFacingCamera
[Atrix 4G Themes and Apps] droidrx:
Yes, I mean "com.motorola.hardware.frontcamera". I mistakenly copy-pasted the class name :-D

I think those names are OK. There's no harm in adding all in the manifest as long as they are marked "not required".
[Atrix 4G Themes and Apps] nono240:
Ok, understood. Well done guy. I'll keep looking for updates ! Thanks again..
[Atrix 4G Themes and Apps] coradux:
The ADB method works perfect on Galaxy SII :D.

PS: the only problem is that when you hold the phone in Portrait Mode, the other person sees you upside-down. If you switch to back camera everything is ok. Also if you hold the phone in Landscape Mode the other person sees you right.