[FIX][STOCK][4.0.4][14/07]Working Camera + Video on 4.0.4 with non-stock kernels

Status
Not open for further replies.
Search This thread

Tungstwenty

Senior Member
Nov 1, 2011
1,830
4,512
Thanks for the above info!

Best to repeat this message in the Siya thread, and/or send Gokhanmoral this info by PM. He might be able to use Hardcore's sources to fix bluetooth in Siya kernel...


Edit: I see you allready did that. Thanks again! Maybe soon we can have working bluetooth with a custom kernel, that would be great!
I just replied in the Siyah thread. I looked at the sources (patch / diff, really) and there's nothing there related with bluetooth changes, unfortunately.
 

The Undertakerr

Senior Member
Apr 23, 2011
319
175
Tungstwenty fixed the bluetooth on Samsung 4.0.4 Roms in Siyakernel!!!

@Tungstwenty, you truly are The Man.

You are rapidly becoming a legend here on XDA.

Can't thank you enough!!

@People, if you want working bluetooth on 4.0.4 Sammy Roms, go read the Siya read and don't forget to thank Tungstwenty&Gokhanmoral!
 

Tungstwenty

Senior Member
Nov 1, 2011
1,830
4,512
Thanks! :)

Yesterday I decided to have a new look at what Krendelrus shared.
Even though hardcore's patch doesn't contain a direct fix for BT, I did dig into the N7000 sources from Samsung that he's using.
Since the BT chip is the same I decided to try replacing our driver with N7000's and it turns out they were more recent I guess and include the stuff that I9100 4.0.4 ROMs were expecting from the kernel.
 

The Undertakerr

Senior Member
Apr 23, 2011
319
175
Thanks! :)

Yesterday I decided to have a new look at what Krendelrus shared.
Even though hardcore's patch doesn't contain a direct fix for BT, I did dig into the N7000 sources from Samsung that he's using.
Since the BT chip is the same I decided to try replacing our driver with N7000's and it turns out they were more recent I guess and include the stuff that I9100 4.0.4 ROMs were expecting from the kernel.

Yesterday, I also tried to find a fix.

I found bluetooth traces in several frameworks:

-services.jar
-secframework.jar
-framework2.jar
-And many many bluetooth changes in framework.jar.

I compared LPG frameworks with LPM frameworks.

I compiled the above framework bluetooth related smali's with LPM frameworks.

All went ok, till I started working on framework.jar. Even the smallest bluetoothchange I made there, resulted in a not booting device:silly:

I spent hours on it; so, glad you fixed it the way it was supposed to, in the kernel!
 

Tungstwenty

Senior Member
Nov 1, 2011
1,830
4,512
What I tried before was changing not the framework but rather the libs, that interface the apps with the kernel (like was done for the camera+video).
But I didn't find a solution that way, and that's why I was convinced a fix would not be achievable unless a new kernel source release was made by Samsung. Well, they didn't do it for I9100 yet but what they did for N7000 was usable at least on the bluetooth part.
 

The Undertakerr

Senior Member
Apr 23, 2011
319
175
What I tried before was changing not the framework but rather the libs, that interface the apps with the kernel (like was done for the camera+video).
But I didn't find a solution that way, and that's why I was convinced a fix would not be achievable unless a new kernel source release was made by Samsung. Well, they didn't do it for I9100 yet but what they did for N7000 was usable at least on the bluetooth part.

Yes.

My thinking was to replace the LPM bluetooth libs+apks, with LPG bluetooth libs+apk's, and then make the changes to the framework-files which are connected with the bluetooth libs+apk's.

0% chance of success, but I thought to be maybe lucky once, lolllzzz

Glad it is properly fixed!
 

43358005

Member
Oct 21, 2011
15
30
There are plenty of people complaining about camera and video playback problems when using custom kernels on the newest 4.0.4 builds such as XXLQ5 or XWLPM .
I tried a few things and managed to find a fix for it.


Installation
Just take the CWM zip file and apply it on your ROM. It will leave a backup of the 2 files that will be replaced.

Removal
The Restore zip can be "installed" to remove the patched files and put back the original ones that were kept on your device.


Tested and working both for Camera preview and Video playback, on XWLPM.


Note: This is a temporary fix until the kernel devs have enough information to properly update their code, and when that happens this fix can be uninstalled.

:good:
Thanks mate!
This is really greate work! the fix also works in ZCLPL (The 4.0.4 builds for China).
 

mzone1510

Senior Member
Jan 2, 2011
357
19
Goa\Kuwait
Are all kernels based on update 6 fully compatible (no camera/bt problems etc) with 4.04 stock roms? I know NEAK is but which others?
 

Tungstwenty

Senior Member
Nov 1, 2011
1,830
4,512
Are all kernels based on update 6 fully compatible (no camera/bt problems etc) with 4.04 stock roms? I know NEAK is but which others?
Update 6 sources show camera/video + bluetooth problems on 4.0.4 stock roms. Custom kernels based on them will therefore have those issues.

The camera/video fix in this thread solves that part for any custom kernel.
As for bluetooth, I fixed that on Siyah kernel itself (version 3.4.1) - a driver needed to be replaced. I'm not sure if other custom kernels have also included that change. If so, bluetooth should work on those as well in addition to Siyah.
 

cdaarif

Senior Member
Apr 12, 2012
578
131
Xiaomi Redmi 3S
Samsung Galaxy M32
Update 6 sources show camera/video + bluetooth problems on 4.0.4 stock roms. Custom kernels based on them will therefore have those issues.

The camera/video fix in this thread solves that part for any custom kernel.
As for bluetooth, I fixed that on Siyah kernel itself (version 3.4.1) - a driver needed to be replaced. I'm not sure if other custom kernels have also included that change. If so, bluetooth should work on those as well in addition to Siyah.

Hay man tnx for da fix for Siyah 3.4.x. In Galaxian kernel( only for stock rom4.0.4 ) 0p said camera, video & bt work like a charm. Is it true ?

Sent from my GT-I9100 using xda app-developers app
 

The Undertakerr

Senior Member
Apr 23, 2011
319
175
Hay man tnx for da fix for Siyah 3.4.x. In Galaxian kernel( only for stock rom4.0.4 ) 0p said camera, video & bt work like a charm. Is it true ?

Sent from my GT-I9100 using xda app-developers app

What exactly is your question? You ask Tungstwenty if it's true that camera and bluetooth are working on Galaxian Kernel?

Maybe you should try the kernel, and tell us, lollzzzzz
Or maybe you should ask in that thread!

But to answer you question, yes that's true. Because that kernel is build from 4.0.4 sources. With that kernel, bluetooth and camera will work on Samsung 4.0.4 Roms, without the need of any additional fix. Same for Speedmod kernel. Also built on 4.0.4 sources, so no fix needed for bluetooth or camera...
 
  • Like
Reactions: cdaarif

hyperbolic

Senior Member
Jul 27, 2011
307
420
Sin City
Just to be clear about the flashing procedure with CWR,
I put the file: I9100-404-CameraFix-CustomKernels.zip at the root of the phone, go to recovery->install zip file, choose that file and flash it correct ?

Thx.
 

Tungstwenty

Senior Member
Nov 1, 2011
1,830
4,512
Just to be clear about the flashing procedure with CWR,
I put the file: I9100-404-CameraFix-CustomKernels.zip at the root of the phone, go to recovery->install zip file, choose that file and flash it correct ?

Thx.
Place it anywhere on the internal storage, for instance (/sdcard/...). Then in CWM recovery select install zip file, select file from internal storage, choose the file and flash.
Or the same for an external sdcard, it you have one and prefer that way.
 
  • Like
Reactions: hyperbolic

umberto1978

Senior Member
Sep 9, 2011
538
656
Huawei Mate 10
OnePlus 8 Pro
Good morning to all.
Really strange thing: with your fix, 4.0.4 rom and siyah 3.4.1 camera works ok, when i switch to siyah 4.0.1 (without removing the fix) camera show the ugly red spot on center o_O
If i restore the original files using your restore i still have red spot. Anyone else facing this?
 

Tungstwenty

Senior Member
Nov 1, 2011
1,830
4,512
Good morning to all.
Really strange thing: with your fix, 4.0.4 rom and siyah 3.4.1 camera works ok, when i switch to siyah 4.0.1 (without removing the fix) camera show the ugly red spot on center o_O
If i restore the original files using your restore i still have red spot. Anyone else facing this?
I think the red spot has always been a problem, no?
Can you try with different kernels (either 4.0.4 "aware", or older but with the replacement libs) and see if the problem goes away? I'm not sure weather the kernel includes firmware code that is updated on the camera sensor.
 
  • Like
Reactions: umberto1978

mbruurs

New member
Jan 14, 2009
1
0
There are plenty of people complaining about camera and video playback problems when using custom kernels on the newest 4.0.4 builds such as XXLQ5 or XWLPM .
I tried a few things and managed to find a fix for it.


Installation
Just take the CWM zip file and apply it on your ROM. It will leave a backup of the 2 files that will be replaced.

Removal
The Restore zip can be "installed" to remove the patched files and put back the original ones that were kept on your device.


Tested and working both for Camera preview and Video playback, on XWLPM.


Note: This is a temporary fix until the kernel devs have enough information to properly update their code, and when that happens this fix can be uninstalled.

I tried to apply this and after the reboot there is a message:
E:failed to seek in /cahce/update.zip (Invalid argument)
E:signature verification failed
Installation aborted.

Is there another way to solve the black camera issue?
 
Status
Not open for further replies.

Top Liked Posts

  • There are no posts matching your filters.
  • 61
    Obsolete

    This workaround was only relevant some time ago while custom kernels did not yet have updated sources from Samsung to work on 4.0.4 ROMs. This is no longer the case so this info is completely irrelevant now.


    There are plenty of people complaining about camera and video playback problems when using custom kernels on the newest 4.0.4 builds such as XXLQ5 or XWLPM .
    I tried a few things and managed to find a fix for it.


    Installation
    Just take the CWM zip file and apply it on your ROM. It will leave a backup of the 2 files that will be replaced.

    Removal
    The Restore zip can be "installed" to remove the patched files and put back the original ones that were kept on your device.


    Tested and working both for Camera preview and Video playback, on XWLPM.


    Note: This is a temporary fix until the kernel devs have enough information to properly update their code, and when that happens this fix can be uninstalled.
    4
    Thanks! :)

    Yesterday I decided to have a new look at what Krendelrus shared.
    Even though hardcore's patch doesn't contain a direct fix for BT, I did dig into the N7000 sources from Samsung that he's using.
    Since the BT chip is the same I decided to try replacing our driver with N7000's and it turns out they were more recent I guess and include the stuff that I9100 4.0.4 ROMs were expecting from the kernel.
    4
    I'm getting offtopic here, because it has nothing to do with your camera fix:)

    But I'm still investigating the matter now as we speak.

    When on Siya, only a full wipe solves the problem I have above.

    Because I'm curious(And lazy), I restored my Nandroid Data backup again(XWLPG nandroid with Siya 3.3.2) I only restore data.
    Then I have the above problem again.

    Now the strange part: Also Dorimanxx Kernel solves my problem.

    So this thing I have, seems to be contained to SIYA kernel.
    When I flash back to Siya, I have the problem again.(All new Siya versions tested)
    Flashing then to any other Kernel, problem solved again.

    But Siya can't be the problem also, because when I fully wipe also Siya will work.

    I'm going further back to an older Siya to try if it makes any difference, but I think this will become one of the "android secrets" I will never find the cause of...

    Sorry for the offtopic.
    I don't think it's offtopic :)

    This is indeed very strange, but here's a possible explanation:
    The custom kernels (Siyah, Dorimanxx, ...) each have their own tweaks; they're not exactly the same. While they might share lots of common changes and improvements, they do have different things hence the word "custom".
    There's a possibility that the sequence of events to make the camera work is contained not only on the binaries (the ones in the zip file I posted), but also on some cached data that was already picked up when you first ran the camera app, which invoked a service, which in turn invoked a library, etc. Later, when reopening the camera, now with the "fixed" binaries, there might still be bad data that a particular kernel is not expecting. Even if you came from Siyah when initially running the camera app, the original libraries might have cached strange data that the kernel will no longer recognize even after the binaries are now in line with the kernel. And another kernel might have code that is lenient enough to still work with it.

    I have been fiddling with the bluetooth part to try to make it work, and this was exactly one of my steps. Whenever attempting code changes, I wiped all the data to make sure the device is starting fresh and if it doesn't work, it isn't due to bad starting data but only the code.
    Unfortunately, none of the several things I tried worked and I don't think it's very likely I'll find a solution for bluetooth.
    2
    Are all kernels based on update 6 fully compatible (no camera/bt problems etc) with 4.04 stock roms? I know NEAK is but which others?
    Update 6 sources show camera/video + bluetooth problems on 4.0.4 stock roms. Custom kernels based on them will therefore have those issues.

    The camera/video fix in this thread solves that part for any custom kernel.
    As for bluetooth, I fixed that on Siyah kernel itself (version 3.4.1) - a driver needed to be replaced. I'm not sure if other custom kernels have also included that change. If so, bluetooth should work on those as well in addition to Siyah.
    2
    Thanks for the above info!

    Best to repeat this message in the Siya thread, and/or send Gokhanmoral this info by PM. He might be able to use Hardcore's sources to fix bluetooth in Siya kernel...


    Edit: I see you allready did that. Thanks again! Maybe soon we can have working bluetooth with a custom kernel, that would be great!
    I just replied in the Siyah thread. I looked at the sources (patch / diff, really) and there's nothing there related with bluetooth changes, unfortunately.