[Galaxy S 4 Mini Original Android Development] Mek7:
Dirty flashed the 28-04-2017 build with migration zip and google apps nano. I wanted to see if the google clock is still crashing, but it was no longer present in app drawer. It is not visible in list of installed apps either. Probably because I had used opengapps mini package before the upgrade, but now switched to nano as it is recommended in first post of this thread so it is OK that the app is no longer there, however, it looks like there are some remains of it, see below.

When I try installing google clock from play store, I get error -505. Using logcat I managed to see why the error happens - somehow it thinks the app is already installed.

04-30 21:26:15.071 E/Finsky (14335): [1] com.google.android.finsky.installer.an.onReceive(22): Error -505 while installing com.google.android.deskclock: INSTALL_FAILED_ALREADY_EXISTS: Attempt to re-install com.google.android.deskclock without first uninstalling package running as com.android.deskclock

But I cannot see it anywhere to uninstall it!

I managed to get the APK from google play to force reinstall using adb.

D:\android-sdk\platform-tools>adb install -r d:\downloads\com.google.android.deskclock-50100112.apk
Failed to install d:\downloads\com.google.android.deskclock-50100112.apk: Failure [INSTALL_FAILED_ALREADY_EXISTS: Attempt to re-install com.google.android.deskclock without first uninstalling package running as com.android.deskclock]

as if it was ignoring the -r parameter which should tell it to "force" install??

I noticed the package name it tells me in this error message is different so I tried to uninstall it using adb:

D:\android-sdk\platform-tools>adb uninstall com.android.deskclock

Exception occurred while dumping:
java.lang.IllegalArgumentException: Unknown package: com.android.deskclock
at com.android.server.pm.Settings.isOrphaned(Settings.java:4175)
at com.android.server.pm.PackageManagerService.isOrphaned(PackageManagerService.java:18329)
at com.android.server.pm.PackageManagerService.deletePackage(PackageManagerService.java:15738)
at com.android.server.pm.PackageInstallerService.uninstall(PackageInstallerService.java:888)
at com.android.server.pm.PackageManagerShellCommand.runUninstall(PackageManagerShellCommand.java:792)
at com.android.server.pm.PackageManagerShellCommand.onCommand(PackageManagerShellCommand.java:118)
at android.os.ShellCommand.exec(ShellCommand.java:94)
at com.android.server.pm.PackageManagerService.onShellCommand(PackageManagerService.java:18589)
at android.os.Binder.shellCommand(Binder.java:468)
at android.os.Binder.onTransact(Binder.java:367)
at android.content.pm.IPackageManager$Stub.onTransact(IPackageManager.java:2438)
at com.android.server.pm.PackageManagerService.onTransact(PackageManagerService.java:3142)
at android.os.Binder.execTransact(Binder.java:565)

No dice? Now the package suddenly does not exist???

I tried the same via terminal emulator on the phone, via pm uninstall:

This crash seems a lot like a bug, google search yields nothing useful for it.

So now I don't know what to do to get the google clock app? At one moment it already exists, and when I try to uninstall it, it suddenly does not. Already spent 2 hours on this, it's frustrating, can anybody help please?

Hard reset is not an option.