FP4 - gcam-port

Thanks Razem that’s a great reply. It’s probably a tough thing to get right without the resources of a Google, Samsung, Apple etc. where they can just throw enormous amounts of money at the software to get the most out of the hardware,

Is it possible to install gcam in parallel with stock?

1 Like

Yes, it’s what I did :slight_smile:
I can take photos with both.


Does anyone use one of the mentioned GCam ports under CalyxOS?

What has to be done exactly, when I don’t have (and don’t want) install Google Services (nor microg)?

I understand that there are some open bugs to fix by Fairphone so that e.g. all 48MPixel can be used as well as all lenses (wide angle camera is missing right now) etc. - Camera & Camera2 API - missing features & bugs

But which port should finally be used and how to set it up?

I saw and tried:

No matter which one I tried it directly crashes after the start.

Hadn’t used them before, but I just tried it and all three work fine on the latest Calyx release with their GCam Photos Preview installed.

With microG though, if you don’t want to use it have a look at Gcam Services Provider, that only implements the necessary APIs for GCam to function. Haven’t tried it on the FP4 (yet), YMMV :man_shrugging:

1 Like

I tried the Gcam Service provider, but is always says:
“App not installed as package conflicts with an exiting package.” (I should use the photos apk in my case I assume, but the basic apk shows the same problem)

Wondering what the package name of it it is and why it thinks, that it is is already there :thinking:

Are you trying to install the app-photos-release.apk version? That one get’s installed as com.google.android.apps.photos (the other one as de.lukaspieper.gcam.services rather unlikely to conflict with sth).

I’m not sure if CalyxOS ships with GCam Photos Preview installed by default, either search for it in the settings or use adb shell pm list packages -f com.google.android.apps.photos.
That’s using the same package name as the GCam Services Provider “photos” version to achieve the same thing, faking Google Photos.

Edit: Ah, sorry didn’t read that second part that both show the same behaviour :man_facepalming:
Interesting, you don’t have microG installed at the moment, right? :thinking:

Yes I already tried to figure out what is the issue here.
I used termux on the phone directly to check for google packages:
pm list packages -f | grep google

I saw a com.google.android.apps.photos and removed it. Still the service provides apks fail to install :thinking:

And yes also right, the “GCam Photos Preview” apk creates a com.google.android.apps.photos as well.

I don’t have microg installed, that is true.

Another package confused me → com.google.android.gsf probably another fake package, which was installed during one of my attempts to make this working.

Were you able to simply uninstall it or did you use pm uninstall --user 0 com.google.android.apps.photos? If it’s the latter have a look at the earlier discussions in this topic, starting here.

Could you check the path that’s installed to? :pray: pm list packages -f gsf (you don’t need to pipe to grep, pm will just search on its own).
The microG one is located in /product/app/GsfProxy/GsfProxy.apk, so clearly recognizable.

Hm seems to be the microg one:
No clue when this was set up.

The photos package is here:

I will read the linked topic. Thx

Are you sure you removed microG in the setup wizard? :thinking:
Calyx ships with microG by default, and you have to untick the checkbox on first boot to remove it.

I don’t remember that I un-ticked something explicitly. I just remember that I skipped the setup during the phone setup.

If you have a microG app in your app drawer, or you find something when searching for microG in the settings, you are definitely running microG.

Huh, if that’s the case, those GCam versions should have worked just fine :thinking:

I looked for micro and gsf in all apps (showed system apps before) + in settings there is no microg stuff (used the search there as well)

Maybe I can just remove the gsf package as well with pm uninstall ...

Btw. what was the difference again between:
pm uninstall com.google.android.apps.photos
pm uninstall --user 0 com.google.android.apps.photos

Uninstall for user 0 versus uninstall completely (only possible with root)


No microG but GsfProxy, interesting. Maybe the Calyx setup wizard only disables it and it somehow got reenabled, not exactly sure how they implemented that :man_shrugging:

In any case, since you are running Magisk, I’d just create an overlay module to remove those apps, easier to revert if things go sideways.

  • Create a folder for it su -c mkdir /data/adb/modules/NoG
  • Create empty subfolders for gsf su -c mkdir -p /data/adb/modules/NoG/system/product/app/GsfProxy and have it replace the system one su -c touch /data/adb/modules/NoG/system/product/app/GsfProxy/.replace
  • Remove the updates for Google Photos pm uninstall-system-updates com.google.android.apps.photos, check it’s path pm list packages -f com.google.android.apps.photos and repeat the previous step with that information
  • Reboot, check if both apps are gone and try installing Gcam Service Provider again
1 Like

Hey @hirnsushi, what is the intention of your proposal?
Shouldn’t I save what is in /product/app/GsfProxy/GsfProxy.apk? before overwriting something?

Or what is the purpose of:

Uninstalling the photos updates etc. is clear so far.

On of Magisk’s features is to create an overlay file system which lets you modify / replace system files without touching the underlying file system.

touch /data/adb/modules/NoG/system/product/app/GsfProxy/.replace creates a file that just tells Magisk to overlay your empty folder over the system one, effectively masking its real content while Magisk is active. (Magisk - The Magic Mask for Android, as the tagline says :slightly_smiling_face:)
Have a look at the documentation if you want to dive in deeper. (had a look myself and noticed a little error in the paths in the previous post, which I’ve corrected :see_no_evil: )

After a reboot your system sees the folder you created, which in this case makes it appear like GsfProxy.apk isn’t installed, enabling you to install your Gcam helpers which might have conflicted with it.

Ok, I will try that even I did not get how Magisk “replace”/hide exactly this folder?
with this path for the .replace file:

/data/adb/modules/ as far as I read is the default path for modules
... NoG/system/ ... ? probably some standard path to hide something … and the rest of the path is self-explaining.

You are right about /data/adb/modules/ :+1:

NoG/ is just what I named the module, since you want even less than microG :smirk:
Feel free to call it whatever you like.

NoG/system is where you put stuff for Magisk to overlay over the real /system folder. Have a look at the real /system folder on your phone, there are symlinks to /product, /system_ext and /vendor in there. Magisk expects you to prefix /system if you want to change something in those folders.
From the docs:

If you want to replace files in /vendor, /product, or /system_ext, please place them under system/vendor, system/product, and system/system_ext respectively. Magisk will transparently handle whether these partitions are in a separate partition or not.

1 Like

When I try: adb shell pm uninstall-system-updates com.google.android.apps.photos
I get

Exception occurred while executing 'uninstall-system-updates':
java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.content.pm.ApplicationInfo.isUpdatedSystemApp()' on a null object reference
	at com.android.server.pm.PackageManagerShellCommand.uninstallSystemUpdates(PackageManagerShellCommand.java:462)
	at com.android.server.pm.PackageManagerShellCommand.onCommand(PackageManagerShellCommand.java:301)
	at com.android.modules.utils.BasicShellCommandHandler.exec(BasicShellCommandHandler.java:97)
	at android.os.ShellCommand.exec(ShellCommand.java:38)
	at com.android.server.pm.PackageManagerService.onShellCommand(PackageManagerService.java:24825)
	at android.os.Binder.shellCommand(Binder.java:950)
	at android.os.Binder.onTransact(Binder.java:834)
	at android.content.pm.IPackageManager$Stub.onTransact(IPackageManager.java:4847)
	at com.android.server.pm.PackageManagerService.onTransact(PackageManagerService.java:8883)
	at android.os.Binder.execTransactInternal(Binder.java:1184)
	at android.os.Binder.execTransact(Binder.java:1143)

I don’t know if this is really necessary as the CalyxOS Gcam Service Provider already represents this package. I will reboot and give GCam another try.