Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

INSTALL_FAILED_SHARED_USER_INCOMPATIBLE while using shared user id

Tags:

android

I am working on Android application which will share the database. For that, I'm using android:sharedUserId in both application's Manifest file. When I am trying to run the application after adding that sharedUserId it shows me following errors in console.

[2013-03-04 19:37:32 - MainActivity] Installation error: INSTALL_FAILED_SHARED_USER_INCOMPATIBLE [2013-03-04 19:37:32 - MainActivity] Please check logcat output for more details. [2013-03-04 19:37:32 - MainActivity] Launch canceled! 

Please help me to resolve this problem.

like image 870
Hemantwagh07 Avatar asked Mar 04 '13 15:03

Hemantwagh07


People also ask

What is a shared user ID?

SharedUserId is used to share the data,processes etc between two or more applications. It is defined in AndroidManifest. xml like, <manifest xmlns:android="http://schemas.android.com/apk/res/android" android:sharedUserId="android. uid.

What is Android UID system?

Android assigns a unique user ID (UID) to each Android application and runs it in its own process. Android uses this UID to set up a kernel-level Application Sandbox.


2 Answers

I followed these steps:

  1. Removed existing application (if it is already installed )
  2. Removed share user ID from android manifest
  3. Bulid the application.
  4. Now enter share user ID again
  5. build the application 1 more time
like image 140
Hemantwagh07 Avatar answered Sep 24 '22 19:09

Hemantwagh07


This means something about your app was not correctly uninstalled. This steps help to force uninstall from internal commands:

  1. Connect your phone to PC with usb
  2. From your shell launch:
    $ adb shell     shell@android:/ $ su     shell@android:/ # pm list packages | grep <part of package>     package:com.android.providers.applications     package:com.android.providers.calendar     package:com.android.providers.contacts     package:com.android.providers.downloads     ...     shell@android:/ # pm uninstall <package>     shell@android:/ # exit     shell@android:/ $ exit     $ 

Basically, you log into android shell, become superuser, find problematic packages, and uninstall it

like image 29
albfan Avatar answered Sep 22 '22 19:09

albfan