question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to install app-photos-debug.apk -> INSTALL_FAILED_CONFLICTING_PROVIDER

See original GitHub issue

Describe the bug

I get Failure [INSTALL_FAILED_CONFLICTING_PROVIDER: Scanning Failed.: Can't install because provider name com.google.android.gsf.gservices (in package com.google.android.apps.photos) is already used by com.google.android.gsf] when trying to install app-photo-debug.apk via the adb command : adb shell pm install --force-queryable /data/local/tmp/app-photos-debug.apk

To Reproduce

Steps to reproduce the behavior:

  • Install Google Play Services in a secondary user profile
  • Go on the clean primary user profile
  • Push app-photos-debug.apk on /data/local/tmp/ : adb push app-photos-debug.apk /data/local/tmp/
  • Run the installation adb command : adb shell pm install --force-queryable /data/local/tmp/app-photos-debug.apk
  • See error : Failure [INSTALL_FAILED_CONFLICTING_PROVIDER: Scanning Failed.: Can't install because provider name com.google.android.gsf.gservices (in package com.google.android.apps.photos) is already used by com.google.android.gsf]

Smartphone

Device: Pixel 3a OS/ROM: GrapheneOS 11 (SP1A.211105.002.2021111414) Gcam-Services-Provider version: 1.4

Additional context

There is Google Play Services installed on a Sandbox (another user profile), but not on the user profile I’m trying to install app-photo-debug.apk

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
lukaspiepercommented, Nov 20, 2021

Saw the discussion on Matrix and just want to comment on that here.

Gcam-Services-Provider uses official app IDs that don’t belong to them That’s how it works You’re trying to install two apps with the same app ID Those will conflict with each other because they’re not signed the same

My app (the basic variant) has not been using Google’s ApplicationId for a couple of versions. The variant with gallery support, on the other hand, must use the ApplicationId from Google Photos. So both do not use com.google.android.gsf as ApplicationId.

However, both variants of the app register a provider with the id com.google.android.gsf.gservices. This provider is of course included in the app com.google.android.gsf and that is why the installation does not work, because there can never be two providers with the same ID. This therefore has nothing to do with signing (except when using Google Photos).

But they should be sandboxed. Why do they conflict on different workprofiles?

This has already been answered perfectly by Daniel. Here is a quote:

when you install an app in any user / work profile, it installs the apk globally and enforces key pinning / downgrade protection based on the currently installed one if you update the app in any profile, it updates it globally, you don’t have to update it in each it doesn’t keep a separate copy of the apk for each profile where an app is installed and they don’t need to be separately updated, and the key pinning / downgrade protection is enforced across all

So why do I continue to maintain this app, even though I use GrapheneOS myself and could simply use the app com.google.android.gsf? GSF not only provides the necessary interfaces to get Google Camera working, but also takes care of other things. These additional interfaces, which do not exist in my app, can have (side) effects on other apps. Providing only the bare essentials has always been a core feature of this project. Before I put this app together, you could get Gcam to work with microg (of course also in a sandbox and without privileges like any app), but there were a lot of side effects.

By the way, questions similar to these have already been answered in previous issues. This is not a bug in my app, but a reasonable restriction of the OS.

1reaction
Gladox114commented, Nov 20, 2021

Got exactly the same Error on Pixel 5 with Graphene OS. It’s conflicting with the sandboxed Google Play services. But they should be sandboxed. Why do they conflict on different workprofiles?

I am using Insular to Sandbox them.

Read more comments on GitHub >

github_iconTop Results From Across the Web

INSTALL FAILED CONFLICTING PROVIDER - Stack Overflow
PackageManagerException : Can't install because provider name com.google.android.gms.measurement.google_measurement_service (in package ...
Read more >
The application could not be installed - YouTube
... Installation failed due to: 'null' Install shows error in console: ... could not be installed : INSTALL FAILED CONFLICTING PROVIDER.
Read more >
Installation fails on Android - CONFLICTING_PROVIDER #750
Installation failed with message INSTALL_FAILED_CONFLICTING_PROVIDER. It is possible that this issue is resolved by uninstalling an existing ...
Read more >
install failed conflicting provider - MSDN - Microsoft
User75709 posted. Hi,. I'm getting below error. Deployment failed. error ADB0000: Mono.AndroidTools.InstallFailedException: Failure ...
Read more >
Android - INSTALL FAILED CONFLICTING PROVIDER
Android – Install shows error in console: INSTALL FAILED CONFLICTING PROVIDER ... I am experimenting with the NotesList sample program in the Android...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found