Archfx / duo-de

Surface Duo Desktop Experience (Android 14 | 🍰 AOSP | Custom ROM | Treble GSI | Stable | Duo1 | Duo2)
https://archfx.github.io/projects/duo/
Other
23 stars 0 forks source link

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

Closed Ethanol10 closed 4 weeks ago

Ethanol10 commented 1 month ago

Acknowledgements

Info

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

Archfx commented 1 month ago

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?

Clanceeinfinity commented 1 month ago

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!

Clanceeinfinity commented 1 month ago

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.

Archfx commented 4 weeks ago

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.

Ethanol10 commented 4 weeks ago

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?

Archfx commented 4 weeks ago

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

Ethanol10 commented 4 weeks ago

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.

Archfx commented 4 weeks ago

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?

Archfx commented 4 weeks ago

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

Archfx commented 4 weeks ago

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.

Ethanol10 commented 4 weeks ago

Current Kernel version: 5.4.233-qgki-c1-p-2023_501_24

1Fri May 31 06:57:21 UTC 2024

Archfx commented 4 weeks ago

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

Archfx commented 4 weeks ago

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

Ethanol10 commented 4 weeks ago

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.

Ethanol10 commented 3 weeks ago

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.

Ethanol10 commented 3 weeks ago

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.

Archfx commented 3 weeks ago

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

Ethanol10 commented 3 weeks ago

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

Archfx commented 3 weeks ago

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 
Ethanol10 commented 3 weeks ago

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

Ethanol10 commented 1 week ago
Archfx commented 1 week ago

Thanks for the information

Ethanol10 commented 6 days ago

@Archfx tested with new device, It works fine!

This is a hardware issue.