Question Unlocking bootloader will disable the camera?

Search This thread

白い熊

Senior Member
Aug 29, 2011
932
314
相撲道
It's really obnoxious of Samsung to do this, and I am in two minds now about keeping the device and working on a fix for the issue, or simply returning the unit in disgust. This is the kind of practice I expect from Apple, and I always tell Apple users to vote with their wallet when confronted with such anti-consumer practices.
It's ridiculous — though on first look it seems as if it could be remedied via access permissions through a non-complicated Magisk module, as you say. Unless Samsung did some deeper despicable stuff that's not apparent now without playing with it deeper…
 
It's ridiculous — though on first look it seems as if it could be remedied via access permissions through a non-complicated Magisk module, as you say. Unless Samsung did some deeper despicable stuff that's not apparent now without playing with it deeper…

I will investigate further this afternoon. I'm rooted now, so returning the device for a refund would be precarious. I knew that when I flashed the device, of course, and made my peace with it.

At the end of the day, I hardly used the camera on my Fold2, and the Fold3 will continue to be my number two device, so it's not a huge loss if we can't get this fixed. At this stage, however, I'm confident we'll manage it one way or another.
 

白い熊

Senior Member
Aug 29, 2011
932
314
相撲道
I will investigate further this afternoon. I'm rooted now, so returning the device for a refund would be precarious. I knew that when I flashed the device, of course, and made my peace with it.

At the end of the day, I hardly used the camera on my Fold2, and the Fold3 will continue to be my number two device, so it's not a huge loss if we can't get this fixed. At this stage, however, I'm confident we'll manage it one way or another.
I'm currently also leaning towards keeping it, rooting even without the camera and messing with it to try and get it working…

Still hesitant a little – as for me it's a primary device, but I got the Flip as secondary anyway, so maybe can rely on it's camera for a while.

But still, I'm hoping they didn't do something downright nasty like Sony, like removing firmware on unlock…

Anyhow curious what you discover too.:)
 

白い熊

Senior Member
Aug 29, 2011
932
314
相撲道
Have you checked to see if the Flip has the same issue?
I just checked – it has the standard message, no “blocking the camera” stuff, so I'd bet it doesn't do it. I don't want to unlock and check, as I've setup my work software on it and it's a giant pain, so don't wanna go through that again.
20210824_164949a.jpg
 
I just checked – it has the standard message, no “blocking the camera” stuff, so I'd bet it doesn't do it. I don't want to unlock and check, as I've setup my work software on it and it's a giant pain, so don't wanna go through that again.View attachment 5392807

Thanks for checking.

If it doesn't mention the camera, then I'm sure it will be unaffected.

But that's interesting, because it's obviously not an issue afflicting all of Samsung's autumn devices. That makes me wonder what's special about the Fold that Samsung felt the need to do this.
 

Applications

Member
Sep 15, 2012
18
0
Thanks for checking.

If it doesn't mention the camera, then I'm sure it will be unaffected.

But that's interesting, because it's obviously not an issue afflicting all of Samsung's autumn devices. That makes me wonder what's special about the Fold that Samsung felt the need to do this.
I wonder what would happen when a new ROM will be installed.
What do you think?
 

JayRolla

Senior Member
Mar 8, 2011
779
110
Well it honestly, looks like what that will be caused by a virus.
Nonetheless, maybe it's Samsung's new way of ensuring you to stay on stock rom so that they can track (and maybe sell) your data, because samsung always does crap different (e.g. odin download mode instead of fastboot, need tar images, csc region code, etc)

OEMs do this more to avoid lots of customer service and warranty issues since users tend to break stuff when they start messing with the device.
 
  • Like
Reactions: LR7875
Yes, my Fold3 (F926B) arrived yesterday and I unlocked its bootloader this afternoon.

I can confirm that all cameras stop working afterwards. This means that facial recognition also fails. Anything that uses any of the cameras will fail.

I tried installing a third-party camera app, but this also failed. I took a logcat of the failure:

Code:
07-12 13:50:51.413  1384 31574 W ServiceManager: Permission failure: android.permission.CAMERA_OPEN_CLOSE_LISTENER from uid=10291 pid=8927
07-12 13:50:51.413  1384 31574 D CameraService: CameraDeviceState for CameraManager
07-12 13:50:51.413  8927  9780 I CameraManagerGlobal: Camera 0 facing CAMERA_FACING_BACK state now CAMERA_STATE_CLOSED for client net.sourceforge.opencamera API Level 1
07-12 13:50:51.413  8927  9780 I CameraManagerGlobal: Camera 1 facing CAMERA_FACING_FRONT state now CAMERA_STATE_CLOSED for client android.system API Level 2
07-12 13:50:51.413  8927  9780 I CameraManagerGlobal: Camera 2 facing CAMERA_FACING_BACK state now CAMERA_STATE_CLOSED for client android.system API Level 2
07-12 13:50:51.414  8927  9780 I CameraManagerGlobal: Camera 20 facing CAMERA_FACING_BACK state now CAMERA_STATE_CLOSED for client android.system API Level 2
07-12 13:50:51.414  8927  9780 I CameraManagerGlobal: Camera 21 facing CAMERA_FACING_BACK state now CAMERA_STATE_CLOSED for client android.system API Level 2
07-12 13:50:51.414  8927  9780 I CameraManagerGlobal: Camera 23 facing CAMERA_FACING_BACK state now CAMERA_STATE_CLOSED for client android.system API Level 2
07-12 13:50:51.414  8927  9780 I CameraManagerGlobal: Camera 3 facing CAMERA_FACING_FRONT state now CAMERA_STATE_CLOSED for client android.system API Level 2
07-12 13:50:51.414  8927  9780 I CameraManagerGlobal: Camera 4 facing CAMERA_FACING_FRONT state now CAMERA_STATE_CLOSED for client android.system API Level 2
07-12 13:50:51.414  8927  9780 I CameraManagerGlobal: Camera 52 facing CAMERA_FACING_BACK state now CAMERA_STATE_CLOSED for client android.system API Level 2
07-12 13:50:51.414  8927  9780 I CameraManagerGlobal: Camera 71 facing CAMERA_FACING_FRONT state now CAMERA_STATE_CLOSED for client android.system API Level 2
07-12 13:50:51.414  8927  9780 I CameraManagerGlobal: Camera 73 facing CAMERA_FACING_FRONT state now CAMERA_STATE_CLOSED for client android.system API Level 2
07-12 13:50:51.414  8927  9780 I CameraManagerGlobal: Camera 91 facing CAMERA_FACING_FRONT state now CAMERA_STATE_CLOSED for client android.system API Level 2
07-12 13:50:51.415  1384 31574 D CameraService: getNumberOfCameras E
07-12 13:50:51.416  1384 31574 W ServiceManager: Permission failure: android.permission.SYSTEM_CAMERA from uid=10291 pid=8927
07-12 13:50:51.416  1384 31574 D CameraService: getNumberOfCameras X: ok
07-12 13:50:51.416  1384 31574 D CameraService: getNumberOfCameras E
07-12 13:50:51.416  1384 31574 W ServiceManager: Permission failure: android.permission.SYSTEM_CAMERA from uid=10291 pid=8927
07-12 13:50:51.416  1384 31574 D CameraService: getNumberOfCameras X: ok
07-12 13:50:51.416  1384 31574 D CameraService: getCameraInfo E: 0

At a glance, I'm confident that this can be fixed using Magisk (i.e. root), but I can't rule out the camera having been disabled in other ways, too. The situation may not be recoverable.

After relocking the bootloader, the camera works again.

It's really obnoxious of Samsung to do this, and I am in two minds now about keeping the device and working on a fix for the issue, or simply returning the unit in disgust. This is the kind of practice I expect from Apple, and I always tell Apple users to vote with their wallet when confronted with such anti-consumer practices.
Hey guys do u think there Will be a fix to the camera problem when i unlock bootloader soon
 

honam1021

Senior Member
May 1, 2011
64
25
Thanks for checking.

If it doesn't mention the camera, then I'm sure it will be unaffected.

But that's interesting, because it's obviously not an issue afflicting all of Samsung's autumn devices. That makes me wonder what's special about the Fold that Samsung felt the need to do this.
I guess someone at Samsung really wants to protect the post processing algorithms for the under screen front camera from reverse engineering, even then disabling all cameras entirely rather than just degrading the quality of the inner front cam seems over the top.
 
Last edited:
I guess someone at Samsung really wants to protect the post processing algorithms for the under screen front camera from reverse engineering, even then disabling all cameras entirely rather than just degrading the quality of the inner front cam seems over the top.
I doubt that's the reason, since one can simply unlock the bootloader, do whatever one wishes and then relock it again.

This is an inconvenience only to those who wish to keep the bootloader permanently unlocked.
 
  • Like
Reactions: 白い熊

Top Liked Posts

  • There are no posts matching your filters.
  • 24
    Did your phone arrive and did you unlock it?

    Yes, my Fold3 (F926B) arrived yesterday and I unlocked its bootloader this afternoon.

    I can confirm that all cameras stop working afterwards. This means that facial recognition also fails. Anything that uses any of the cameras will fail.

    I tried installing a third-party camera app, but this also failed. I took a logcat of the failure:

    Code:
    07-12 13:50:51.413  1384 31574 W ServiceManager: Permission failure: android.permission.CAMERA_OPEN_CLOSE_LISTENER from uid=10291 pid=8927
    07-12 13:50:51.413  1384 31574 D CameraService: CameraDeviceState for CameraManager
    07-12 13:50:51.413  8927  9780 I CameraManagerGlobal: Camera 0 facing CAMERA_FACING_BACK state now CAMERA_STATE_CLOSED for client net.sourceforge.opencamera API Level 1
    07-12 13:50:51.413  8927  9780 I CameraManagerGlobal: Camera 1 facing CAMERA_FACING_FRONT state now CAMERA_STATE_CLOSED for client android.system API Level 2
    07-12 13:50:51.413  8927  9780 I CameraManagerGlobal: Camera 2 facing CAMERA_FACING_BACK state now CAMERA_STATE_CLOSED for client android.system API Level 2
    07-12 13:50:51.414  8927  9780 I CameraManagerGlobal: Camera 20 facing CAMERA_FACING_BACK state now CAMERA_STATE_CLOSED for client android.system API Level 2
    07-12 13:50:51.414  8927  9780 I CameraManagerGlobal: Camera 21 facing CAMERA_FACING_BACK state now CAMERA_STATE_CLOSED for client android.system API Level 2
    07-12 13:50:51.414  8927  9780 I CameraManagerGlobal: Camera 23 facing CAMERA_FACING_BACK state now CAMERA_STATE_CLOSED for client android.system API Level 2
    07-12 13:50:51.414  8927  9780 I CameraManagerGlobal: Camera 3 facing CAMERA_FACING_FRONT state now CAMERA_STATE_CLOSED for client android.system API Level 2
    07-12 13:50:51.414  8927  9780 I CameraManagerGlobal: Camera 4 facing CAMERA_FACING_FRONT state now CAMERA_STATE_CLOSED for client android.system API Level 2
    07-12 13:50:51.414  8927  9780 I CameraManagerGlobal: Camera 52 facing CAMERA_FACING_BACK state now CAMERA_STATE_CLOSED for client android.system API Level 2
    07-12 13:50:51.414  8927  9780 I CameraManagerGlobal: Camera 71 facing CAMERA_FACING_FRONT state now CAMERA_STATE_CLOSED for client android.system API Level 2
    07-12 13:50:51.414  8927  9780 I CameraManagerGlobal: Camera 73 facing CAMERA_FACING_FRONT state now CAMERA_STATE_CLOSED for client android.system API Level 2
    07-12 13:50:51.414  8927  9780 I CameraManagerGlobal: Camera 91 facing CAMERA_FACING_FRONT state now CAMERA_STATE_CLOSED for client android.system API Level 2
    07-12 13:50:51.415  1384 31574 D CameraService: getNumberOfCameras E
    07-12 13:50:51.416  1384 31574 W ServiceManager: Permission failure: android.permission.SYSTEM_CAMERA from uid=10291 pid=8927
    07-12 13:50:51.416  1384 31574 D CameraService: getNumberOfCameras X: ok
    07-12 13:50:51.416  1384 31574 D CameraService: getNumberOfCameras E
    07-12 13:50:51.416  1384 31574 W ServiceManager: Permission failure: android.permission.SYSTEM_CAMERA from uid=10291 pid=8927
    07-12 13:50:51.416  1384 31574 D CameraService: getNumberOfCameras X: ok
    07-12 13:50:51.416  1384 31574 D CameraService: getCameraInfo E: 0

    At a glance, I'm confident that this can be fixed using Magisk (i.e. root), but I can't rule out the camera having been disabled in other ways, too. The situation may not be recoverable.

    After relocking the bootloader, the camera works again.

    It's really obnoxious of Samsung to do this, and I am in two minds now about keeping the device and working on a fix for the issue, or simply returning the unit in disgust. This is the kind of practice I expect from Apple, and I always tell Apple users to vote with their wallet when confronted with such anti-consumer practices.
    10
    Apologies that we haven't really been updating every step along the way the last few days! Joined a telegram group with other devs for fold 3 issues, which now is mostly about the camera, and just kind of been updating each other in the group.

    But we did stumble upon 2 odd things today.
    1 - the newest bootloader force closes the camera app and causes the phone to restart, where the original one just gives you an error message when you try to use the camera.
    2 - when you do try to use the camera, the lens does try to focus, meaning that the drivers and libraries are all loaded up and working properly. And it takes a few seconds for the camera app to say the camera isn't working (because another thread is opened when calling for the camera to the isp to display what the camera sees which takes a moment.)

    Both of those are kind of contradictory.
    (the rest of this comment is purely my opinion and doesn't explicitly represent the opinions of the rest of the dev group)
    The first implies that the actual bootloader impliments the lockout, whereas the second infers that it's software related.

    I potentially think a couple options as to what might be going on.
    1 - going with the simplest idea that should have been checked first, it could be as simple as SafetyNet Attestation built into the camera app that checks if the BL is unlocked right after starting the camera, which would explain the breif delay. So I'm going to check that tomorrow.
    2 - using the camera contexts, you can shut down the isp after the phone has booted as there is a couple of Contexts in the kernel talking about it. Shutting down the isp itself would stop the camera from being able to process and display what the camera sees (explains why opening the app takes a few seconds of black screen to say it doesn't work)
    3 - I know there was a 3, but my brain is fried as I'm about to go go bed so I'll edit-updates tomorrow when I am awake and back at my computer.

    However, this doesn't exactly explain why the new bootloader causes a force close and then phone reboot unless Samsung either messed up code somewhere in the new BL, or did it intentionally to create more frustration. Nor does it say how.

    We are all working very hard on this and working from different angles to try to cover as much ground as possible. Ivan said he had a possible fix, but he's been Mia for a week and no one has been able to get ahold of him so we can't rely on that right now!
    8
    Just to update since it's been a while.
    I have not been able to do a lot with this recently. The team has been working on it, but I have had numerous situations pull me away. Busy season for business since it's starting to get cold so I've been working nonstop. In the process of hiring more people so I can have more free time.

    Really debating doing a few things that I can't talk publicly about atm in order to get more Intel on the camera.
    I do apologize about the lackluster update because I know a lot of people are really looking forward to this
    8
    do you think it would work if i unlock my bootloader then flash a variant firmware then relock it?
    If you try to relock the bootloader with an unsigned firmware, it will brick your phone and you'd have to use Odin to flash factory firmware to fix it.

    I'm getting close to finding solutions, just hang tight.
    Still have half of our kernel code to go through. But I found the camera drivers and source code, which helps me know what to look for
    7
    So I'm not an android developer (been using Linux for 29 years though) and I do not yet have this phone but am planning on it. Still using rooted Note 8.

    Question - did any of you look at this from a different perspective - like what actions happen when you unlock the bootloader? If you can find the instructions that are executed when you "flip that switch" you can see the command that they are running to disable the cameras. I don't know if you can do strings searches for whatever the message is that is shown when you unlock the BL on the phone, but you should be able to download most of the software from / to your PC and search from there. Maybe they're are doing something like a linux module blacklist. I don't know where Android keeps the files like modules.conf (I'll search my rooted Note8 later) but that could be a possibility.

    Are there tools in Android where you can closely monitor when new jobs start to maybe see what happens when the BL is unlocked? If so, then maybe you can upload 'strace' and repeat the process to see what is executed.

    I figure for them to be able to change your phone on the fly that quickly, AND to put it back once the BL is locked (assuming no flashes) it has to be something like a command or a module. Since it also looks to see if anything was flashed I'm leaning towards a program, although if these things still run dm-verity then a command might not be necessary since flashes should be seen on boot.

    If it's a command it could be a new one. Maybe if someone has the earlier Fold (rooted) they could do a "ls -latR /" and someone could do the same on the Fold 3 - then do a diff to see what new commands show up.

    Then again - maybe I'm just too familiar with Linux and there are too many differences with Android. Hopefully this at least helps spur thought.