How to solve INSTALL_FAILED_SHARED_USER_INCOMPATIBLE when Android installs apk application

foreword

INSTALL_FAILED_SHARED_USER_INCOMPATIBLEIf there is an error when you install the app
Show INSTALL_FAILED_SHARED_USER_INCOMPATIBLE error
, then you have a high probability manifestof adding it to the file android:sharedUserId="android.uid.system". The function of this attribute is to promote the normal app to the system app (so that some system permissions can be used, such as displaying pop-up windows outside the app)
The system uid is added to the manifest file
to solve this problem , most of the discussion on the Internet is to remove android:sharedUserIdthis attribute, but if your purpose is to use this attribute and it can be installed, then please try the following solution .
Note : android:sharedUserIdwhile using it, you also need the android system key. Different systems keyare different. Generally, it is only provided to dedicated developers. Even if you can find one on Baidu, it cannot be used on other android devices. So if you want to use this attribute on the emulator that comes with Android Studio or on your own mobile phone, please give up.



1. Root the android device

First consider whether the app has root authority, run adb rootand adb remountcommand, and in some cases, adb remountrestart the android system root to take effect after running.



2. Uninstall the old app and run it again

Try to uninstall the old app, and then re-run the program, there is a high probability that it will work normally . If the uninstall function cannot be found on the customized android system, you can use adb uninstall <apk的包名>the form to uninstall.



3. Manually place the apk

If your app is already a system application and cannot be uninstalled directly, consider going to the system path (for example: ) to system/app/find your own application, and then complete the installation by replacing the installation package (you need to restart the system to take effect after the replacement is completed).
Note : Some system applications may affect normal use after being deleted by mistake, for example: Launcheror SystemUI, so when changing the system apk, it is recommended to back up the old installation package first, and adb pull <手机文件路径> <本机路径> the command used can save the files in android to the computer.

Guess you like

Origin blog.csdn.net/Guan_li_peng/article/details/127428653