Environment: Meizu mx5,android 5.1
Issue: After developing the app using the real machine debugging, drag the icon on the desktop to uninstall app-debug.apk, and then install the signature version of the app-release.apk prompt to replace the xxx version, press OK after the prompt is incompatible, the installation fails.
Analysis: Has been uninstalled and then installed, according to the truth should not be prompted to replace XXX, is definitely because the uninstall is not clean (on other phones there is no such problem), should be the Meizu built-in application management uninstall problem.
Resolution: 1) in the system settings-fingerprint and security-root permissions to obtain the system's own root permissions, to determine the restart after the installation of RE File manager (you can freely browse files and modify file permissions)
2) Open the RE and then in data\data,data\app,data\dalvik-cache\arm64 inside the package name related to delete everything, will Data\system the packages.xml file is copied to the computer (it is recommended to use Android Device Monitor from Android Studio), and the package name is found in the Packages.xml file . <package> Tag Item deletion, after the modified packages.xml copy back to overwrite the original file can be installed app-release.apk.
The Data\system\packages.xml file is used to log app attribute permissions, similar to the registry, where users delete the file themselves (I did it!). ), Packagemanagerservice will restart the phone and then restore the app based on the records in the Packages-backup.xml (previously loaded but uninstalled apps are back!) )
Reference: http://blog.csdn.net/chinajl1980/article/details/52451535
Resolve Meizu MX5 Uninstall Debug-app not clean, cause the installation, upgrade unsuccessful problem