# [PORT REQUEST] Touchwiz Camera/Camcorder for AOSP ROMS



## abkulp

There are multiple things that I may like from Touchwiz, and the camera app is the biggest one. While AOSP roms run more smoothly (most of the time) and allow more customization options, I find myself missing the stock camera's improved (IMO) functionality over the AOSP camera.

Can anyone port the Touchwiz Camera so that it can be flashed/side-loaded on AOSP ROMS?

Sent from my Samsung Galaxy S III


----------



## jr313

I don't believe it can be done due to it needing tw framework in order to be used. Then again I could be wrong.

Sent from my SCH-I535 using RootzWiki


----------



## Mustang302LX

Yeah probably not going to happen...and moved to General. Please use development sections for releases only.


----------



## Nick.Tbolt

This has been tried since I had my Tbolt. People wanted the stock HTC camera app to work on CM7 but, it needs the framework which isnt in AOSP, but, you can always get just a debloated ROM. Not sure if we have any "dewizzed" roms like the Bolt had "Desensed" I just use Beans with Nova Launcher... snappy as hell

* Verizon Galaxy S3 *


----------



## Andre08

The galaxy s2 camera was ported to aosp on the fascinate so its possible

Sent from my SCH-R530U using Tapatalk 2


----------



## Nick.Tbolt

Andre08 said:


> The galaxy s2 camera was ported to aosp on the fascinate so its possible
> 
> Sent from my SCH-R530U using Tapatalk 2


Everything I have ever known is a lie...... well at least we have good devs

* Verizon Galaxy S3 *


----------



## jr313

Andre08 said:


> The galaxy s2 camera was ported to aosp on the fascinate so its possible
> 
> Sent from my SCH-R530U using Tapatalk 2


Both phones run touchwiz so that would be possible. The fascinate doesn't run pure aosp so the framework is already in place the devs just need to tweak some things to get that working, its a totally different beast we are talking here.
Sent from my SCH-I535 using RootzWiki


----------



## invisiblek

Andre08 said:


> The galaxy s2 camera was ported to aosp on the fascinate so its possible
> 
> Sent from my SCH-R530U using Tapatalk 2


If you'd link me to a thread for this I'd be more than happy to look into getting this working.


----------



## abkulp

Mustang302LX said:


> If you'd link me to a thread for this I'd be more than happy to look into getting this working.


This would be awesome!

Sent from my Galaxy S III


----------



## alquimista

I was just muddleing through decompiling the touchwiz camera to see why audio recording was so low in CM based roms. Using Appkit to "decopile" the samsungcamera.apk from the VRLHD build I've found a few things that may help me/you/us/someone firgure out the possibility of porting the TW camera to CM (either positive or negative results). Keep in mind that I'm really looking for why the audio on CM video recording is so low, although I know that many a smarter bloke than I are working on this.

The manifest file is the most telling so far.

It uses four libraries:
- seccamera ( actually two so's for this libseccamera_jni and libseccameracore )
- sec_feature ( no .so file just a jar in the framworks folder that seems tied in to alot of SecProductFeature_[feature].jar's )
- sechardware ( no .so file just a jar in the framworks folder )
- secmediarecorder ( libsecmediarecorder_jni ) --<I assume that this is where I'd find out whihc mic should be used during recording video >
Two of these are JNI shared objects for which I have no idea how to RE. The jars I can look into when I have time, but I'm not hopefull.

It also uses a permission unique to TouchWiz, "com.sec.android.app.twdvfs.DVFS_BOOSTER_PERMISSION". This ties into the TwDVFS.apk which is some sort of dynamic voltage frequecy scaling functionality to decreas power useage when an app runs ( in this case its booting power usage??). This is probably the only part of the TW camera app that I can safely leave out of any porting/RE effeorts.

The outlook is not positive for a port, and I'm not to cheery about figuring out the audio problem either.

Ta,
ALQI


----------



## Goose306

I've seen it happen on other devices for porting the camera, the issue is that:

Its typically not a flashable zip. The reason why is as mentioned above most of the time camera firmware relies on the framework files. So porting it to AOSP is actually more like porting AOSP to Touchwiz or merging the two. Typically its not as simple as a flashable zip its usually a much more involved process.

Another example (from a former device of mine) is the old DX where Wizard0f0s is still working on porting the blur camera to MIUI and to do that he basically has to rebase the entire ROM on blur framework (or port MIUI into blur) to get it to function. Locked bootloader on that device causes further issues of course but its likely a similar idea and what will probably be necessary for the TW camera to make it to AOSP ROMs will likely require a specialized ROM build tailored just to that.

EDIT: Just a disclaimer I haven't looked into it for this actual device so maybe it is simple. But based on what I've heard so far from developer's who've glanced at it (this has been a common feature request since AOSP was available for this device) it will not be simple if even possible (its likely possible but its questionable if the amount of effort is worth the end product)


----------



## bobcaruso

This is an absolutely silly request,
If you want TW, then stay on a TW rom, & use the TW cam, ASOP doesn't contain any TW primitives, so, It's not gonna happen, period.

BTW, having a few Samsung TV's, I happen to need TW for allshare, besides, all ASOP is based on CM10, which is nowhere close to being ready to be a daily rom, for anybody that actually uses their phone for real shit, JMHO, way too much you can't rely on, reboots are 100% unacceptable, sound sucks, bluetooth sucks and too many business apps like RSA do not come close to working. As a toy, ASOP roms are fun to play with though


----------



## MistaWolfe

CM is based on AOSP. CM would not exist without AOSP (not ASOP as you say). CM builds from AOSP.

AOSP ROMs are definitely suitable for daily use. Been running aokp nightlies for over a month. Everything works. You must be doing it wrong.

Finally, you can run AllShare on AOSP. Check the market









Sent from my SCH-I535 using Tapatalk 2


----------



## droidstyle

bobcaruso said:


> This is an absolutely silly request,
> If you want TW, then stay on a TW rom, & use the TW cam, ASOP doesn't contain any TW primitives, so, It's not gonna happen, period.
> 
> BTW, having a few Samsung TV's, I happen to need TW for allshare, besides, all ASOP is based on CM10, which is nowhere close to being ready to be a daily rom, for anybody that actually uses their phone for real shit, JMHO, way too much you can't rely on, reboots are 100% unacceptable, sound sucks, bluetooth sucks and too many business apps like RSA do not come close to working. As a toy, ASOP roms are fun to play with though


Time to crawl out from under that rock and get some fresh air bud ...AOSP has been daily driver worthy for a bit now. The problems you read are 90% user error and regergitated internet BS!


----------



## Jaxidian

bobcaruso said:


> This is an absolutely silly request,
> If you want TW, then stay on a TW rom, & use the TW cam, ASOP doesn't contain any TW primitives, so, It's not gonna happen, period.
> 
> BTW, having a few Samsung TV's, I happen to need TW for allshare, besides, all ASOP is based on CM10, which is nowhere close to being ready to be a daily rom, for anybody that actually uses their phone for real shit, JMHO, way too much you can't rely on, reboots are 100% unacceptable, sound sucks, bluetooth sucks and too many business apps like RSA do not come close to working. As a toy, ASOP roms are fun to play with though


FWIW, I'm an IT Director in the energy industry. AOKP and CM10 are both plenty stable enough for me to use for real shit. I dare say that there are times when they are *more stable* than the stock TouchWiz ROM.

#JustSayin


----------



## Jaxidian

If a dev were to tackle this task and "do it right", this would be a huge undertaking that would result in a TON of smali manipulation. The goal is *not* to rebase the ROMs to include TW. Rather, it's to take the required TW framework components and repackage/reorganize them in a way that the TW camera can use. At that point, it becomes either an installable APK or a flashable zip. As said before, this is a *ton* of incredibly tedious (not even the fun kind) of development work, will take a lot of time, and is arguably not worth it. But it's 100% definitely possible unless there's some sort of DRM functionality heavily built into the apps/framework in a tricky/nasty somewhere.

Just realize that Samsung won't be too happy with you making their hard work available to people running competitor's products.

---

What I think the better solution is? Samsung should create this Camera app as a $10 purchase on Google Play and simply let us buy it. Seriously, I don't understand why the OEMs don't do this with more of their custom software. Why not profit on people who choose competitor's products as well as your own? I'd GLADLY pay $10 for the TW camera app!


----------



## blueharford

Jaxidian said:


> If a dev were to tackle this task and "do it right", this would be a huge undertaking that would result in a TON of smali manipulation. The goal is *not* to rebase the ROMs to include TW. Rather, it's to take the required TW framework components and repackage/reorganize them in a way that the TW camera can use. At that point, it becomes either an installable APK or a flashable zip. As said before, this is a *ton* of incredibly tedious (not even the fun kind) of development work, will take a lot of time, and is arguably not worth it. But it's 100% definitely possible unless there's some sort of DRM functionality heavily built into the apps/framework in a tricky/nasty somewhere.
> 
> Just realize that Samsung won't be too happy with you making their hard work available to people running competitor's products.
> 
> ---
> 
> What I think the better solution is? Samsung should create this Camera app as a $10 purchase on Google Play and simply let us buy it. Seriously, I don't understand why the OEMs don't do this with more of their custom software. Why not profit on people who choose competitor's products as well as your own? I'd GLADLY pay $10 for the TW camera app!


what a dev would do, is take the AOSP camera and engineer the features and change the looks of the camera to match or closely match the TW camera... apk hacks are never the *right* way IMO


----------



## Jaxidian

blueharford said:


> what a dev would do, is take the AOSP camera and engineer the features and change the looks of the camera to match or closely match the TW camera... apk hacks are never the *right* way IMO


I meant a proper port. But you are correct. That said, given that there isn't really a comparable camera available for purchase on the market, this is also no easy task. Maybe one of these days, one of the available cameras will catch up with Samsung's camera. I REALLY want to buy a camera that's just as good. Camera + T-Mobile's WiFi calling are the only two reasons I ever consider running TW anymore...


----------



## Mustang302LX

Jaxidian said:


> What I think the better solution is? Samsung should create this Camera app as a $10 purchase on Google Play and simply let us buy it. Seriously, I don't understand why the OEMs don't do this with more of their custom software. Why not profit on people who choose competitor's products as well as your own? I'd GLADLY pay $10 for the TW camera app!


That would be nice!!


----------



## blueharford

Mustang302LX said:


> That would be nice!!


would be nice wouldnt it..... ;-)


----------



## Angus MacGyver

Here is a little proof of concept... 
As stated earlier, the Samsung fascinate (GS1) had an aosp ROM, TSM Pool Party, that used the tw camera. Sbrissen was able to make it work.

Here is a link to that ROM . http://rootzwiki.com/index.php?/topic/2380-[Rom][11/11]-Tsmpoolparty-V1.6---2.3.7

If you check out the change log for version 1.3 it hints at how he was able to do it. 
This is an excerpt from the change log...

"-Note: The TW Cam apk is modified to disable sounds(they were causing FC's), methods were added to my framework to avoid any smali hacking, 3 fw libraries were used from samsung (sec_feature.jar, seccamera.jar, and sechardware.jar)"

Unfortunately, it only worked on that specific ROM due to the tw framework issues. I hope thus info helps someone far smarter then myself 

Sent from my GS³


----------



## bobcaruso

MistaWolfe said:


> CM is based on AOSP. CM would not exist without AOSP (not ASOP as you say). CM builds from AOSP.
> 
> AOSP ROMs are definitely suitable for daily use. Been running aokp nightlies for over a month. Everything works. You must be doing it wrong.
> 
> Finally, you can run AllShare on AOSP. Check the market
> 
> 
> 
> 
> 
> 
> 
> 
> 
> Sent from my SCH-I535 using Tapatalk 2


WTF does ASOP have to do with it, the question is TW, you gonna port TW to CM LoL


----------



## bobcaruso

Jaxidian said:


> FWIW, I'm an IT Director in the energy industry. AOKP and CM10 are both plenty stable enough for me to use for real shit. I dare say that there are times when they are *more stable* than the stock TouchWiz ROM.
> 
> #JustSayin


You're kidding me right? more stable then stock? Have you tried RSA Security token SW? coming from an energy co. they must use it no? until JB is leaked/released for the VZW SGS3, it there's way too many incompatibilities for it to be a DD for me


----------



## blueharford

bobcaruso said:


> WTF does ASOP have to do with it, the question is TW, you gonna port TW to CM LoL


AOSP is what the changes should be ported to not CM there are to many dependance links in cms camera. this would enable other non cm based roms to utilize such modifications easier.


----------



## Jaxidian

bobcaruso said:


> You're kidding me right? more stable then stock? Have you tried RSA Security token SW? coming from an energy co. they must use it no? until JB is leaked/released for the VZW SGS3, it there's way too many incompatibilities for it to be a DD for me


Not kidding you. Yes, some have been more stable than stock. No, we don't use that.

BTW, we're both dragging this thread off-topic. Feel free to start a new thread and PM me a link if you want to continue this conversation there - I'll even move our off-topic comments into that thread.


----------



## abkulp

Jaxidian said:


> Not kidding you. Yes, some have been more stable than stock. No, we don't use that.
> 
> BTW, we're both dragging this thread off-topic. Feel free to start a new thread and PM me a link if you want to continue this conversation there - I'll even move our off-topic comments into that thread.


I agree, I this is off topic, but since it is my thread, let me put my two cents in before it ends. I'm currently running an AOSP rom based on CM10 and AOKP and it is as stable or more than stock, and gets much better battery life. All I'm missing is Samsung's camera, but it really is a small trade off. However if you find aosp custom roms won't run the apps you need (which I believe can happen with any ROM, even stock) than you may opt for staying stock. Isn't that the wonderful thing about android phones though!? We both get what we want (for the most part) with the same device even though we want very different thing! Please, keep your disparaging remarks to yourselves and approach these forums with an open mind.

That being said I appreciate all of the input on this topic. It seems that it may be possible to implement the TW camera on an AOSP ROM, but it would be a lot of work that likely no dev will want to undertake. I'll keep my eye out on the forums for anyone who decides to do this, but for now this is a good enough answer for me.

Sent from my Samsung Galaxy S III


----------



## Jaxidian

abkulp said:


> Please, keep your disparaging remarks to yourselves and approach these forums with an open mind


Didn't think I was being closed-minded or disparaging. I'll bow out - sorry... :-/


----------



## Mustang302LX

abkulp said:


> I agree, I this is off topic, but since it is my thread, let me put my two cents in before it ends. I'm currently running an AOSP rom based on CM10 and AOKP and it is as stable or more than stock, and gets much better battery life. All I'm missing is Samsung's camera, but it really is a small trade off. However if you find aosp custom roms won't run the apps you need (which I believe can happen with any ROM, even stock) than you may opt for staying stock. Isn't that the wonderful thing about android phones though!? We both get what we want (for the most part) with the same device even though we want very different thing! Please, keep your disparaging remarks to yourselves and approach these forums with an open mind.
> 
> That being said I appreciate all of the input on this topic. It seems that it may be possible to implement the TW camera on an AOSP ROM, but it would be a lot of work that likely no dev will want to undertake. I'll keep my eye out on the forums for anyone who decides to do this, but for now this is a good enough answer for me.
> 
> Sent from my Samsung Galaxy S III


I can almost guarantee that AOSP ROMs on the S3 do NOT get better battery life than stock TW ROMs and I'll also say there is no way they are more stable than stock ROMs but you can have you opinion. Also no one was being close minded or disparaging that I saw so maybe you should also keep an open mind and read a bit more before saying otherwise.


----------



## Andre08

Mustang302LX said:


> I can almost guarantee that AOSP ROMs on the S3 do NOT get better battery life than stock TW ROMs and I'll also say there is no way they are more stable than stock ROMs but you can have you opinion. Also no one was being close minded or disparaging that I saw so maybe you should also keep an open mind and read a bit more before saying otherwise.


Idk aosp for me is as stable as stock I have no issues. And I'm getting better battery life than on stock

Sent from my SCH-R530U using Tapatalk 2


----------



## abkulp

Jaxidian said:


> I can almost guarantee that AOSP ROMs on the S3 do NOT get better battery life than stock TW ROMs and I'll also say there is no way they are more stable than stock ROMs but you can have you opinion. Also no one was being close minded or disparaging that I saw so maybe you should also keep an open mind and read a bit more before saying otherwise.


I agree that MOST AOSP ROMs may not get better battery life or be more stable than stock for the GS3, but in my experience the Liquid Smooth 2.0 RC5 definitely has better battery life, although more stable is up for debate.

Sent from my Samsung Galaxy S III


----------



## M Diddy

Gents,

While we're on this topic, have one question.

Short of the features included in the TW camera over AOSP, is there any difference in the quality of photos each camera software takes?

For instance, is TW better in low light than AOSP? Coming from a GNex, I'd love to go back to AOSP, but I know the camera on TW rocks (reason I upgraded) and don't want to lose photo quality.

Thanks!


----------



## minnysota

M Diddy said:


> Gents,
> 
> While we're on this topic, have one question.
> 
> Short of the features included in the TW camera over AOSP, is there any difference in the quality of photos each camera software takes?
> 
> For instance, is TW better in low light than AOSP? Coming from a GNex, I'd love to go back to AOSP, but I know the camera on TW rocks (reason I upgraded) and don't want to lose photo quality.
> 
> Thanks!


+1 I'm also interested in hearing more about the quality of photos on AOSP/CM10/AOKP.


----------



## BlueCross

minnysota said:


> +1 I'm also interested in hearing more about the quality of photos on AOSP/CM10/AOKP.


The quality is the same.

Sent from my SCH-I535 using RootzWiki


----------



## abkulp

M Diddy said:


> Gents,
> 
> While we're on this topic, have one question.
> 
> Short of the features included in the TW camera over AOSP, is there any difference in the quality of photos each camera software takes?
> 
> For instance, is TW better in low light than AOSP? Coming from a GNex, I'd love to go back to AOSP, but I know the camera on TW rocks (reason I upgraded) and don't want to lose photo quality.
> 
> Thanks!


I'm not exactly a photography expert, but I think the samsung camera drivers do a better job with auto contrast and lighting. I know that different drivers process the raw image differently (one of the reasons the One X camera is supposedly one of the best), so it's possible there actually is a difference.

On another note, with the leak of Verizon a JB based official ROM, a ported TW camera is even less desirable since I can now have my jelly beans and eat them too (use the TW camera). Also, it seems that a lot of the attributes I missed from the TW camera are available in the AOSP camera 4.2 plus photo sphere of course, so there's that option for AOSP ROMS.

Sent from my Samsung Galaxy S III


----------



## kjennings15

abkulp said:


> I'm not exactly a photography expert, but I think the samsung camera drivers do a better job with auto contrast and lighting. I know that different drivers process the raw image differently (one of the reasons the One X camera is supposedly one of the best), so it's possible there actually is a difference.
> 
> On another note, with the leak of Verizon a JB based official ROM, a ported TW camera is even less desirable since I can now have my jelly beans and eat them too (use the TW camera). Also, it seems that a lot of the attributes I missed from the TW camera are available in the AOSP camera 4.2 plus photo sphere of course, so there's that option for AOSP ROMS.
> 
> Sent from my Samsung Galaxy S III


I'd say that the one thing that I've missed the mest that I've tried duplicating with third party apps is the TW HDR... It's just so good...


----------



## Jaxidian

M Diddy said:


> I think the samsung camera drivers do a better job with auto contrast and lighting. I know that different drivers process the raw image differently (one of the reasons the One X camera is supposedly one of the best), so it's possible there actually is a difference.


Drivers are in the kernel and have been open source for quite some time.


----------

