Archfx/duo-de

Surface Duo 2 camera only shows front facing camera, back facing unable to be used. Cannot use flashlight.

Ethanol10 opened this issue ยท 23 comments

Acknowledgements

  • I have chosen an appropriate title.
  • All requested information has been provided properly.
  • This is not a feature request.
  • This issue is not a duplicate of an existing issue.
  • The issue is solely related to this GSI.
  • This issue occurs with the latest available build.
  • I am not running a custom vendor on my device.
  • This issue is not kernel related.
  • This issue is not related to Magisk/KernelSU/APatch.

Info

  • Device: Surface Duo 2
  • GSI version: treble_arm64_bgN
  • Build number: treble_arm64_bgN-userdebug 14 AP2A.240705.005.A1 eng,aruna.20240724.233712

Expected Behavior

Camera should allow switching between back and front cameras.

Flashlight should be activatable from the status bar dropdown.

Current Behavior

Currently, the front facing camera only works. I cannot switch to the back camera, and the flashlight is disabled when trying to turn it on in the status bar.

Possible Solution

Possibly happening because the camera is handled only for SD1?

Steps to Reproduce

  1. Open AOSP camera app
  2. Camera has no option to switch

Flashlight Issue

  1. pull down the status bar
  2. Flashlight reports it being in use.

Logs

No response

Additional context

No response

It is a bit unexpected since the camera is handled through an abstraction layer, therefore it is not device-specific.
I want to confirm this issue with multiple devices. Let's see what other user's responses are.

@Clanceeinfinity, @Jokez2785 can you confirm this please?

for me my front camera works fine, my 1x back works fine aswell but the 2x and .5x can't be used. I also faced issues in the app BeReal, it says that my camera can't be used at all.
My flashlight also works fine!

also small update on the apps vanishing bug, it didn't happen again, but sometimes it says the device carrier app has been installed after rebooting so maybe it got deleted and reinstalled? idk tho.

for me my front camera works fine, my 1x back works fine aswell but the 2x and .5x can't be used. I also faced issues in the app BeReal, it says that my camera can't be used at all.
My flashlight also works fine!

Thanks

@Ethanol10 Unfortunately this issue is on your particular device since other users cannot reproduce. If you migrated from the previous Android 13/14 pixel experience, I suggest following the steps mentioned for Android 12L for flashing the ROM. This clean install everything, and may fix your issue if it is not a hardware-related problem.

for me my front camera works fine, my 1x back works fine aswell but the 2x and .5x can't be used. I also faced issues in the app BeReal, it says that my camera can't be used at all.
My flashlight also works fine!

Thanks

@Ethanol10 Unfortunately this issue is on your particular device since other users cannot reproduce. If you migrated from the previous Android 13/14 pixel experience, I suggest following the steps mentioned for Android 12L for flashing the ROM. This clean install everything, and may fix your issue if it is not a hardware-related problem.

I've tried the same steps on 12L about 3 times, still doesn't seem to register the camera on full wipe and reinstallation into 14. I'm pretty sure it's not a hardware issue as the camera works in 12L stock every time when I've reverted back. What other avenues can I take?

@Ethanol10 are you sure you followed all the steps correctly?

Yes, I made sure to only wipe the right partition for the system partition, and wiped specifically system_ext and product. Wiped user data on top just to make sure.

However I noticed whenever I needed to rollback I could not use the recovery image from Microsoft (From here) as it seems to be older than the last update on 12L, (I tried using this image by going through adb sideload). This might be an issue, as I had to manually flash every image from the recovery image supplied by microsoft (by unpacking using payload-dumper-go) back onto each respective partition to get it to boot back into 12L.

Have you had to enter your serial number to download the recovery image?
Did you reboot the device as stated in step4 in the readme just after flashing this ROM?

However I noticed whenever I needed to rollback I could not use the recovery image from Microsoft (From here) as it seems to be older than the last update on 12L.

Ohh I see, this is because Microsoft released an update for DUO2 very recently. I see now

They might have made some changes to the duo2 kernel. Could you please put the kernel version of the device, Device settings have that information.

Current Kernel version:
5.4.233-qgki-c1-p-2023_501_24
#1Fri May 31 06:57:21 UTC 2024

I am building a new release with an updated Android revision, let's see the effect.

Hey @Ethanol10, please try the latest release and let me know.

Hey @Ethanol10, please try the latest release and let me know.

Hey @Archfx , I followed the steps from the 12L again with the new release, seems like the camera is still only recognizing the front.

After messing with some of the settings in phh treble, it seems like I can get the torch/flash to work by using an alternate camera profile under qualcomm settings? However this causes the camera to become unresponsive entirely.

While booting the camera up, it mentions that it cannot connect to the camera.

An update to this, I did get a new recovery image from Microsoft so now payload dumper go isn't required. However, even after adb side loading a recovery image and redoing the steps as specified in the README, the camera is still bugged.

I have repeatedly re booted to apply the suggested changes to no avail.

Hello Ethan,

Let's look at your log file. Please follow these steps and attach the log.txt here,

adb -d logcat > log.txt

Repeat the steps to recreate the issue.

There will be two camera apps in the app drawer, try opening both of them. You don't have to reboot multiple times, just first time you flashed the image is enough. Let's see whether we can fix this issue, however we can't guarantee since this is reported only on one device, it could be a device issue, user error or any other.
Thanks, Let me know

Hi @Archfx , I've attached the log here:
log.txt

Mmm interesting, looks like the device is missing a package

PackageManager: updateAllSharedLibrariesLPw failed: Package com.microsoft.surface.camera.v2 requires unavailable shared library com.microsoft.device-private; failing!
ActivityManager: Process com.microsoft.surface.camera.v2 (pid 9425) has died: prcp TOP 

Hmm, is that package included in the 12L recovery IMG?

  • @Archfx It turns out the device had some camera hardware fault in stock, so I'll replace the device and test it again when I can.

Thanks for the information

@Archfx tested with new device, It works fine!

This is a hardware issue.