FP4 - gcam-port

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
and
pm uninstall --user 0 com.google.android.apps.photos
?

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

3 Likes

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:
/data/adb/modules/NoG/product/app/GsfProxy/.replace
?

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?
/product/app/GsfProxy/
with this path for the .replace file:
/data/adb/modules/NoG/system/product/app/GsfProxy/
:thinking:

/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.

Still the same, all the GCams directly crash. :-/

Logcat of the start filtered to google

Hmm hmm hmm :thinking:
Were you able to install GCam Service Provider without issues this time (the non photo variant since you still got GCam Photos Preview installed)? Did you check if GsfProxy still exists?

Same for me, just tried it. I thought from the weird path in pm list packages -f it’s been updated (that’s usually why you get random symbols in between), but I guess that’s not it…

It’s looking for com.google.android.gsf.gservices, that should be supplied by GCam Service Provider, wonder why that’s not working :thinking:

I think I mixed something up.

I only have Calyx proviced GCam Photos Preview installed. → this is the installed com.google.android.apps.photos package.

GCam Service Provider is still missing. As photos package is already there, the basic lukaspieper provider apk (here) should be enough.
When I try to install it (even with the NoG hiding module running) it still fails with "App not installed as package conflicts with an exiting package.”

I guess the module is not hiding/overlaying correctly?
You said:

How can I do this? I think
pm list packages -f gsf
will always see it or is this the way to test?

If this is the right test the package is still visible. Excuted as root in termux directly on the phone:

:/ # pm list packages -f gsf
package:/product/app/GsfProxy/GsfProxy.apk=com.google.android.gsf

Nope, the package shouldn’t be visible anymore.

I would start fresh, delete the /NoG folder and follow the instructions again, make sure the module shows up in Magisk Manager afterwards and don’t forget to reboot.

I just tried it, works fine for me, no more GSF :slightly_smiling_face:

Ok step by step.

I just switched to root as I have to type all the commands via root anyway.
adb shell su -
I was wondering why adb root is not working anymore which I could use on my FP2 – maybe a developer setting is missing, will check later on

  • checked the folder via adb:
ls -l /data/adb/modules/
total 3
drwxr-xr-x 3 root root 3488 1970-01-14 14:30 google_glide_lib

–> so everything is fine only glide lib module (which is not working ^^) is left
so I skipped deleting the module folder manually

  • you are right about the links under /system (not it is much more clear to me - thx)
ls -l /data/adb/modules/
total 3
drwxr-xr-x 3 root root 3488 1970-01-14 14:30 google_glide_lib
ls -la /system
total 60
drwxr-xr-x 12 root root   4096 2009-01-01 01:00 .
drwxr-xr-x 26 root root   4096 2009-01-01 01:00 ..
drwxr-xr-x  2 root root   4096 2009-01-01 01:00 apex
drwxr-xr-x 24 root root   4096 2009-01-01 01:00 app
drwxr-x--x  4 root shell  7960 1970-01-16 13:41 bin
-rw-------  1 root root   5462 2009-01-01 01:00 build.prop
drwxr-xr-x 16 root root   4096 2009-01-01 01:00 etc
drwxr-xr-x  2 root root   8192 2009-01-01 01:00 fonts
drwxr-xr-x  5 root root   4096 2009-01-01 01:00 framework
drwxr-xr-x  5 root root  12288 2009-01-01 01:00 lib
drwxr-xr-x  5 root root  11280 1970-01-16 13:41 lib64
drwxr-xr-x 39 root root   4096 2009-01-01 01:00 priv-app
lrw-r--r--  1 root root      8 2009-01-01 01:00 product -> /product
lrw-r--r--  1 root root     11 2009-01-01 01:00 system_ext -> /system_ext
drwxr-xr-x  7 root root   4096 2009-01-01 01:00 usr
lrw-r--r--  1 root root      7 2009-01-01 01:00 vendor -> /vendor
  • so the annoying package is still available under
ls -l /system/product/app/GsfProxy/
total 36
-rw-r--r-- 1 root root 29570 2009-01-01 01:00 GsfProxy.apk
drwxr-xr-x 3 root root  4096 2009-01-01 01:00 oat

also the package still available/visible via pm command

pm list packages -f gsf
package:/product/app/GsfProxy/GsfProxy.apk=com.google.android.gsf
  • let’s setup the overlay/hide module again:
mkdir /data/adb/modules/NoG
mkdir -p /data/adb/modules/NoG/system/product/app/GsfProxy
touch /data/adb/modules/NoG/system/product/app/GsfProxy/.replace

ls -la /data/adb/modules/NoG/system/product/app/GsfProxy/
total 6
drwxr-xr-x 2 root root 3488 2022-08-12 22:49 .
drwxr-xr-x 3 root root 3488 2022-08-12 22:48 ..
-rw-r--r-- 1 root root    0 2022-08-12 22:49 .replace

→ reboot

pm list packages -f gsf
... *nothing*
ls -l /system/product/app/GsfProxy/
total 0

So I assume there was a typo before or so. :man_shrugging:

So far so good.

Tried to install basic apk of Gcam-Services-Provider: Releases · lukaspieper/Gcam-Services-Provider · GitHub again. Just by taping on in in the file manager on the phone.
Result: "App not installed as package conflicts with an exiting package.” :roll_eyes:

Hi, ok new fp4 arrived, very stoked. Standard camera app looks to have improved judging by the initial complaints and my experiences so far.

I’d like to try gcam, what’s the latest and greatest version I can install alongside stock camera?

I just picked the newest one from the release page and it’s been working almost flawlessly, but I’ve only used it (and GCam in general) for a few days.

There are versions with different package names available, so you can test different mods at the same time, since they can differ in features quite heavily. I’m personally not at a point to recommend one over the other :man_shrugging:

Pick up a few, try them and if one offers the features you need and is stable, that’s the one :slightly_smiling_face:

1 Like

Alright, let’s get this finished.

Remove your NoG module and forget about gsf, that was a red herring.
I pushed the Gcam-Services-Provider basic package to /data/local/tmp, tried installing with pm install /data/local/tmp/app-basic-release.apk and can report it’s been gms that’s conflicting here. (This bug report served as great inspiration here)
Should have read the Calyx documentation more closely and tested for that earlier. When they write, disabled, they mean disabled, like in the package is just disabled, it’s still there :man_facepalming:

Rebuild your NoG module with /data/adb/modules/NoG/system/product/priv-app/GmsCore/ as the path, reboot and you can install Gcam Services Provider.
I’ve tried it and the three Gcam versions you wanted tested all work, the new MGC_8.5.300_A10_V6 I’m running however does not. I guess there’s been additional work done in microG since the provider was last released.
(Testing this did totally screw up my microG install, but getting it working was worth it :smirk: )

Oh I’m sorry I don’t wanted to put your setup into a risk. I should have explained earlier that I’m not that into taking pictures with the Smartphone I’m just curious if the Gcam really make such a big difference and of course I’m also a bit challenged by such little problems.

Also I was thinking if there is a way to check an APK (extract it or so) and find out which package it will be after installation. :thinking: I think I googled it already and it was a bit to difficult as it needed a whole Android development installation or so - don’t remember the details.

Ok, so gms it is. I don’t see in the issue (I read today as well) that this package is mentioned there, but I trust you as you dug into it very detailed (and nearly screwed up you phone :face_with_diagonal_mouth:).

So there is no installed GmsCore package, but the path exist. :thinking: How is this working?
Is it part of the disabled microg of Calyx?

adb shell su -c pm list packages -f | grep GmsCore
---

adb shell su -c ls -la /system/product/priv-app/GmsCore
total 60428
drwxr-xr-x  3 root root     4096 2009-01-01 01:00 .
drwxr-xr-x 12 root root     4096 2009-01-01 01:00 ..
-rw-r--r--  1 root root 61920568 2009-01-01 01:00 GmsCore.apk
drwxr-xr-x  3 root root     4096 2009-01-01 01:00 oat

Anyway, I will repeat the steps and report back. :wink: