0

In this device with AOSP 10, I have currently the LegacyCamera API for the camera but I want to replace it with Camera2.

What should I change to have it build and install Camera2 by default instead of LegacyCamera?

Thanks

1 Answer 1

0

(I'm assuming you mean the LegacyCamera and Camera2 applications, not APIs)

Somewhere in your device's .mk files, there's a line that adds the LegacyCamera package, probably something like

  PRODUCT_PACKAGES += LegacyCamera

Replace LegacyCamera with Camera2 in that line.

4
  • Hi, I did mean the application, not the API. I have added the PRODUCT_PACKAGES += Camera2 line in the .mk file but it is not building it. It installs the app when I build it manually, but it doesn't build it automatically. If I do a make clean, it the app won't be there after I install. Do you know what else I might need to add?
    – jesusjimsa
    Commented Jul 22 at 13:19
  • My only thought is that you're not changing it in the right .mk file. Do other changes to the .mk file get reflected in the built product? Commented Jul 22 at 21:15
  • In one of the .mk files I modified, if I include LegacyCamera, it gets installed. However, if I replace LegacyCamera with Camera2, LegacyCamera disappears and Camera2 is not installed. I'll try with other .mk files anyway,
    – jesusjimsa
    Commented Jul 23 at 12:19
  • That's very odd. Unfortunately I don't know why it's behaving like that. Commented Jul 23 at 16:47

Not the answer you're looking for? Browse other questions tagged or ask your own question.